CLI reference

cortex takes a small number of flags. Everything else lives in config.

Flags

FlagDefaultDescription
--config <path>—Path to a config file instead of the usual cascade. Disables the cascade entirely — only that file is read, plus the environment.
--prompt <text>—Run one prompt non-interactively and exit. The answer goes to stdout; everything else to stderr. Bounded by maxIterationsOnce.
--verify <command>—After --prompt, run a verifier command in the working directory. If it fails, cortex exits non-zero unless --repair-attempts allows another turn.
--repair-attempts <n>0Number of extra repair turns allowed after --verify fails. The verifier runs again after each repair.
--version—Print the version, commit and build date, then exit.

Modes

InvocationMode
cortexInteractive (the TUI)
cortex --prompt "…"Non-interactive (one turn, then exit)
cortex --prompt "…" --verify "go test ./..."Non-interactive with objective verification
cortex --versionVersion only

Exit codes

Build metadata

The version, commit and build date are injected at link time by goreleaser. A source build without ldflags reports cortex dev (none, built unknown).

ℹ️
Why so few flags? Configuration belongs in theconfig file, not on the command line. The only flags are mode switches and the override path.