CLI overview

Run agents from the terminal, scripts, and CI.

The CLI runs the same agent engine as desktop, headless. It is built for scripts, hooks, and CI pipelines.

Basic usage

optamus run "Explain the failing test in auth.test.ts"

Pipe in context:

git diff | optamus run --stdin "Review this diff for correctness"

Common flags

FlagMeaning
--workspace <path>Use a specific workspace
--model <id>Override the workspace model
--jsonEmit structured JSON output
--yesSkip permission prompts (use in CI)

Exit codes

  • 0 — run completed
  • 1 — run failed
  • 2 — permission required and --yes was not set

Next: CLI command reference.