CLI, HTTP API & Operations Console
Every command, flag, and HTTP endpoint below is verified directly against cmd/codespider/{main,cli,api}.go at commit fed7f5c. Items marked new were added afterwards and verified against ee66683.
CLI Subcommands
Section titled “CLI Subcommands”Run Daemon (Default)
Section titled “Run Daemon (Default)”codespider -f /etc/codespider/codespider.yamlcodespider review — One-Shot PR Review
Section titled “codespider review — One-Shot PR Review”codespider review [-f codespider.yaml] [--dry-run] [--offline] [--sarif out.sarif] <owner/repo#pr>| Flag | Description |
|---|---|
-f <path> |
Path to codespider.yaml |
--repo <owner/repo> |
Repository slug (alternative to positional owner/repo#pr) |
--pr <number> |
Pull request number |
--dry-run |
Run review without posting Gitea comments or mutating state.json |
--offline |
Run deterministic AST/CFG analyzers only (zero LLM calls) |
--sarif <path> |
Export findings and secret alerts to SARIF 2.1.0 JSON |
codespider bench — Reproducible Benchmark Harness
Section titled “codespider bench — Reproducible Benchmark Harness”codespider bench --offline --dataset testdata/benchmarks/local_suite.jsonlcodespider bench --offline --split all --json| Flag | Default | Description |
|---|---|---|
--dataset <path> |
testdata/benchmarks/local_suite.jsonl |
Path to JSONL benchmark dataset |
--split <name> |
"" |
Run dev, validation, holdout, or all |
--json |
false |
Print benchmark summary as JSON |
--offline |
true |
Run deterministic offline benchmark |
codespider healthcheck
Section titled “codespider healthcheck”codespider healthcheck -addr http://127.0.0.1:8080/healthzExits 0 on HTTP < 300, 1 on network error or HTTP >= 300 (3-second timeout).
codespider version and codespider update (new)
Section titled “codespider version and codespider update (new)”codespider version # prints the build version, "dev" for unstamped buildscodespider update # compares the build with the highest stable vMAJOR.MINOR.PATCH tagupdate queries the public tag list on api.github.com, ignores pre-release tags, and prints the matching docker pull, docker compose pull && docker compose up -d, or git checkout command when a newer release exists. It never replaces the running binary. Release images are stamped with their tag through the VERSION build argument; a source build can stamp one with go build -ldflags "-X main.version=v1.2.3" ./cmd/codespider. An unstamped build reports dev and makes no network request.
The daemon only checks periodically when daemon.update_check_hours is greater than zero. It then logs a newer release once and adds version and update to the /status JSON.
HTTP & Operations Console Endpoints
Section titled “HTTP & Operations Console Endpoints”| Method | Endpoint | Auth | Purpose |
|---|---|---|---|
POST |
/webhook |
HMAC (X-Gitea-Signature) |
Receives Gitea pull_request, issue_comment, and pull_request_comment events |
GET |
/healthz |
Public | Process liveness probe |
GET |
/readyz |
Public | Service readiness probe |
GET |
/status |
admin_token |
Service status, worker count, metrics, and recent runs JSON. New: includes version, plus an update object when daemon.update_check_hours is set. |
GET |
/metrics |
admin_token |
Prometheus metrics exposition |
GET |
/events |
admin_token |
Real-time SSE agent activity stream |
GET |
/ |
admin_token |
Embedded Operations Console & Dry-Run Playground |
GET |
/api/reviews |
admin_token |
Paginated review history (?offset=&limit=&status=&repo=) |
GET |
/api/org-graph |
admin_token |
Cross-repository dependency graph JSON |
GET |
/api/languages |
admin_token |
Active polyglot analyzer capability statuses |
GET |
/api/skills |
admin_token |
Discovered SKILL.md modules |
GET |
/api/audit |
admin_token |
Recent policy/audit events (?limit=) |
GET |
/api/benchmarks |
admin_token |
Runs offline dev/validation/holdout splits |
POST |
/api/replay |
admin_token |
Executes zero-mutation Shadow Replay ({repo, pr_number, skills, offline}) |

