CLI Reference
Complete reference for all ShipSafe CLI commands, flags, and output formats.
Global Flags
These flags work with any command:
--versionPrint ShipSafe version--helpShow help for a command--verboseShow debug output--quietSuppress all output except errorsshipsafe scan
Run a security scan on your project. This is the primary command you will use. Scans all JavaScript, TypeScript, and Python files.
Usage
shipsafe scan [path] [flags]
Flags
--severity <level>Minimum severity to report: critical, high, medium, low (default: low)--format <type>Output format: text, json, sarif (default: text)--baselineSave current findings as baseline for future delta scans--deltaOnly show findings not in the baseline--stagedOnly scan git-staged files--jsonShorthand for --format json--no-colorDisable colored output--workers <n>Number of parallel workers (default: CPU count)Examples
# Scan current directory shipsafe scan # Scan specific directory, only critical findings shipsafe scan ./src --severity critical # JSON output for CI/CD shipsafe scan --json # Only scan changed files since baseline shipsafe scan --delta
shipsafe init
Initialize ShipSafe in a project. Creates the .shipsafe directory, default config, and optionally installs git hooks.
Usage
shipsafe init
Flags
--hooksAlso install git pre-commit hooks--baselineAlso create an initial baselineExamples
# Initialize with hooks and baseline shipsafe init --hooks --baseline
shipsafe setup
Interactive setup wizard. Walks you through configuration options, hook installation, and MCP server setup.
Usage
shipsafe setup
Examples
shipsafe setup
shipsafe baseline
Manage scan baselines. Create, show, or reset baselines for incremental scanning.
Usage
shipsafe baseline <action>
Flags
createCreate a baseline from current scan findingsshowShow baseline summary (finding count, date)resetDelete the baseline fileExamples
# Create baseline shipsafe baseline create # View baseline info shipsafe baseline show # Reset baseline shipsafe baseline reset
shipsafe activate
Activate a Pro or Team license. Enter your license key to unlock advanced features like knowledge graph, auto-fix, and monitoring.
Usage
shipsafe activate <license-key>
Examples
shipsafe activate SHIP-XXXX-XXXX-XXXX
shipsafe scan-environment
Scan your development environment for threats. Checks CLAUDE.md files, git hooks, npm scripts, and MCP configurations for malicious patterns.
Usage
shipsafe scan-environment [path]
Flags
--format <type>Output format: text, json (default: text)Examples
# Scan current project environment shipsafe scan-environment # Scan a cloned repo before working in it shipsafe scan-environment ./suspicious-repo
shipsafe config
View or modify ShipSafe configuration. Shows current settings from config file and environment variables.
Usage
shipsafe config [key] [value]
Flags
--globalModify global config (~/.shipsafe/config.json)Examples
# View all config shipsafe config # Set severity to high shipsafe config severity high # Set global license key shipsafe config --global license-key SHIP-XXXX-XXXX-XXXX
shipsafe hooks
Manage git pre-commit hooks. Install, uninstall, or check hook status.
Usage
shipsafe hooks <action>
Flags
installInstall the pre-commit hookuninstallRemove the pre-commit hookstatusCheck if hooks are installedExamples
# Install hooks shipsafe hooks install # Check status shipsafe hooks status # Remove hooks shipsafe hooks uninstall
shipsafe mcp-server
Start the MCP server for AI coding assistants. Exposes 8 security tools via the Model Context Protocol.
Usage
shipsafe mcp-server
Flags
--port <n>Port to listen on (default: stdio)Examples
# Start MCP server (add to your MCP config) shipsafe mcp-server