Developer Reference
CLI Reference
Interactive shell
Run astrapatch with no arguments, or astrapatch shell -C <project>, in a terminal.
| Command | What it does |
|---|---|
/analyze | Run analyzers, build the SBOM, correlate advisories |
/findings | List findings from the latest analysis |
/show ID | Show one finding with its evidence |
/fix ID [remediator] | Propose a candidate patch |
/verify [candidate] | Verify a candidate; defaults to the last one |
/report [candidate] | Export the evidence package |
/status | Project, analysis and candidate summary |
/plugins | Analyzers and remediators available here |
/init | Create astrapatch.toml and policy.toml |
/clear, /help, /quit | Clear the screen, show help, leave (also ctrl+d) |
The shell runs commands only; it does not chat or call a model.
One-shot commands
| Command | What it does |
|---|---|
astrapatch init [path] [--force] | Create astrapatch.toml and policy.toml |
astrapatch analyze [path] [--analyzer NAME] [--json] [--fail-on SEVERITY] | Analyze a project |
astrapatch findings [-C path] [--json] | List findings from the latest analysis |
astrapatch remediate -C path --finding ID [--remediator NAME] | Propose a candidate patch |
astrapatch verify -C path --candidate ID | Verify a candidate against the policy |
astrapatch report -C path --candidate ID [--out DIR] | Export the evidence package |
astrapatch plugins | List analyzers and remediators |
astrapatch shell [-C path] | Open the interactive shell |
Exit codes
| Code | Meaning |
|---|---|
0 | Success, or accepted for review |
1 | Rejected, or findings at the --fail-on level |
2 | Usage or configuration error |
3 | Inconclusive |
Environment
| Variable | Effect |
|---|---|
NO_COLOR | Disable colors and animation |
ASTRAPATCH_NO_ANIM | Disable animation, keep colors |
FORCE_COLOR | Force colors when output is not a terminal |
CI | Disable animation |