Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Complete Command Reference

Global Options

OptionDescription
--jsonJSON output mode for scripting and AI agents
--version, -VShow version and exit
--helpShow command help

Root Commands

CommandDescription
pretorin loginAuthenticate with the Pretorin API (--api-key/-k, --api-url)
pretorin logoutClear stored credentials
pretorin whoamiDisplay authentication status
pretorin versionShow CLI version, runtime kind, and resolved executable path
pretorin linkPin the canonical MCP path ~/.pretorin/bin/pretorin at this executable so host config survives reinstalls/upgrades (--force)
pretorin update [VERSION]Update to the latest version, or a specific one. Python-package installs run their own installer; a standalone Linux x86_64 binary verifies and replaces itself (see Self-update); Homebrew is routed to brew upgrade
pretorin mcp-serveStart the MCP server (stdio transport)
pretorin mcp-smoke-testSmoke-test the cross-harness MCP tool surface (check_context, list_tools, get_instructions, get_workflow schema bundling); exits 1 on failure

Self-update

On a standalone Linux x86_64 binary (not Homebrew-managed), pretorin update replaces the running executable itself. Every other install keeps its existing behavior: Python packages upgrade through uv/pipx/pip, Homebrew is pointed at brew upgrade pretorin, and macOS or other-architecture binaries are pointed at the releases page.

What must pass before anything is installed. The release-signing public key is embedded in the binary at build time, and it is the only trust anchor: it verifies the release’s SHA256SUMS signature; the signed manifest then binds the release’s RELEASE-TAG (so a same-version prerelease’s genuinely signed assets cannot answer for a stable release) and the binary’s own checksum; finally the downloaded binary is asked what version it is. Nothing downloaded is executed until the signature and checksum checks have both passed, the replacement is a single atomic rename, and any failure leaves the installed executable byte-identical.

Failures are categorized. A refusal names a machine-readable category — sig-invalid, digest-mismatch, tag-binding, manifest-cutoff, latest-prerelease, not-found, target-not-writable, and others — followed by prose and a pointer to the manual download-and-verify path. Releases published before RELEASE-TAG existed are not installable targets (manifest-cutoff): their tag cannot be authenticated.

When the target is not writable (a root-owned /usr/local/bin, the normal case), Pretorin does not escalate. It verifies the download anyway, keeps the verified binary under ~/.pretorin/updates/, and prints a single sudo command that copies it to a root-owned temporary file in the target directory, re-checks that copy’s checksum, and renames it into place. Only a fully verified artifact is ever retained.

With and without a version argument. No argument resolves the latest release and installs it only if it is strictly newer — it never downgrades, and it never installs a prerelease. An explicit pretorin update <version> may downgrade or reinstall, which is what makes prerelease and rollback installs possible. Because a prerelease binary reports the same X.Y.Z segment as the stable release of that version, moving from a prerelease to its stable release needs the explicit form; the no-argument path would correctly answer “already up to date”.

Already-running processes (an MCP server a host has spawned, for instance) keep the previous version until they restart.

Framework Commands

CommandDescription
pretorin frameworks listList all frameworks
pretorin frameworks get <id>Get framework details
pretorin frameworks families <id>List control families
pretorin frameworks family <fw> <family>Get control family details
pretorin frameworks controls <id> [FAMILY_ID]List controls (--family/-f, --limit/-n)
pretorin frameworks control <fw> <ctrl>Get control details (--brief/-b)
pretorin frameworks metadata <id>Get per-control framework metadata
pretorin frameworks submit-artifact <file>Submit a compliance artifact JSON file

Custom Frameworks

Subcommands of pretorin frameworks for authoring, validating, and uploading custom or forked frameworks. See Custom Frameworks for the full authoring workflow.

CommandDescription
pretorin frameworks init-custom <framework_id>Scaffold a minimal valid unified.json (--title/-t, --output/-o, --force/-f)
pretorin frameworks validate-custom <file>Validate a unified.json artifact against the bundled JSON Schema
pretorin frameworks build-custom <input>Normalize a source catalog (unified, OSCAL, or known custom) into uploadable unified.json (--framework-id/-f required, --output/-o, --force)
pretorin frameworks upload-custom <file>Upload a unified.json artifact as a draft revision (--framework-id/-f, --version-label/-v, --publish)
pretorin frameworks fork-framework <source_id> <new_id>Create a linked-fork draft from an upstream framework (--version-label/-v)
pretorin frameworks rebase-fork <framework_id>Create a rebase draft for a fork against the latest upstream revision (--version-label/-v)
pretorin frameworks revisions <framework_id>List all draft and published revisions for a framework
pretorin frameworks export-oscal <file>Regenerate an OSCAL catalog from a unified.json artifact (--output/-o, --force)

Context Commands

CommandDescription
pretorin context listList systems and frameworks with progress
pretorin context setSet active system/framework context (--system/-s, --framework/-f, --no-verify)
pretorin context showDisplay and validate current active context (--quiet/-q, --check)
pretorin context clearClear active context
pretorin context verifyVerify active context with source attestation (--ttl, --quiet/-q)
pretorin context manifestShow resolved source manifest and evaluate against detected sources (--quiet/-q)

Control Commands

CommandDescription
pretorin control status <ctrl> <status>Start/reopen control authoring; status must be in_progress (--framework-id/-f, --system/-s)
pretorin control context <ctrl>Get rich control context with AI guidance (--framework-id/-f, --system/-s)

Assessment Objective Commands

CommandDescription
pretorin objective listList per-system objective state (--framework-id/-f, --control/-c, --status, --open-only, --only-conflicts, --system/-s, --limit/-l, --offset)
pretorin objective show <implementation_id>Show determination, status provenance, narrative/draft, evidence coverage, approval, and history (--system/-s, --history-limit)
pretorin objective seed <control_id>Idempotently initialize catalog objective rows (--framework-id/-f, --system/-s)
pretorin objective start <implementation_id>Start objective work with the public in_progress status (--reason, --system/-s)
pretorin objective narrative <implementation_id> <text>Update the API-token-authored objective narrative draft (--system/-s)
pretorin objective approve <implementation_id>Approve a grounded objective leaf; never approves the parent control (--system/-s)
pretorin objective reopen <implementation_id>Reopen an approved objective (--system/-s)
pretorin objective link-evidence <implementation_id> <evidence_id>Link evidence at objective grain (--system/-s)
pretorin objective unlink-evidence <implementation_id> <evidence_id>Remove one objective-evidence link (--system/-s)

Evidence Commands

CommandDescription
pretorin evidence create <ctrl> <fw>Create a local evidence file (--name/-n, --description/-d, --artifact-content/--artifact, --type/-t)
pretorin evidence format-markdown [file]Remove section headers and standalone bold labels for SSP-safe evidence bodies (--write, --check)
pretorin evidence listList local evidence files (--framework/-f)
pretorin evidence pushPush local evidence to the platform (--dry-run)
pretorin evidence searchSearch platform evidence (--control-id/-c, --framework-id/-f, --system/-s, --query/-q, --include-attached/--no-attached, --include-unattached/--no-unattached, --min-similarity, --limit/-n, --include-metadata/--compact-metadata, --full-body/--snippet-only, --max-body-chars, --snippet-chars)
pretorin evidence upsert <ctrl> <fw>Find-or-create evidence and link it (--name/-n, --description/-d, --artifact-content/--artifact, --type/-t, --system/-s, --code-file, --code-lines, --code-repo, --code-commit, --coverage-start, --coverage-end, --capture-query, --source-uri, --source-label, --source-locator, --source-excerpt, --capture-method, --cadence-days)
pretorin evidence upload <file> <ctrl> <fw>Upload a file as evidence (--name/-n, --type/-t, --description/-d, --system/-s)
pretorin evidence link <evidence_id> <ctrl>Link evidence to a control (--framework-id/-f, --system/-s, --expectation-key, --expectation-item, --unbound-reason)
pretorin evidence link-cci <evidence_id> <cci_implementation_id>Link evidence to a per-system CCI implementation row (--system/-s, --override-system-mismatch, --override-reason)
pretorin evidence link-stig <evidence_id> <stig_rule_id>Link evidence to a STIG rule workflow (lazy-creates the row) (--system/-s, --override-system-mismatch, --override-reason)
pretorin evidence mark-current <evidence_id>Re-affirm evidence freshness; bumps expires_at by the refresh cadence and resolves any expiring/expired monitoring events (--system/-s)
pretorin evidence validate <evidence_id>Compare recorded source-material hash before re-verifying or replacing a drifted Markdown artifact (--system/-s, --source-root, --artifact-content/--artifact, --description/-d, --drift-note)
pretorin evidence delete <evidence_id>Delete an evidence item (--system/-s, --framework-id/-f, --yes/-y)

Evidence Attestation

Subcommands of pretorin evidence attestation for fetching and verifying DSSE attestation envelopes per ADR 0003.

CommandDescription
pretorin evidence attestation get <evidence_id>Fetch the latest DSSE envelope for an evidence record (--lineage, --include-archived); run as pretorin --json evidence attestation get … to pipe into cosign verify-blob-attestation
pretorin evidence attestation verify <evidence_id>Verify the DSSE signature against the deployment’s signing-key registry (--env, --key-fingerprint)

Narrative Commands

CommandDescription
pretorin narrative create <ctrl> <fw>Create a local narrative file (--content/-c, --name/-n, --ai-generated)
pretorin narrative listList local narrative files (--framework/-f)
pretorin narrative pushPush local narratives to the platform (--dry-run)
pretorin narrative push-file <ctrl> <fw> <sys> <file>Push a single narrative file to the platform
pretorin narrative get <ctrl> <fw>Get current control narrative (--system/-s)

Issues Commands

CommandDescription
pretorin issues create <ctrl> <fw>Create a local issue file (--content/-c, --name/-n, --title/-t, --likelihood, --impact, --risk-basis)
pretorin issues list [ctrl] [fw]List issues — platform (--system/-s) or local (--local, --framework/-f)
pretorin issues inbox [fw]List issues across a whole system/framework (--status, --source, --control/-c, --limit, --offset, --system/-s)
pretorin issues pushPush local issues to the platform (--dry-run)
pretorin issues add <ctrl> <fw>Add a canonical Issue and provisional risk (--title/-t, --content/-c, --likelihood, --impact, --risk-basis, --detected-at, --idempotency-key, --system/-s)
pretorin issues risk-history <control_impl_id> <issue_id>Read the immutable risk-evaluation history (--limit)
pretorin issues risk-add <control_impl_id> <issue_id>Append an API-authored provisional evaluation (--basis required, --likelihood, --impact, --residual-likelihood, --residual-impact)
pretorin issues acceptance-history <control_impl_id> <issue_id>Read the human-governed risk-acceptance history (--limit)
pretorin issues poam-set <control_impl_id> <issue_id>Replace Issue-owned formal POA&M facts — full replacement (--weakness-id, --detection-source, --asset-id, --point-of-contact, --vendor-name, --vendor-product, --vendor-check-in, --vendor-dependency/--no-vendor-dependency, --operational-requirement, --operational-requirement-id, --deviation-rationale, --false-positive, --comments)
pretorin issues plan-list <control_impl_id> <issue_id>List an Issue’s corrective plans, newest first (--limit)
pretorin issues plan-get <control_impl_id> <issue_id> <plan_id>Read a single plan with its actions
pretorin issues plan-create <control_impl_id> <issue_id>Draft a versioned corrective plan (--title/-t, --narrative/-n required; --kind remediation|cmmc_opa, --owner-id, --target-date, --resources, --opa-basis, --review-frequency-days, --next-review-at)
pretorin issues plan-update <control_impl_id> <issue_id> <plan_id>Replace a draft plan’s fields — same required/optional flags as plan-create
pretorin issues plan-submit <control_impl_id> <issue_id> <plan_id>Submit a draft plan for human approval review
pretorin issues risk-confirm <control_impl_id> <issue_id>Confirm the Issue’s risk determination (--basis required, --likelihood, --impact, --residual-likelihood, --residual-impact)
pretorin issues accept <control_impl_id> <issue_id> <risk_evaluation_id>Formally accept the confirmed risk (--rationale, --expires-at, --review-frequency-days, --next-review-at, --evidence-id)
pretorin issues acceptance-revoke <control_impl_id> <issue_id> <acceptance_id>Withdraw an active risk acceptance (--reason)
pretorin issues plan-approve/plan-reject <control_impl_id> <issue_id> <plan_id>Approve (--note) or reject (--reason) a submitted plan
pretorin issues plan-opa-review <control_impl_id> <issue_id> <plan_id>Review an approved CMMC OPA (--note, --next-review-at, --evidence-id)
pretorin issues plan-complete <control_impl_id> <issue_id> <plan_id>Complete an approved plan once every action is completed (--note) — moves the Issue to verification_pending
pretorin issues verify <control_impl_id> <issue_id>Verify treatment and close the Issue (--note) — the canonical closure command
pretorin issues void <control_impl_id> <issue_id>Void an invalid finding (--reason, --force when already closed) — terminal and irreversible
pretorin issues action-list <control_impl_id> <issue_id> <plan_id>List a plan’s actions
pretorin issues action-get <control_impl_id> <issue_id> <plan_id> <action_id>Read a single action
pretorin issues action-add <control_impl_id> <issue_id> <plan_id>Add an action to a draft plan (--title/-t required; --kind, --description/-d, --owner-id, --target-date, --evidence-id, --ticket-provider, --ticket-id, --ticket-url)
pretorin issues action-update <control_impl_id> <issue_id> <plan_id> <action_id>Replace a draft action’s fields — same flags as action-add
pretorin issues action-delete <control_impl_id> <issue_id> <plan_id> <action_id>Remove an action from a draft plan
pretorin issues action-transition <control_impl_id> <issue_id> <plan_id> <action_id>Execute an action on an approved plan (--status pending|in_progress|blocked|completed|cancelled required; --note required for blocked/cancelled, --evidence-id)
pretorin issues resolve <ctrl> <fw> <issue_id>Resolve or reopen a control issue (--system/-s, --resolution-note/--justification, --reopen)
pretorin issues update <ctrl> <fw> <issue_id>Edit content/pinned/closure note without changing resolution state (--system/-s, --content/-c, --pinned/--no-pinned, --resolution-note/--justification)

Notes Commands (Deprecated alias of issues)

The notes command group is a deprecated alias for issues; use issues for new workflows. The commands accept the same arguments and call the same platform APIs.

CommandDescription
pretorin notes create <ctrl> <fw>Create a local note file (--content/-c, --name/-n)
pretorin notes list [ctrl] [fw]List notes — platform (--system/-s) or local (--local, --framework/-f)
pretorin notes pushPush local notes to the platform (--dry-run)
pretorin notes add <ctrl> <fw>Add a note directly on the platform (--content/-c, --system/-s)
pretorin notes resolve <ctrl> <fw> <note_id>Resolve or reopen a control note (--system/-s, --resolution-note/--justification, --reopen, --content/-c, --pinned/--no-pinned)

Monitoring Commands

CommandDescription
pretorin monitoring pushPush a monitoring event (--system/-s, --framework/-f, --title/-t, --event-type, --severity, --control/-c, --description/-d, --update-control-status)

Policy Commands

CommandDescription
pretorin policy listList org policies available for questionnaire work
pretorin policy createValidate/preview a YAML or JSON custom definition (`–definition PATH
pretorin policy definitionRead a policy’s resolved definition state and revision (--policy)
pretorin policy configureValidate/preview a revision-safe replacement (--policy, --definition, --expected-revision all required; optional --reset-authoring); add --apply to write
pretorin policy showShow persisted policy questionnaire state (--policy)
pretorin policy generateGenerate a ready policy and wait for the durable job (--policy required, --review/--no-review, optional --system)
pretorin policy reviewRun AI review and wait for its durable job (--policy)
pretorin policy submitSubmit a ready policy for human review; never approves (--policy)
pretorin policy mappingsList mappings in one framework (--policy, --framework)
pretorin policy mapPreview framework-scoped mapping replacement (--policy, --framework both required; --family, --control); add --apply to write
pretorin policy narrativeShow generated policy narrative sections in order (--policy selector required)
pretorin policy reopenReopen an approved policy for editing (regress to draft) (--policy required)
pretorin policy populateDraft policy questionnaire updates from the current workspace (--policy, --path/-p, --apply)

Scope Commands

CommandDescription
pretorin scope showShow scope questionnaire state and review findings (--system/-s, --framework-id/-f)
pretorin scope reopenReopen a completed scope for editing (regress to in_progress) (--system/-s, --framework-id/-f)
pretorin scope populateDraft scope questionnaire updates from the current workspace (--system/-s, --framework-id/-f, --path/-p, --apply)
pretorin scope target-tier [tier]Declare, clear, or read the target scale tier (--clear, --system/-s, --framework-id/-f)

Scope Artifacts

Subcommands of pretorin scope artifacts for managing the auditor-required system_spec artifacts (asset inventory + 4 snapshot kinds). The inventory group wraps the recipe-driven scan flow and posts a classified diff (added / modified / decommissioned) against the platform inventory.

CommandDescription
pretorin scope artifacts listList the 5 system_spec artifact kinds with required/toggle/attest state (--system/-s)
pretorin scope artifacts toggle <kind>Toggle an artifact kind required/optional; rationale required on toggle-off (--system/-s, --optional/--required, --rationale/-r)
pretorin scope artifacts inventory showShow the current (or historical) asset inventory (--system/-s, --as-of)
pretorin scope artifacts inventory upload <csv>Parse a CSV client-side, classify rows, and post a single inventory diff (--system/-s, --yes/-y)
pretorin scope artifacts inventory scan <source>Run a recipe-driven scan (aws, azure, k8s, iac-workspace) and post the resulting diff (--system/-s, --yes/-y, --dry-run, --namespace-env k8s only: JSON namespace→environment overrides)

Agent Commands

CommandDescription
pretorin agent run "<task>"Run a compliance task (--skill/-s, --model/-m, --base-url, --working-dir/-w, --no-stream, --legacy, --max-turns, --no-mcp)
pretorin agent doctorValidate Codex runtime setup
pretorin agent installDownload the pinned Codex binary
pretorin agent versionShow pinned Codex version and install status
pretorin agent skillsList available agent skills
pretorin agent mcp-listList configured MCP servers for the agent
pretorin agent mcp-add <name> <transport> <cmd>Add an MCP server configuration (--arg/-a, --scope)
pretorin agent mcp-remove <name>Remove an MCP server configuration

Plan Commands

Operator-facing view onto the agent-authored work plans persisted locally under ~/.pretorin/plans/. Routed work moves through draftactivecompleted/cancelled. The MCP caller declares and activates the execution contract; this CLI remains an operator-facing read/cancel surface.

CommandDescription
pretorin plan listList recent plans, newest first (--state/-s draft|active|completed|cancelled, --workflow/-w, --system, --framework, --control, --limit/-n)
pretorin plan show <plan_id>Show a single plan’s full details; plan_id accepts a full UUID or unique prefix
pretorin plan cancel <plan_id>Cancel a draft or active plan; refuses already-completed plans, no-op on already-cancelled (--reason/-r, --yes/-y)
pretorin plan pruneRemove old terminal (completed/cancelled) plans and unactivated drafts; active plans never removed (--older-than-days/-d default 30; terminal age uses terminal timestamp and draft age uses created_at; --dry-run/-n, --include-corrupt, --yes/-y)

Skill Commands

CommandDescription
pretorin skill installInstall the Pretorin skill for AI coding agents (--agent/-a, --path/-p, --force/-f)
pretorin skill uninstallUninstall the Pretorin skill (--agent/-a, --path/-p)
pretorin skill statusShow installation status of the Pretorin skill
pretorin skill list-agentsList all known agents and their skill directories

Review Commands

CommandDescription
pretorin review runReview code against a control (--control-id/-c, --framework-id/-f, --system/-s, --path/-p, --local, --output-dir/-o)
pretorin review statusCheck implementation status for a control (--control-id/-c, --framework-id/-f, --system/-s)

Config Commands

CommandDescription
pretorin config listList all configuration
pretorin config get <key>Get a config value
pretorin config set <key> <value>Set a config value
pretorin config pathShow config file path

Customer Deployment Commands

Operate a customer-managed Kubernetes deployment. Kubernetes commands accept an explicit --context; API-backed license status uses the active Pretorin CLI configuration and authentication.

CommandDescription
pretorin deployment identity ensureCreate the persistent deployment ID once and preserve it on later runs (--context, --namespace/-n)
pretorin deployment identity showPrint the non-secret deployment ID (--context, --namespace/-n)
pretorin deployment license requestWrite a non-secret issuance request (--customer-id, --customer-name, --max-systems, --duration-days required; --context, --namespace/-n, --output)
pretorin deployment license installInstall or renew the signed token and public trust bundle without a rollout (--license-file, --trust-bundle required; --context, --namespace/-n)
pretorin deployment license statusRead redacted validity and deployment-wide system usage from the authenticated public API
pretorin deployment flux bootstrapCreate customer values, signed OCI sources, foundation release, and the release Kustomization (--customer-values, --chart-registry, --release-repository, --release-public-key required; --update-mode, --channel, --context, --namespace/-n, --dry-run)
pretorin deployment flux suspendKeep discovering verified candidates but suspend applying them (--context)
pretorin deployment flux resumeApprove and immediately apply the discovered candidate (--context)
pretorin deployment flux statusReport candidate digest, apply state, and component readiness (--context, --namespace/-n)

Campaign Commands

CommandDescription
pretorin campaign controlsRun bulk control narrative/evidence campaign (--system, --framework-id, --mode, --family, --controls, --all-controls, --all-open-issues, --issue-source, --issue-control, --issue-family, --include-resolved, --artifacts, --review-job, --concurrency, --max-retries, --checkpoint, --apply, --output)
pretorin campaign policyRun bulk policy questionnaire campaign (--mode, --policies, --all-incomplete, --system, --concurrency, --max-retries, --checkpoint, --apply, --output)
pretorin campaign scopeRun bulk scope questionnaire campaign (--system, --framework-id, --mode, --concurrency, --max-retries, --checkpoint, --apply, --output)
pretorin campaign statusShow campaign progress from a checkpoint file (--checkpoint, --output)

Campaign Modes

DomainModeDescription
controlsinitialDraft new narratives and evidence for controls
controlsissues-fixAddress platform issues on existing controls
controlsnotes-fixDeprecated alias for issues-fix
controlsreview-fixFix findings from a family review job
policyanswerGenerate answers for policy questions
policyreview-fixFix findings from a policy review
scopeanswerGenerate answers for scope questions
scopereview-fixFix findings from a scope review

Vendor Commands

CommandDescription
pretorin vendor listList all vendors in the organization; inactive vendors are hidden by default (--search, --type/-t, --risk-tier, --owner-user-id, --assessment-status, --lifecycle-status, --include-inactive, --sort-by, --sort-dir)
pretorin vendor create <name>Create a vendor (--type/-t, --description/-d, --authorization-level/-a, --owner-user-id, --inherent-risk)
pretorin vendor get <vendor_id>Get vendor details
pretorin vendor update <vendor_id>Update vendor fields (--name, --description/-d, --type/-t, --authorization-level/-a, --owner-user-id, --inherent-risk)
pretorin vendor lifecycle <vendor_id> <target_status>Transition vendor lifecycle to onboarding/active/inactive (--reason required, ≤500 chars; needs vendor.pii scope)
pretorin vendor delete <vendor_id>Delete a vendor (--force/-f)
pretorin vendor history <vendor_id>Show vendor audit and evidence history (--limit)
pretorin vendor dashboardOrg-wide TPRM reporting dashboard: posture counts, tier/provider breakdowns, 5×5 residual heatmap, and document/contract expiry lists (--horizon-days 1–365, default 90; for JSON use the root option, pretorin --json vendor dashboard). Organization-wide; needs an org-scoped vendor.pii/admin token (system-scoped tokens are rejected)
pretorin vendor upload-doc <vendor_id> <file>Upload a vendor evidence document (--name/-n, --description/-d, --attestation-type, --expires-at, --refresh-cadence-days)
pretorin vendor list-docs <vendor_id>List documents linked to a vendor
pretorin vendor contact list <vendor_id>List a vendor’s contacts (needs vendor.pii scope)
pretorin vendor contact add <vendor_id>Add a contact (--name required; --email, --title, --phone, --is-primary/--no-is-primary, --notes)
pretorin vendor contact update <vendor_id> <contact_id>Update a contact (same optional flags)
pretorin vendor contact delete <vendor_id> <contact_id>Delete a contact (--force/-f)
pretorin vendor contract list <vendor_id>List a vendor’s contracts/SLAs/DPAs; renders read-only status/is_expired (needs vendor.pii scope)
pretorin vendor contract add <vendor_id>Add a contract (--name, --contract-type required; --start-date, --end-date, --renewal-date, --auto-renew/--no-auto-renew, --notice-period-days, --terminated-at, --document-evidence-item-id, --notes)
pretorin vendor contract update <vendor_id> <contract_id>Update a contract (same optional flags)
pretorin vendor contract delete <vendor_id> <contract_id>Delete a contract (--force/-f)
pretorin vendor systems list <vendor_id>List the systems a vendor serves
pretorin vendor systems attach <vendor_id>Attach systems to a vendor (--system-id, repeatable; at least one required)
pretorin vendor systems detach <vendor_id> <system_id>Detach a system from a vendor (--force/-f)
pretorin vendor residual-acceptance sign <vendor_id>Sign AO acceptance of a vendor’s residual risk for one attached system (--system-id required, --note optional)

Vendor Assessment Templates

Subcommands of pretorin vendor template for managing the org-scoped questionnaire templates that assessments are launched from.

CommandDescription
pretorin vendor template listList vendor assessment templates
pretorin vendor template get <template_id>Get a template with its sections and questions
pretorin vendor template import <file>Import a SIG-Lite or CAIQ-Lite xlsx workbook as a template; previews unless --apply (--source-format required, --apply, --acknowledge-license-rights)
pretorin vendor template delete <template_id>Delete an org-scoped custom or imported template (--force/-f)

Vendor Assessments

Subcommands of pretorin vendor assessment for running a vendor through an assessment: launch from a template, save answers, submit, AI-score, and finalize with reviewer residual ratings.

CommandDescription
pretorin vendor assessment launch <vendor_id>Launch an assessment for a vendor from a template (--template-id required)
pretorin vendor assessment list <vendor_id>List assessments for a vendor
pretorin vendor assessment get <vendor_id> <assessment_id>Get an assessment with its template snapshot and responses
pretorin vendor assessment save-responses <vendor_id> <assessment_id>Upsert assessment answers from JSON (--answers-json, --answers-file)
pretorin vendor assessment submit <vendor_id> <assessment_id>Submit an in-progress assessment
pretorin vendor assessment score <vendor_id> <assessment_id>Run advisory AI scoring for a submitted assessment
pretorin vendor assessment review <vendor_id> <assessment_id>Finalize an assessment with reviewer residual risk ratings (--residual-likelihood, --residual-impact required, --acknowledge-no-ai-review)
pretorin vendor assessment send <vendor_id> <assessment_id>Send an assessment through the vendor portal (--recipient-email repeatable, --expires-in-days, --message)
pretorin vendor assessment resend <vendor_id> <assessment_id>Rotate and resend the vendor portal link (--recipient-email repeatable, --expires-in-days, --message)
pretorin vendor assessment revoke <vendor_id> <assessment_id>Revoke the vendor portal link (--reason optional)

Vendor Types

csp, saas, managed_service, internal

Vendor Risk Bands

low, moderate, high, critical. medium is a deprecated input alias for moderate.

Risk Commands

Manage a system’s risk register. Risks are system-scoped except for the org-level risk library subgroup. See Risk Management for the full workflow.

CommandDescription
pretorin risk list [--system <system_id>]List risks for a system; defaults to active context (--category, --risk-level, --status)
pretorin risk show <risk_id> [--system <system_id>]Show full risk including eager-loaded artifact links; defaults to active context
pretorin risk create [--system <system_id>]Create a custom risk (--title, --category, --description/-d, --cia-category, --likelihood, --impact, --owner-id, --treatment, --treatment-plan, --treatment-due-date, --review-frequency-days, --framework, --suggested-control-family repeatable)
pretorin risk seed [--system <system_id>]Seed risks from library templates (--framework, --template-id repeatable)
pretorin risk update <risk_id> [--system <system_id>]Update fields including mitigation (--title, --description/-d, --category, --cia-category, --likelihood, --impact, --owner-id, --status, --review-frequency-days, --treatment, --treatment-plan, --treatment-due-date)
pretorin risk link add <risk_id> [--system <system_id>]Attach an artifact (--link-type, exactly one of --control + --framework, --evidence, --finding, --vendor, --monitoring-event)
pretorin risk link rm <risk_id> <link_id> [--system <system_id>]Remove a risk artifact link
pretorin risk refresh-summary <risk_id> [--system <system_id>]Re-score risk and trigger best-effort AI summary regeneration
pretorin risk posture [--system <system_id>]System-scoped risk posture summary (inherent vs residual, overdue, top 5)
pretorin risk attest <risk_id> [--system <system_id>]Produce a DSSE-signed attestation over the current risk state (--type, --statement/-m)
pretorin risk attestations <risk_id> [--system <system_id>]List DSSE attestation envelopes for a risk (newest first)
pretorin risk library listBrowse the org-level risk template library (--category)

Risk Attestation Types

residual_accepted, mitigation_approved, inherent_validated

Risk Treatment Values

mitigate, accept, transfer, avoid

contributes_to_risk, mitigates_risk, evidence_of_risk

STIG Commands

CommandDescription
pretorin stig listList STIG benchmarks (--technology-area/-t, --product/-p, --limit/-l)
pretorin stig show <stig_id>Show STIG benchmark detail with severity breakdown
pretorin stig rules <stig_id>List rules for a benchmark (--severity/-s, --cci, --limit/-l)
pretorin stig applicableShow applicable STIGs for the active system (--system/-s)
pretorin stig inferAI-infer applicable STIGs from system profile (--system/-s)
pretorin stig checklistsList per-asset STIG checklists (--system/-s, --asset/-a, --limit/-l, --offset)
pretorin stig create-checklistCreate a checklist bound to a benchmark + asset (--benchmark/-b, --asset/-a, --title, --system/-s)
pretorin stig export <checklist_id>Download a regenerated .ckl/.cklb, print SHA-256 (--format/-f, --output/-o, --system/-s, --force to overwrite a server-chosen filename)
pretorin stig import <checklist_id> <file>Import a .ckl/.cklb (review axis) or XCCDF (--format xccdf, test axis) (--format/-f, --system/-s)

CCI Commands

CommandDescription
pretorin cci listList CCIs (--control/-c, --status, --limit/-l)
pretorin cci show <cci_id>Show CCI detail with a bounded linked-rule page (--stig, --limit/-l, --offset)
pretorin cci chain <control_id>Full traceability chain: Control -> CCIs -> SRGs -> STIG rules (--system/-s)
pretorin cci impl <cci_uuid>Show the per-system CCI implementation row (status, narrative, evidence_ids, eMASS fields) — 404 means uninitialized (--system/-s)

OSCAL Artifact Commands

Read-only access to validated OSCAL export artifacts. See OSCAL Artifacts.

CommandDescription
pretorin oscal artifacts listList validated OSCAL artifacts for a system (--type/-t, --framework/-f, --assessment/-a, --system/-s, --limit/-l, --offset)
pretorin oscal artifacts show <artifact_id>Show artifact metadata and the two-tier validation report (--system/-s)
pretorin oscal artifacts download <artifact_id>Download an artifact, verifying SHA-256 (--output/-o, --verify/--no-verify, --system/-s)
pretorin oscal artifacts latest --type <type>Show (or --download/-d) the latest validated artifact of a type (--framework/-f, --assessment/-a, --output/-o, --verify/--no-verify, --system/-s)

Preflight & Source Resolution Commands

Preflight verifies that the source material each recipe needs is actually reachable on this host before evidence work begins, then seeds the scope’s active recipe set from what’s runnable. Artifacts are per-scope (system + framework). See Recipes for how recipes consume sources.

CommandDescription
pretorin preflight showShow the current preflight verdict for the active (or given) scope (--system, --framework)
pretorin preflight verifyProbe every bound resolver, persist results, and show the refreshed verdict (--system, --framework)
pretorin preflight initBind sensible host-local defaults for this machine, then optionally verify (--workspace, --replace, --verify/--no-verify, --system, --framework)
pretorin preflight provisionPropose (and with --apply seed) the active recipe set from the ready-set (--apply, --include-unofficial, --system, --framework)
pretorin preflight bind <kind>Add one resolver to a source kind’s collection, creating the artifact if needed (--type required, --name, --constraint, --scope repeatable, --probe, --param repeatable, --capability repeatable, --recommended, --system, --framework)
pretorin preflight unbind <kind>Remove one resolver binding from a source kind by display name (--name required, --system, --framework)

Recipe Commands

Recipes are markdown + script playbooks the calling AI agent executes. See Recipes for authoring guidance.

CommandDescription
pretorin recipe listList loaded non-deprecated recipes with id, name, tier, author, and source path (--tier, --source, --produces, --system, --framework, --active, --include-unavailable, --include-deprecated)
pretorin recipe show <recipe_id>Display a recipe’s manifest, body, and (with --sources) all loader paths
pretorin recipe new <recipe_id>Scaffold a new recipe directory (--location user/project/builtin, --author, --name)
pretorin recipe validate <recipe_id>Validate a recipe’s manifest, scripts, and description quality (--path for path-based override)
pretorin recipe run <recipe_id>Run a recipe’s script locally for testing (--script/-s, --param/-p repeatable, --path, --system, --framework, --no-context)
pretorin recipe execute <recipe_id>Run a recipe non-interactively with platform input resolution and declared submit routing (--script/-s, --param/-p repeatable, --path, --system, --framework, --submit)
pretorin recipe activeShow the scope’s active recipe set + a provisioning proposal (--system, --framework)
pretorin recipe activate <recipe_id...>Add recipe(s) to the scope’s active set (--system, --framework)
pretorin recipe deactivate <recipe_id...>Remove recipe(s) from the scope’s active set (--system, --framework)

Scanning

The legacy pretorin scan command was removed when the recipes system landed. Scanning now happens through built-in recipes. A calling AI agent invokes them over MCP; from the CLI you can run the same recipes with pretorin recipe run (local testing) or pretorin recipe execute (non-interactive, with declared submit routing). See STIG Scanning for the recipe-based workflow.

Configuration and compliance scanners:

Recipe IDWrapsCLI requirement
inspec-baselineChef InSpecinspec
openscap-baselineOpenSCAPoscap
cloud-aws-baselineAWS APIsaws
cloud-azure-baselineAzure APIsaz
manual-attestationHuman attestation

Asset-inventory scanners, driven by pretorin scope artifacts inventory scan <source>. Each returns the same {added, modified, decommissioned} diff envelope against the platform inventory:

<source>Recipe IDEnumeratesCLI requirement
awsasset-inventory-aws-baselineEC2 instancesaws
azureasset-inventory-azure-baselineCompute VMsaz
k8sasset-inventory-k8s-baselineNodes, workload controllers, LoadBalancer Serviceskubectl
iac-workspaceasset-inventory-iac-workspaceResources declared in a workspace repo

pretorin recipe list prints the full loaded set, including any project- or user-folder recipes.

Deprecated Commands

CommandDescription
pretorin harness initDeprecated: initialize harness config
pretorin harness doctorDeprecated: validate harness setup
pretorin harness run "<task>"Deprecated: run task through harness backend