Skip to content

CLI Reference

Bizon provides a command-line interface for discovering sources, validating configs, resolving secrets, resetting streams, and running pipelines.

The CLI is automatically installed when you install Bizon:

Terminal window
pip install bizon

Verify the installation:

Terminal window
bizon --help

Run a pipeline from a YAML configuration file.

Terminal window
bizon run <config.yml> [OPTIONS]

Arguments:

ArgumentRequiredDescription
config.ymlYesPath to your pipeline configuration file

Options:

OptionTypeDefaultDescription
--custom-sourcePathNonePath to a custom Python file implementing a Bizon source
--runnerChoicethreadRunner type: thread, process, or stream. Always overrides engine.runner.type
--log-levelChoiceNoneTRACE, DEBUG, INFO, WARNING, ERROR or CRITICAL. When omitted, engine.runner.log_level is used (default INFO)
--env-filePathNoneLoad environment variables from this file. See .env files
--resetFlagoffReset an incremental stream for this run: re-fetch it in full and replace the destination table. See Stream Reset
--result-jsonPathNoneWrite the run’s outcome as JSON to this path. See Result file

Examples:

Terminal window
# Basic run
bizon run config.yml
# Run producer and consumer in separate processes
bizon run config.yml --runner process
# Run in streaming mode (continuous)
bizon run config.yml --runner stream
# Run with debug logging
bizon run config.yml --log-level DEBUG
# Run with a custom source connector
bizon run config.yml --custom-source ./my_source.py
# Load secrets from a .env file and record the outcome
bizon run config.yml --env-file .env --result-json result.json
# Rebuild an incremental stream once
bizon run config.yml --reset

--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"
}
FieldDescription
statusrunning, success or failure
failure_classWhich part failed (see below). null on success
job_idBackend job ID. Absent if the run failed before a job was created
producer / consumerPipeline status of each side (success, source_error, destination_error, killed_by_runner, …) for the thread and process runners
streamPipeline status for the stream runner
records_writtenRows written by the job, as recorded by the backend
started_atUTC start time
duration_sRun duration in seconds
errorThe first error logged during the run, or the exception that stopped it

Failure classes:

ClassMeaning
configThe runner could not be built: a reference that failed to resolve, a validation error
sourceSource error, or a ConnectionError / requests exception
destinationDestination write or publish failed
backendState backend error (SQLAlchemy error, missing backend schema)
queueQueue error
transformA transform failed
streamThe stream runner failed
killedA side was stopped by the runner after the other side failed
unknownAny 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.

Check a config without running anything.

Terminal window
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.

OptionDescription
--env-fileLoad environment variables from this file
--strictExit non-zero on warnings as well as errors
--skip-referencesDon’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.yml
config.yml is valid: hubspot.contacts (incremental) -> bigquery

Dry-run every secret reference in a config.

Terminal window
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 set
Error: 1 reference(s) failed to resolve.

See Secrets for the reference syntax.

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.

Terminal window
bizon stream reset <config.yml> [OPTIONS]
OptionDescription
--env-fileLoad environment variables from this file
--cancelWithdraw pending reset requests instead of adding one
--stream NAMEReset this stream instead of source.stream, for configs templated across streams
Terminal window
bizon stream reset config.yml # queued, consumed by the next run
bizon stream reset config.yml --cancel # withdraw it
bizon stream reset config.yml --stream deals # pick the stream

The request is scoped to one stream, keyed on the pipeline id (or name), source and stream. The command:

  • fails if sync_mode is not incremental;
  • 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 sqlite backend, since the request is only seen by runs that use the same file.

See Stream Reset for what the reset run does.

List all available source connectors.

Terminal window
bizon source list

Output:

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.

List available streams for a specific source.

Terminal window
bizon stream list <source_name>

Arguments:

ArgumentRequiredDescription
source_nameYesName of the source connector

Output:

Terminal window
bizon stream list hubspot
Available streams for hubspot:
[Supports incremental] - contacts
[Supports incremental] - companies
[Full refresh only] - owners

The output indicates whether each stream supports incremental sync mode.

The --runner option determines how the pipeline executes:

RunnerUse CaseDescription
threadDefault, most workloadsProducer and consumer run in a thread pool, connected by the in-memory queue
processCPU-heavy transformsProducer and consumer run in separate processes (at least 2 workers, spawn start method on every platform)
streamContinuous streamingNo 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.

CodeMeaning
0Command completed successfully
1Pipeline failed, config invalid, or a reference failed to resolve

Values in your YAML can come from the environment in two ways:

  • env://VAR or ${env://VAR}: resolves the variable VAR, as a whole value or inline. See Secrets.
  • BIZON_ENV_*: a whole value starting with BIZON_ENV_ is replaced by the environment variable of that name.
authentication:
type: api_key
params:
token: BIZON_ENV_MY_API_TOKEN
Terminal window
export BIZON_ENV_MY_API_TOKEN="your-secret-token"
bizon run config.yml

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.