CLI reference
Overview
Options, exit codes, and output formats shared by every Socotra command.
Global options apply to every command and must appear before the command name.
Global options
Output formats
Exit code summary
Change types and risk levels
Detailed exit codes in CI
When --detailed-exit-codes is used, scripts can distinguish "nothing to do" (exit 0) from "changes applied" (exit 2). Useful for gating follow-up steps.
ci.ps1
dotnet socotra plan --detailed-exit-codes
if ($LASTEXITCODE -eq 2) {
dotnet socotra apply --auto-approve
git add .
git commit -m "Apply socotra changes"
}Schema 1.1 · CLI 1.0