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
| Flag | Meaning |
|---|---|
--workspace <path> | Use a specific workspace |
--model <id> | Override the workspace model |
--json | Emit structured JSON output |
--yes | Skip permission prompts (use in CI) |
Exit codes
0— run completed1— run failed2— permission required and--yeswas not set
Next: CLI command reference.