CLI flags
The complete surface of the flow binary. For what each command does, see
the CLI guide.
Commands
| Command | Purpose |
|---|---|
run | Run the pipeline |
explain | Print the execution plan without running it |
validate | Load and validate the pipeline |
init | Scaffold a starter pipeline.ts |
list | Show recent runs |
logs | Show logs for a run — logs [run-id|latest] |
backup | Snapshot the local run-history DB — backup <path> |
clean | Purge local run history and logs |
doctor | Check the environment for running pipelines |
migrate | Scan a Jenkinsfile → suggested pipeline.ts |
export | Print a CI wrapper config — export github-actions|gitlab-ci|jenkins |
The CLI runs pipelines locally and nothing else. Teams, projects, tokens, remote runs and the web UI belong to the server and worker.
Flags
| Flag | Short | Value | Default | Meaning |
|---|---|---|---|---|
--file | -f | path | pipeline.ts | Pipeline file to load |
--concurrency | -j | positive int | the pipeline's concurrency, else 1 | Max stages running in parallel over the DAG |
--watch | -w | — | off | Re-run on file changes; forces no history |
--reporter | — | see below | auto-detected | Console reporter |
--junit | — | path | — | Also write a JUnit XML report |
--json | — | — | off | Machine-readable output |
--stage | — | id or name | — | Filter logs to one stage |
--all | — | — | off | clean also removes cache and stash |
--out | — | path | stdout | Where migrate writes the suggested pipeline |
--plugins | — | — | off | init scaffolds with @flowwright/plugin-node |
--no-history | — | — | off | Don't record this run to history |
--no-docker | — | — | off | Run container stages on the host instead of Docker |
--no-color | — | — | off | Disable colored output |
--help | -h | — | — | Print help, exit 0 |
--version | — | — | — | Print the version, exit 0 |
--no-history, --no-docker and --no-color are flags in their own right, not negations
— there is no --history or --docker.
--reporter takes pretty, ci, github, gitlab or json. Anything else is an error.
See Reporters for how auto-detection picks one.
Which command takes which flag
--help, --version and --no-color work everywhere. The rest are per-command:
| Command | Accepts |
|---|---|
run | --file --concurrency --watch --json --reporter --junit --no-history --no-docker |
explain | --file --json |
validate | --file |
doctor | --file |
init | --file --plugins |
logs | --stage |
clean | --all |
migrate | --out |
list | — none |
backup | — none |
export | — none |
A flag a command doesn't accept is a hard error, not a no-op:
$ flow list --junit report.xml
flow list: --junit is not an option for this command
Exit code 1. A command that silently ignored a flag would be lying about having written a report.
Environment variables
Six, and no more. Anything else named FW_* belongs to the server or worker — those
are on Configuration, not here.
| Variable | Effect |
|---|---|
NO_COLOR | Any non-empty value disables color. Empty counts as unset |
CI | true or 1 selects the ci reporter |
GITHUB_ACTIONS | true selects the github reporter |
GITLAB_CI | true selects the gitlab reporter |
GITHUB_STEP_SUMMARY | Path the github reporter appends its job summary to; empty means off |
FW_SQLITE_REEXEC | Internal. Set on a re-exec'd child so the wrapper can't loop |
--reporter and --json both beat provider detection. Color is off if either
--no-color is passed or NO_COLOR is set — neither overrides the other — and also
whenever stdout is not a TTY.
Exit codes
| Code | Means |
|---|---|
0 | Success |
1 | Usage error, a plan that failed to load or validate, or doctor found a problem |
130 | Cancelled — see below |
| anything | flow run propagates the failing stage's own exit code |
A failing pipeline exits with the exit code of the command that failed, so
node -e "process.exit(2)" failing makes flow run exit 2. That's what makes
flow run a drop-in CI step.
130 is cancellation. Ctrl-C or SIGTERM aborts the run, finishes writing the
reports, and exits 130. A second signal gives up immediately. See
Running in CI for what survives a cancelled job.