Headless CI & HTTP Server
Beyond the interactive TUI, the same affer binary supports non-interactive CLI runs and a local HTTP server.
Headless runs in CI
Section titled “Headless runs in CI”Use affer run for automated scripts, pull request checks, or scheduled jobs:
affer run "run go test ./... and summarize any failures"For machine-readable streaming output (NDJSON), pass the stream JSON format flag:
affer run --output-format stream-json "fix lint errors in internal/"Exit codes
Section titled “Exit codes”affer returns standard exit codes so CI pipelines can branch cleanly:
| Code | Meaning |
|---|---|
0 |
Success |
1 |
Runtime or agent error |
2 |
Invalid CLI usage or flags |
130 |
Aborted via SIGINT |
Local HTTP API server
Section titled “Local HTTP API server”Start a local HTTP server exposing an NDJSON /run endpoint:
affer serveUse this when integrating affer with editor extensions, local scripts, or custom dashboards.