Skip to content

CLI reference ​

Every command, flag and default below is read directly from the CLI source, so it cannot drift from the shipped behaviour.

Global options ​

FlagDescriptionDefault
-V, --versionoutput the version number—
-v, --verboseverbose output—
--config <path>path to config file"./samaritan.config.yaml"

Commands ​

CommandDescription
initInitialize a new SAMARITAN project
operationCreate a new operation
validateValidate operation definitions
generateGenerate documentation and reports
runExecute an operation
resumeResume a paused or failed operation session
sessionsList saved run sessions from ~/.samaritan/sessions/ (resumable by default)
schemaExport operation JSON schema
diffCompare how steps render across two environments
reportGenerate a Markdown evidence report from a JSONL session log
postmortemAuthor postmortem / incident report (RCA) documents
qrhQuick Reference Handbook for emergency procedures
supportGet support information

init ​

Initialize a new SAMARITAN project

bash
samaritan init [options]
FlagDescriptionDefault
--existingAdd SAMARITAN to existing project—

operation ​

Create a new operation

bash
samaritan operation [options]
FlagDescriptionDefault
--template <name>Use a template (deployment, backup, incident-response, maintenance)—

validate ​

Validate operation definitions

bash
samaritan validate [options] <file>
ArgumentRequiredDescription
fileyesPath to operation YAML file
FlagDescriptionDefault
--strictEnable strict validation with best practices—
-e, --env <environment>Validate for specific environment—
-v, --verboseVerbose output—
--lintLint step commands/scripts with shellcheck (skipped if not installed)—

generate ​

Generate documentation and reports

bash
samaritan generate <subcommand>

generate manual ​

Generate operation manual

bash
samaritan generate manual [options] <operation>
ArgumentRequiredDescription
operationyes
FlagDescriptionDefault
-o, --output <file>Output file path—
-f, --format <format>Output format (markdown, html, confluence, adf)"markdown"
-e, --env <environment>Generate for specific environment—
--all-envsGenerate one manual per environment defined in the operation—
--output-dir <dir>Directory for --all-envs output (default: current directory)—
--prefix <name>Base filename for --all-envs output (default: operation file name); env name is appended as suffix—
--resolve-varsResolve variables to actual values instead of showing placeholders—
--ganttInclude Mermaid Gantt chart for timeline visualization—
--run <manifest>Path to a run manifest YAML to overlay run-specific evidence—

generate docs ​

Generate comprehensive documentation

bash
samaritan generate docs [options] <operation>
ArgumentRequiredDescription
operationyes
FlagDescriptionDefault
-o, --output <file>Output file path—
-f, --format <format>Output format (markdown, html, confluence, adf, pdf)"markdown"
-e, --env <environment>Generate for specific environment—
--resolve-varsResolve variables to actual values instead of showing placeholders—

generate postmortem ​

Generate a postmortem / incident report (RCA) document

bash
samaritan generate postmortem [options] <postmortem>
ArgumentRequiredDescription
postmortemyes
FlagDescriptionDefault
-o, --output <file>Output file path (default: stdout)—
-f, --format <format>Output format (markdown, confluence, adf)"markdown"

generate schedule ​

Generate execution timeline and Gantt chart

bash
samaritan generate schedule [options] <operation>
ArgumentRequiredDescription
operationyes
FlagDescriptionDefault
-o, --output <file>Output file path—

run ​

Execute an operation

bash
samaritan run [options] <operation>
ArgumentRequiredDescription
operationyesOperation file path
FlagDescriptionDefault
-e, --env <environment>Target environment—
--environment <environment>Target environment (alias for --env)—
--auto-approveAuto-approve all manual steps and approvals—
--dry-runPreview full operation plan without executing—
--mockReplay each step expect against its evidence.results output (no tmux); non-zero exit on failure—
-m, --mode <mode>Execution mode: sidecar | manual | automatic | hybrid"sidecar"
--attach <tmux-target>Attach to an existing tmux pane for sidecar capture (e.g. mysession:0.0)—
--var <key=value>Override variable values—
-v, --verboseVerbose output—
--continue-on-errorContinue execution even if steps fail—
--report <dir>Write Markdown evidence report to directory—
--from-step <number>Start at a specific step number; earlier steps are recorded as skipped—
--no-require-evidenceAllow completing a step whose evidence.required is true without capturing evidence—
--pic [name]Focus on steps assigned to this PIC (default: $USER); other operators' steps are auto-skipped—
--no-skip-othersIn --pic focus mode, keep other operators' steps visible/runnable instead of auto-skipping—

resume ​

Resume a paused or failed operation session

bash
samaritan resume [options] <session-id>
ArgumentRequiredDescription
session-idyesSession ID to resume
FlagDescriptionDefault
-v, --verboseVerbose output—
--auto-approveAuto-approve remaining manual steps—
--from-step <number>Resume from specific step number—
--attach <tmux-target>Sidecar: capture from this tmux pane (default: the pane the run was attached to)—
--no-require-evidenceAllow completing a step whose evidence.required is true without capturing evidence—
--pic [name]Focus on steps assigned to this PIC (default: $USER); other operators' steps are auto-skipped (not persisted — re-supply on resume)—
--no-skip-othersIn --pic focus mode, keep other operators' steps visible/runnable instead of auto-skipping—

sessions ​

List saved run sessions from ~/.samaritan/sessions/ (resumable by default)

bash
samaritan sessions [options]
FlagDescriptionDefault
-a, --allInclude completed and cancelled sessions—

schema ​

Export operation JSON schema

bash
samaritan schema [options]
FlagDescriptionDefault
-o, --output <file>Output file (default: stdout)—
-f, --format <format>Output format: json or yaml"json"

diff ​

Compare how steps render across two environments

bash
samaritan diff [options] <operation> <envA> <envB>
ArgumentRequiredDescription
operationyesPath to operation YAML file
envAyesFirst environment to compare
envByesSecond environment to compare
FlagDescriptionDefault
-o, --output <file>Write Markdown report to file (in addition to terminal output)—

report ​

Generate a Markdown evidence report from a JSONL session log

bash
samaritan report <subcommand> [options] <jsonl>
ArgumentRequiredDescription
jsonlyesPath to the JSONL session log file
FlagDescriptionDefault
-o, --output <file>Output file path (default: stdout)—

report merge ​

Merge multiple run sessions of the same operation into one consolidated report

bash
samaritan report merge [options] <sessions>
ArgumentRequiredDescription
sessionsyesTwo or more session IDs to merge
FlagDescriptionDefault
-o, --output <file>Output file path (default: stdout)—

postmortem ​

Author postmortem / incident report (RCA) documents

bash
samaritan postmortem <subcommand>

postmortem from-run ​

Seed a postmortem YAML from a captured run record (events.jsonl or session id)

bash
samaritan postmortem from-run [options] <session-or-jsonl>
ArgumentRequiredDescription
session-or-jsonlyes
FlagDescriptionDefault
-o, --output <file>Output file path (default: stdout)—

postmortem init ​

Write a blank postmortem authoring template

bash
samaritan postmortem init [options]
FlagDescriptionDefault
-o, --output <file>Output file path (default: stdout)—

qrh ​

Quick Reference Handbook for emergency procedures

bash
samaritan qrh <subcommand>

Search emergency procedures

bash
samaritan qrh search [options] <query>
ArgumentRequiredDescription
queryyes
FlagDescriptionDefault
-p, --priority <priority>Filter by priority (P0, P1, P2, P3)—
-c, --category <category>Filter by category (incident, alert, maintenance, emergency)—
-l, --limit <number>Limit number of results—
-v, --verboseShow detailed information—

qrh list ​

List all emergency procedures

bash
samaritan qrh list [options]
FlagDescriptionDefault
-p, --priority <priority>Filter by priority (P0, P1, P2, P3)—
-c, --category <category>Filter by category (incident, alert, maintenance, emergency)—
-v, --verboseShow detailed information—

qrh run ​

Execute an emergency procedure

bash
samaritan qrh run [options] <procedure-id>
ArgumentRequiredDescription
procedure-idyes
FlagDescriptionDefault
-e, --env <environment>Target environment"emergency"
--auto-approveAuto-approve manual steps—
--dry-runShow what would be executed without running—
-v, --verboseVerbose output—

qrh show ​

Show detailed information about a procedure

bash
samaritan qrh show <procedure-id>
ArgumentRequiredDescription
procedure-idyes

support ​

Get support information

bash
samaritan support

Released under the ISC License.