Skip to main content
ShipSafe

● CLI Reference

Command line. Receipts.

Scriptable scans, JSON output, exit codes your CI already understands. No daemon, no config required.

▸ Install

Install

No install needed. Run via npx:

TERMINAL
npx @ship-safe/cli <command>

Or install globally: npm i -g shipsafe

▸ Commands

Commands

Seven commands. Most days you only need scan.

SCAN

scan

Scan a directory or file for security vulnerabilities.

TERMINAL
shipsafe scan [path]

▸ Arguments

[path]Path to scan. Defaults to current directory (".").

▸ Flags

-o, --output <format>Output format: table (default), json, or sarif.
-s, --severity <level>Minimum severity to report: critical, high, medium, low (default: low).
--ciCI mode. Exits with code 1 if findings match the severity threshold. Use in GitHub Actions to block PRs.
--uploadUpload results to your ShipSafe dashboard. Happens automatically when logged in.
--api-url <url>API URL for self-hosted ShipSafe. Default: https://ship-safe.co

▸ Examples

Scan current directory

TERMINAL
npx @ship-safe/cli scan .

Only show high/critical findings

TERMINAL
npx @ship-safe/cli scan src/ --severity high

JSON output for scripting

TERMINAL
npx @ship-safe/cli scan . --output json

CI mode: fail only on critical

TERMINAL
npx @ship-safe/cli scan . --ci --severity critical

LOGIN

login

Log in to your ShipSafe account. Opens your browser for authentication. Once logged in, scan results automatically sync to your dashboard.

TERMINAL
shipsafe login

▸ Flags

--api-url <url>API URL for self-hosted ShipSafe. Default: https://ship-safe.co

▸ Examples

Log in (opens browser)

TERMINAL
npx @ship-safe/cli login

LOGOUT

logout

Clear your stored authentication token.

TERMINAL
shipsafe logout

WHOAMI

whoami

Show your current login status and email.

TERMINAL
shipsafe whoami

INIT

init

Create a .shipsafe.yml configuration file in the current directory with sensible defaults.

TERMINAL
shipsafe init

IGNORE

ignore

Suppress a rule in future scans. Adds it to .shipsafeignore. Suppressed findings still appear in the dashboard as "suppressed" but won't block CI.

TERMINAL
shipsafe ignore <rule-id>

▸ Arguments

<rule-id>Rule ID to ignore (e.g., secrets/generic-api-key).

▸ Flags

-r, --reason <reason>Why this rule is being suppressed. Stored as a comment in .shipsafeignore.

▸ Examples

Ignore with reason

TERMINAL
npx @ship-safe/cli ignore secrets/generic-api-key -r "Test API key, not real"

Ignore without reason

TERMINAL
npx @ship-safe/cli ignore xss/dangerously-set-html

UNIGNORE

unignore

Re-enable a previously suppressed rule. Removes it from .shipsafeignore.

TERMINAL
shipsafe unignore <rule-id>

▸ Arguments

<rule-id>Rule ID to unignore.

▸ Examples

Re-enable a rule

TERMINAL
npx @ship-safe/cli unignore secrets/generic-api-key