Skip to content

CLI reference ​

Global -C <directory> fixes the project root. Run shipwitness --help or shipwitness <command> --help for flags.

CommandBehavior
initCreates a new shipwitness.json from discovered scripts. Existing files stay intact.
doctorReports Node, Chromium availability, the detected project and the effective plan.
verify --planPreviews the check order and required permissions.
verify --only build,test --approveRuns selected scripts after authorization.
verify --changed --base HEAD~1Includes changed and untracked files in the scope of the secret scan. Other checks still apply to the whole project or configured targets.
verify --ciPrints a JSON result with a run ID, statuses and release policy.
report [run]Reads the latest or selected saved run. Set --format html to write standalone HTML to standard output.
report <current> --compare <previous>Compares statuses and durations in JSON.
dashboardServes local runs and evidence at 127.0.0.1:4178 by default.
mcpServes tools over stdio. Execution requires startup authorization.

--allow-network authorizes loopback checks and enables the network side of auditing. Add --allow-origin https://example.org for an exact external origin. The audit check also needs --approve.

  • verify --docker runs approved npm scripts in disposable Linux containers.
  • verify --config <path> reads an alternate configuration relative to the project. A missing explicit file is an error.
  • init --interactive lets you choose mandatory checks from a terminal.
  • gate checks that mandatory checks passed against the current Git working tree.
  • report --share exports check metadata without raw logs, screenshots, or requirement names.
  • report --verify-integrity checks the stored SHA-256 hashes for a run and its evidence.

Exit code 0 requires at least one passed check, all mandatory checks passed, and every selected check passed or skipped. Code 1 means verification did not satisfy those criteria. Code 2 means invocation, plan, or storage failure. A handled cancellation returns 130.