Skip to main content

The flow CLI

The CLI runs pipelines locally and nothing else.

That boundary is deliberate. Teams, projects, users and tokens, remote runs and the web UI belong to the app suite — flowwright-server and flowwright-worker — and are managed there. There is no flow login, no flow deploy, and nothing here talks to a server. The same pipeline.ts runs in both places; only the CLI is covered on these pages — the other side is Self-hosting.

Commands

CommandWhat it does
flow runRun the pipeline
flow explainPrint the execution plan without running it
flow validateLoad and validate the pipeline
flow doctorCheck the environment for running pipelines
flow initScaffold a starter pipeline.ts
flow migrateScan a Jenkinsfile → suggested pipeline.ts
flow exportPrint a CI wrapper config
flow listShow recent runs
flow logsShow logs for a run
flow backupSnapshot the local run-history database
flow cleanPurge local run history and logs

flow help prints the same list, and it's the authoritative one — if a command appears there and not here, trust flow help.

Flags

FlagApplies toMeaning
-f, --file <path>run, explain, validate, doctor, initPipeline file (default pipeline.ts)
-j, --concurrency <N>runRun up to N stages in parallel over the DAG
-w, --watchrunRe-run on file changes
--reporter <kind>runpretty, ci, github, gitlab or json
--junit <path>runAlso write a JUnit XML report
--jsonrun, explainMachine-readable output
--no-historyrunDon't record this run
--no-dockerrunRun container stages on the host
--stage <id|name>logsFilter to one stage
--allcleanRemove all of .flowwright/
--out <path>migrateWrite the suggested pipeline.ts
--pluginsinitScaffold with plugin-node
--no-colorallDisable colored output
-h, --helpallShow help
--versionallShow version

A flag a command doesn't read is rejected, not ignored:

$ flow list --junit report.xml
flow list: --junit is not an option for this command

The alternative — accepting it silently — means flow list --junit report.xml exits 0 having written no report, which is worse than failing.

The full per-command matrix, and the environment variables the CLI reads, are on the CLI flags reference.

-j and the real default

-j is documented as defaulting to 1, and that's true only when your pipeline doesn't say otherwise. The precedence is: -j on the command line, then the concurrency field in pipeline({ … }), then 1. A pipeline that declares concurrency: 4 runs four-wide without any flag.

Exit codes

CodeMeaning
0Success
1Usage error, validation failure, or a load error
nflow run — the exit code of the command that failed
130Cancelled by Ctrl-C or SIGTERM

flow run propagates the failing step's own exit code rather than flattening everything to 1, so a stage that exits 2 makes flow exit 2. That's what lets flow run stand in for whatever your CI job used to call.

Running flow with no command prints usage to stderr and exits 1 — it's a usage error, the same as bare git. flow help and flow --help print to stdout and exit 0.

Color

Color is on when stdout is a TTY. It turns off when you pass --no-color, when NO_COLOR is set, or when output is piped — so redirecting to a file never captures escape codes.

Node version

FlowWright requires Node.js 24 or newer, which is what engines.node, the Docker image and the generated CI wrappers all assume.

Run history uses node:sqlite. On Node versions where that module is still behind a flag, the CLI silently re-executes itself with --experimental-sqlite for the four commands that touch history (run, list, backup, logs). It's an implementation detail that keeps older runtimes limping along, not a supported configuration — target 24.