| name | afx |
| description | Agent Farm CLI — the tool for spawning builders, managing Tower, workspaces, and cron tasks. ALWAYS consult this skill BEFORE running any `afx` command to get the exact syntax. This prevents wasting time guessing flags that don't exist. Use this whenever you need to spawn a builder, check status, send messages, clean up worktrees, manage Tower, or run cron tasks. If you're about to type `afx` followed by anything, check here first. |
Agent Farm CLI
afx spawn
Spawns a new builder in an isolated git worktree.
afx spawn [number] [options]
The ONLY flags that exist:
| Flag | Description |
|---|
--protocol <name> | Protocol: spir, aspir, air, bugfix, tick, maintain, experiment. Required for numbered spawns. |
--task <text> | Ad-hoc task (no issue number needed) |
--shell | Bare Claude session |
--worktree | Bare worktree session |
--amends <number> | Original spec number (TICK only) |
--files <files> | Context files, comma-separated. Requires --task. |
--no-comment | Skip commenting on the GitHub issue |
--force | Skip dirty-worktree and collision checks |
--soft | Soft mode (AI follows protocol, you verify) |
--strict | Strict mode (porch orchestrates) — this is the default |
--resume | Resume builder in existing worktree |
--no-role | Skip loading role prompt |
There is NO -t, --title, --name, or --branch flag. The branch name is auto-generated from the issue title.
Examples:
afx spawn 42 --protocol spir
afx spawn 42 --protocol aspir
afx spawn 42 --protocol air
afx spawn 42 --protocol bugfix
afx spawn 42 --protocol tick --amends 30
afx spawn 42 --protocol spir --soft
afx spawn 42 --resume
afx spawn --task "fix the flaky test"
afx spawn 42 --protocol spir --force
Pre-spawn checklist:
git status — worktree must be clean (or use --force)
- Commit specs/plans first — builders branch from HEAD and can't see uncommitted files
--protocol is required for numbered spawns
afx send
Sends a message to a running builder.
afx send [builder] [message]
| Flag | Description |
|---|
--all | Send to all builders |
--file <path> | Include file content |
--interrupt | Send Ctrl+C first |
--raw | Skip structured formatting |
--no-enter | Don't press Enter after message |
afx send 0042 "PR approved, please merge"
afx send 0585 "check the test output" --file /tmp/test-results.txt
afx cleanup
Removes a builder's worktree and branch after work is done.
afx cleanup [options]
| Flag | Description |
|---|
-p, --project <id> | Builder project ID (no leading zeros: 585 not 0585) |
-i, --issue <number> | Cleanup bugfix builder by issue number |
-t, --task <id> | Cleanup task builder (e.g., task-bEPd) |
-f, --force | Force cleanup even if branch not merged |
afx cleanup -p 585
afx cleanup -p 585 -f
Note: afx cleanup uses plain numbers (585), not zero-padded (0585). But afx send uses zero-padded IDs (0585).
afx status
afx status
No flags needed. Shows Tower status, workspace, and all active builders.
afx tower
afx tower start
afx tower stop
afx tower log
afx tower status
afx tower connect
afx tower disconnect
There is NO afx tower restart — use afx tower stop && afx tower start.
afx workspace
afx workspace start
afx workspace stop
afx dash is a deprecated alias — use afx workspace instead.
afx cron
afx cron list
afx cron status <name>
afx cron run <name>
afx cron enable <name>
afx cron disable <name>
There is NO afx cron add — create YAML files in .af-cron/ directly.
Other commands
afx open <file>
afx shell
afx attach
afx rename <name>
afx architect