Skip to main content

CLI flags

The complete surface of the flow binary. For what each command does, see the CLI guide.

Commands

CommandPurpose
runRun the pipeline
explainPrint the execution plan without running it
validateLoad and validate the pipeline
initScaffold a starter pipeline.ts
listShow recent runs
logsShow logs for a run — logs [run-id|latest]
backupSnapshot the local run-history DB — backup <path>
cleanPurge local run history and logs
doctorCheck the environment for running pipelines
migrateScan a Jenkinsfile → suggested pipeline.ts
exportPrint 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

FlagShortValueDefaultMeaning
--file-fpathpipeline.tsPipeline file to load
--concurrency-jpositive intthe pipeline's concurrency, else 1Max stages running in parallel over the DAG
--watch-woffRe-run on file changes; forces no history
--reportersee belowauto-detectedConsole reporter
--junitpathAlso write a JUnit XML report
--jsonoffMachine-readable output
--stageid or nameFilter logs to one stage
--alloffclean also removes cache and stash
--outpathstdoutWhere migrate writes the suggested pipeline
--pluginsoffinit scaffolds with @flowwright/plugin-node
--no-historyoffDon't record this run to history
--no-dockeroffRun container stages on the host instead of Docker
--no-coloroffDisable colored output
--help-hPrint help, exit 0
--versionPrint 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:

CommandAccepts
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.

VariableEffect
NO_COLORAny non-empty value disables color. Empty counts as unset
CItrue or 1 selects the ci reporter
GITHUB_ACTIONStrue selects the github reporter
GITLAB_CItrue selects the gitlab reporter
GITHUB_STEP_SUMMARYPath the github reporter appends its job summary to; empty means off
FW_SQLITE_REEXECInternal. 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

CodeMeans
0Success
1Usage error, a plan that failed to load or validate, or doctor found a problem
130Cancelled — see below
anythingflow 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.