Skip to content
astrapatchastrapatch

Developer Reference

CLI Reference

Interactive shell

Run astrapatch with no arguments, or astrapatch shell -C <project>, in a terminal.

CommandWhat it does
/analyzeRun analyzers, build the SBOM, correlate advisories
/findingsList findings from the latest analysis
/show IDShow 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
/statusProject, analysis and candidate summary
/pluginsAnalyzers and remediators available here
/initCreate astrapatch.toml and policy.toml
/clear, /help, /quitClear the screen, show help, leave (also ctrl+d)

The shell runs commands only; it does not chat or call a model.

One-shot commands

CommandWhat 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 IDVerify a candidate against the policy
astrapatch report -C path --candidate ID [--out DIR]Export the evidence package
astrapatch pluginsList analyzers and remediators
astrapatch shell [-C path]Open the interactive shell

Exit codes

CodeMeaning
0Success, or accepted for review
1Rejected, or findings at the --fail-on level
2Usage or configuration error
3Inconclusive

Environment

VariableEffect
NO_COLORDisable colors and animation
ASTRAPATCH_NO_ANIMDisable animation, keep colors
FORCE_COLORForce colors when output is not a terminal
CIDisable animation