bino preview
bino preview starts a local HTTP server that renders your report in a browser.
It reloads automatically when you change manifests or data files.
bino preview [flags]Common flags:
--work-dir– report bundle directory (default:.).--port– HTTP port (default:45678).--log-sql– log executed SQL queries.--lint– run lint rules on each refresh (disabled by default).--data-validation– data validation mode:warn(default),fail, oroff.
Default Arguments via bino.toml
Section titled “Default Arguments via bino.toml”You can set default values for preview flags in your project’s bino.toml file. These defaults are applied automatically and can be overridden by explicit command-line flags:
[preview.args]
port = 9000
log-sql = true
lint = true
data-validation = "warn"When you override a TOML default, the CLI logs an info message:
$ bino preview --port 8080
Overriding port from bino.toml (9000 -> 8080)Environment Variables via bino.toml
Section titled “Environment Variables via bino.toml”You can also set environment variables for preview in your bino.toml. This is useful for configuring query limits during development:
[preview.env]
BNR_MAX_QUERY_ROWS = "10000"
BNR_CDN_MAX_BYTES = "10485760"
DATABASE_URL = "postgres://localhost/dev"Actual environment variables always take precedence over TOML values. When an env var overrides a TOML value, the CLI logs a message:
$ BNR_MAX_QUERY_ROWS=5000 bino preview
Environment variable BNR_MAX_QUERY_ROWS overrides bino.toml ("10000" -> "5000")See bino init for the full configuration reference.
Examples
Section titled “Examples”Preview the bundle in the current directory:
bino previewPreview a different workdir and log SQL:
bino preview --work-dir my-report --log-sqlIf the browser does not open automatically, open http://127.0.0.1:45678/ manually.
Use placeholder screenshots in your docs to show the preview UI.