Skip to content

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.

A Rust toolchain is all you need. No Node toolchain is required.

Terminal window
# run from the workspace without installing
cargo run -p flow-cli -- run crates/flow-cli/examples/hello.flow
# or install the `flow` binary onto your PATH
cargo install --path crates/flow-cli

Tagged releases publish prebuilt per-OS binaries. cargo install builds from source.

Terminal window
flow # bare command opens the TUI
flow ls # saved templates
flow run my-template # run a saved template by slug
flow run a.flow b.flow # run multiple flows concurrently
flow generate "validate a job, then notify on-call if it fails"
flow run flow.flow --json # NDJSON event stream for CI

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.

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.

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.