Flow CLI overview
Flow CLI is the headless edition. It is a flow binary that runs Flow DSL
on the same Rust orchestration core as the desktop, for terminals and CI, plus
a full-screen TUI.
It is not a transpiler. The planned Flow export / Code Generator transpiles a
flow away from the runtime into a standalone script. The CLI instead keeps the
runtime and runs the .flow document natively. It shares the desktop’s
adapters, credential custody (OS keyring), node catalog, and ~/.flow-studio/
data.
Install
Section titled “Install”A Rust toolchain is all you need. No Node toolchain is required.
# run from the workspace without installingcargo run -p flow-cli -- run crates/flow-cli/examples/hello.flow
# or install the `flow` binary onto your PATHcargo install --path crates/flow-cliTagged releases publish prebuilt per-OS binaries. cargo install builds from
source.
Quick taste
Section titled “Quick taste”flow # bare command opens the TUIflow ls # saved templatesflow run my-template # run a saved template by slugflow run a.flow b.flow # run multiple flows concurrentlyflow generate "validate a job, then notify on-call if it fails"flow run flow.flow --json # NDJSON event stream for CIAI nodes, headless
Section titled “AI nodes, headless”Cloud ai nodes work headless through OS-keyring API keys and the cloud-AI
setting. Local ai nodes auto-start the managed model server, with the
binary and model resolved from settings or $PATH. Pass --no-auto-llm to
instead rely on an already-configured server. The launch logic is shared with
the desktop.
Config and data
Section titled “Config and data”The CLI shares the desktop’s data directory, either $FLOW_STUDIO_DIR or
~/.flow-studio/. That directory holds the database, settings, templates,
nodes, models, and logs. Set $FLOW_STUDIO_DIR to a temp path to isolate a
run, which is useful in CI. Tracing goes to stderr with the level set via
FLOW_LOG / RUST_LOG, so a flow’s stdout stays reserved for results.
Architecture
Section titled “Architecture”The CLI is a thin binary over the shared core, with no desktop shell. It builds the application core, parses DSL, and calls the same execution path the desktop drives behind its IPC command, with a terminal, NDJSON, or channel event sink.
Related
Section titled “Related”- Commands - the full command table.
- The TUI - the full-screen terminal app.
- CI integration - exit codes and NDJSON.