CLI Reference
Bizon provides a command-line interface for discovering sources, validating configs, resolving secrets, resetting streams, and running pipelines.
Installation
Section titled “Installation”The CLI is automatically installed when you install Bizon:
pip install bizonVerify the installation:
bizon --helpCommands
Section titled “Commands”bizon run
Section titled “bizon run”Run a pipeline from a YAML configuration file.
bizon run <config.yml> [OPTIONS]Arguments:
| Argument | Required | Description |
|---|---|---|
config.yml | Yes | Path to your pipeline configuration file |
Options:
| Option | Type | Default | Description |
|---|---|---|---|
--custom-source | Path | None | Path to a custom Python file implementing a Bizon source |
--runner | Choice | thread | Runner type: thread, process, or stream. Always overrides engine.runner.type |
--log-level | Choice | None | TRACE, DEBUG, INFO, WARNING, ERROR or CRITICAL. When omitted, engine.runner.log_level is used (default INFO) |
--env-file | Path | None | Load environment variables from this file. See .env files |
--reset | Flag | off | Reset an incremental stream for this run: re-fetch it in full and replace the destination table. See Stream Reset |
--result-json | Path | None | Write the run’s outcome as JSON to this path. See Result file |
Examples:
# Basic runbizon run config.yml
# Run producer and consumer in separate processesbizon run config.yml --runner process
# Run in streaming mode (continuous)bizon run config.yml --runner stream
# Run with debug loggingbizon run config.yml --log-level DEBUG
# Run with a custom source connectorbizon run config.yml --custom-source ./my_source.py
# Load secrets from a .env file and record the outcomebizon run config.yml --env-file .env --result-json result.json
# Rebuild an incremental stream oncebizon run config.yml --resetResult file
Section titled “Result file”--result-json <path> writes a JSON summary of the run. The file reads "status": "running" as soon as the run starts and is replaced when it ends, so a process killed from outside (OOM, a pod deadline) leaves running behind rather than a previous run’s outcome. Writes are atomic (temporary file, then rename). The exit code is unchanged.
{ "status": "failure", "failure_class": "source", "job_id": "f79b771e432b400aad8f7f94ec10e87e", "producer": "source_error", "consumer": "source_error", "stream": null, "records_written": 12000, "started_at": "2026-10-29T06:00:00.123456Z", "duration_s": 42.917, "error": "requests.exceptions.HTTPError: 503 Server Error"}| Field | Description |
|---|---|
status | running, success or failure |
failure_class | Which part failed (see below). null on success |
job_id | Backend job ID. Absent if the run failed before a job was created |
producer / consumer | Pipeline status of each side (success, source_error, destination_error, killed_by_runner, …) for the thread and process runners |
stream | Pipeline status for the stream runner |
records_written | Rows written by the job, as recorded by the backend |
started_at | UTC start time |
duration_s | Run duration in seconds |
error | The first error logged during the run, or the exception that stopped it |
Failure classes:
| Class | Meaning |
|---|---|
config | The runner could not be built: a reference that failed to resolve, a validation error |
source | Source error, or a ConnectionError / requests exception |
destination | Destination write or publish failed |
backend | State backend error (SQLAlchemy error, missing backend schema) |
queue | Queue error |
transform | A transform failed |
stream | The stream runner failed |
killed | A side was stopped by the runner after the other side failed |
unknown | Any other exception |
For a run that finishes with a failed status, the class comes from the producer first, then the consumer, then the stream status.
bizon config validate
Section titled “bizon config validate”Check a config without running anything.
bizon config validate <config.yml> [OPTIONS]It validates the top-level config schema, the stream name, and the source’s own config class. Secret references are resolved as a run would resolve them, so it needs the same access as a run.
| Option | Description |
|---|---|
--env-file | Load environment variables from this file |
--strict | Exit non-zero on warnings as well as errors |
--skip-references | Don’t resolve gsm:// / env:// / BIZON_ENV_ references. Fields holding one are not type-checked. For CI without secret access |
Warnings include the deprecated source.reset: true and source: keys that the source’s config class does not declare (they are ignored at run time).
$ bizon config validate config.ymlconfig.yml is valid: hubspot.contacts (incremental) -> bigquerybizon secrets check
Section titled “bizon secrets check”Dry-run every secret reference in a config.
bizon secrets check <config.yml> [--env-file .env]BIZON_ENV_ values are substituted first, as in a run; then each gsm:// and env:// reference is resolved and printed with its config path. Values are masked: only their length is shown. The command exits non-zero if any reference fails.
source.authentication.params.token gsm://hubspot-token ✓ (44 chars)engine.backend.config.password env://PG_PASSWORD ✗ environment variable 'PG_PASSWORD' is not setError: 1 reference(s) failed to resolve.See Secrets for the reference syntax.
bizon stream reset
Section titled “bizon stream reset”Queue a reset of an incremental stream. The request is stored in the backend and consumed by the next run of that pipeline, so a scheduled pipeline picks it up with no change to its command line.
bizon stream reset <config.yml> [OPTIONS]| Option | Description |
|---|---|
--env-file | Load environment variables from this file |
--cancel | Withdraw pending reset requests instead of adding one |
--stream NAME | Reset this stream instead of source.stream, for configs templated across streams |
bizon stream reset config.yml # queued, consumed by the next runbizon stream reset config.yml --cancel # withdraw itbizon stream reset config.yml --stream deals # pick the streamThe request is scoped to one stream, keyed on the pipeline id (or name), source and stream. The command:
- fails if
sync_modeis notincremental; - does nothing if a reset is already pending;
- warns when the stream has no previous successful run, which usually means a mistyped stream name;
- warns on a
sqlitebackend, since the request is only seen by runs that use the same file.
See Stream Reset for what the reset run does.
bizon source list
Section titled “bizon source list”List all available source connectors.
bizon source listOutput:
Retrieving available sources...Available sources:dummy - ['creatures', 'plants']kafka - ['topic']hubspot - ['contacts', 'companies', 'deals', ...]notion - ['users', 'databases', 'pages', ...]gsheets - ['worksheet']Sources whose dependencies are missing show an installation hint:
gsheets - NOT AVAILABLE, run 'pip install bizon[gsheets]' to install missing dependencies.The hint is built from the source name. Only some sources have a matching extra; see the sources catalog.
bizon stream list
Section titled “bizon stream list”List available streams for a specific source.
bizon stream list <source_name>Arguments:
| Argument | Required | Description |
|---|---|---|
source_name | Yes | Name of the source connector |
Output:
bizon stream list hubspotAvailable streams for hubspot:[Supports incremental] - contacts[Supports incremental] - companies[Full refresh only] - ownersThe output indicates whether each stream supports incremental sync mode.
Runner Types
Section titled “Runner Types”The --runner option determines how the pipeline executes:
| Runner | Use Case | Description |
|---|---|---|
thread | Default, most workloads | Producer and consumer run in a thread pool, connected by the in-memory queue |
process | CPU-heavy transforms | Producer and consumer run in separate processes (at least 2 workers, spawn start method on every platform) |
stream | Continuous streaming | No queue: each batch is read, transformed, written and committed in one loop |
With both thread and process, a side that fails stops the other, and the run returns a status that --result-json records. See Engine Configuration.
Exit Codes
Section titled “Exit Codes”| Code | Meaning |
|---|---|
0 | Command completed successfully |
1 | Pipeline failed, config invalid, or a reference failed to resolve |
Environment Variables
Section titled “Environment Variables”Values in your YAML can come from the environment in two ways:
env://VARor${env://VAR}: resolves the variableVAR, as a whole value or inline. See Secrets.BIZON_ENV_*: a whole value starting withBIZON_ENV_is replaced by the environment variable of that name.
authentication: type: api_key params: token: BIZON_ENV_MY_API_TOKENexport BIZON_ENV_MY_API_TOKEN="your-secret-token"bizon run config.yml.env files
Section titled “.env files”Every command accepts --env-file PATH and loads that file before reading the config. Variables already set in the environment take precedence over the file.
Without --env-file, Bizon loads a .env file when it finds one. The lookup starts from where Bizon is installed rather than your working directory, so pass --env-file when you rely on a project .env.
Next Steps
Section titled “Next Steps”- Configuration Reference - Complete YAML configuration options
- Secrets - Resolve values from Secret Manager or the environment
- Sync Modes - Understand full refresh, incremental, and stream modes
- Custom Sources - Build your own source connector