Skip to content

CLI Reference

The shipwright CLI is the main entry point for Shipwright. It routes to specialized scripts for each subcommand.

One-command tmux setup with no prompts. Installs the tmux configuration, overlay, status widgets, and role-color hooks.

Terminal window
shipwright init # Standard install
shipwright init --repair # Force clean reinstall (after OS upgrades)

Flags:

Flag Description
--repair Force reinstall of all tmux config and plugins

Validate your setup and diagnose common issues.

Terminal window
shipwright doctor

Checks: tmux version, jq availability, overlay hooks, color configuration, orphaned sessions.

Check for and apply updates.

Terminal window
shipwright upgrade # Check for updates
shipwright upgrade --apply # Pull latest and apply

Create a team session with optional template.

Terminal window
shipwright session <name> # Bare session
shipwright session <name> --template <template> # With template
shipwright session <name> -t feature-dev # Short flag

Flags:

Flag Description
--template, -t Team template name (see shipwright templates list)

Show the team dashboard with all active sessions.

Terminal window
shipwright status

Also available via tmux keybinding: Ctrl-a then Ctrl-t.

Show running agent processes across all sessions.

Terminal window
shipwright ps

Tail agent logs for a session.

Terminal window
shipwright logs <session> # Show recent logs
shipwright logs <session> --follow # Tail continuously

Run Claude Code autonomously until a goal is achieved.

Terminal window
shipwright loop "<goal>" [flags]

Flags:

Flag Description Default
--test-cmd <cmd> Test command for verification auto-detected
--audit Self-reflection after each iteration off
--audit-agent Dedicated auditor agent off
--quality-gates Run tests as gates between iterations off
--definition-of-done <file> Completion checklist none
--agents <n> Number of agents 1
--max-iterations <n> Maximum iterations 20
--model <model> Claude model (or set SW_MODEL) opus
--resume Resume interrupted loop —

Examples:

Terminal window
shipwright loop "Build user auth with JWT" --test-cmd "npm test"
shipwright loop "Refactor API" --agents 3 --audit --quality-gates
shipwright loop "Build checkout" --definition-of-done requirements.md
shipwright loop --resume

See Continuous Loop guide for details.

Start a new delivery pipeline.

Terminal window
shipwright pipeline start [flags]

Flags:

Flag Description
--goal <text> Goal description
--issue <number> GitHub issue number
--pipeline <template> Pipeline template: standard (default), fast, hotfix, tdd, full, autonomous, deployed, enterprise, or cost-aware
--test-cmd <cmd> Override auto-detected test command
--agents <n> Number of build agents
--self-heal <n> Max self-healing cycles
--skip-gates Auto-approve all gates
--worktree Run pipeline in a git worktree for isolation
--worktree=<name> Named worktree for parallel execution
--slack-webhook <url> Slack notification webhook

Resume a pipeline from where it left off.

Terminal window
shipwright pipeline resume

Show pipeline progress dashboard.

Terminal window
shipwright pipeline status

Abort a running pipeline.

Terminal window
shipwright pipeline abort

Browse available pipeline templates.

Terminal window
shipwright pipeline list

View details of a pipeline template.

Terminal window
shipwright pipeline show <template>

See Delivery Pipeline guide for details.

Background daemon for autonomous issue processing with intelligent triage, adaptive templates, and self-optimizing metrics.

Subcommand Description
shipwright daemon init Initialize daemon configuration
shipwright daemon start Start background daemon
shipwright daemon stop Stop daemon
shipwright daemon status Show daemon status and active pipelines
shipwright daemon metrics DORA/DX metrics dashboard
shipwright daemon logs View daemon logs
shipwright daemon triage Show issue triage scores and priority
shipwright daemon patrol Run proactive codebase patrol

Start flags:

Flag Description Default
--config <path> Path to daemon-config.json .claude/daemon-config.json
--detach, -d Run in a detached tmux session off
--no-github Disable GitHub API calls (dry-run mode) off

Metrics flags:

Flag Description Default
--period <days> Reporting period 7
--json JSON output off

Patrol flags:

Flag Description Default
--once Run patrol once and exit off
--dry-run Show findings without creating issues off

Examples:

Terminal window
shipwright daemon init # Generate config file
shipwright daemon start # Start watching in foreground
shipwright daemon start --detach # Start in background tmux session
shipwright daemon start --config my-config.json # Custom config
shipwright daemon status # Show active jobs and queue
shipwright daemon stop # Graceful shutdown
shipwright daemon logs --follow # Tail the daemon log
shipwright daemon metrics # DORA + DX metrics (last 7 days)
shipwright daemon metrics --period 30 # Last 30 days
shipwright daemon metrics --json # JSON output for dashboards
shipwright daemon triage # Show issue triage scores
shipwright daemon patrol # Run proactive codebase patrol
shipwright daemon patrol --dry-run # Show what patrol would find

See Autonomous Daemon guide for details.

Multi-repo daemon orchestrator. Spawn daemons across repositories, view a fleet-wide dashboard, and aggregate DORA metrics.

Subcommand Description
shipwright fleet init Generate fleet-config.json (auto-detects sibling repos)
shipwright fleet start Start daemons for all configured repos
shipwright fleet stop Stop all fleet daemons
shipwright fleet status Show fleet dashboard (per-repo status)
shipwright fleet metrics Aggregate DORA metrics across repos

Flags:

Flag Description Default
--config <path> Path to fleet-config.json .claude/fleet-config.json
--period <days> Reporting period for metrics 7
--json JSON output for metrics off

Examples:

Terminal window
shipwright fleet init # Generate config
shipwright fleet start # Start all daemons
shipwright fleet start --config my-fleet.json # Custom config
shipwright fleet status # Fleet dashboard
shipwright fleet metrics --period 30 # 30-day aggregate
shipwright fleet stop # Stop everything

See Fleet Operations guide for details.

Apply the same goal across multiple repositories in parallel. Each repo gets its own branch and pipeline run.

Terminal window
shipwright fix "<goal>" [flags]

Flags:

Flag Description Default
--repos <dir1,dir2,...> Comma-separated repo paths —
--repos-from <file> Read repo paths from file (one per line) —
--pipeline <template> Pipeline template fast
--model <model> Claude model auto
--max-parallel <n> Max concurrent pipelines 3
--branch-prefix <prefix> Branch name prefix fix/
--dry-run Show what would happen without executing off
--status Show running fix sessions —

Examples:

Terminal window
shipwright fix "Update lodash to 4.17.21" --repos ~/api,~/web,~/mobile
shipwright fix "Fix SQL injection in auth" --repos ~/api --pipeline fast
shipwright fix "Bump Node to 22" --repos-from repos.txt --pipeline hotfix
shipwright fix --status

See Bulk Fix guide for details.

Persistent learning and context system. Captures pipeline learnings, failure patterns, and design decisions per repository with cross-repo global memory.

Subcommand Description
shipwright memory show Display memory for current repo
shipwright memory show --global Display cross-repo learnings
shipwright memory search <keyword> Search memory for a keyword
shipwright memory stats Show memory size, age, and hit rate
shipwright memory export Export memory as JSON
shipwright memory import <file> Import memory from JSON
shipwright memory forget --all Clear memory for current repo

Pipeline integration commands (called automatically by pipelines):

Subcommand Description
shipwright memory capture <state> <artifacts> Capture pipeline learnings
shipwright memory inject <stage_id> Inject context for a pipeline stage
shipwright memory pattern <type> [data] Record a codebase pattern
shipwright memory metric <name> <value> Update a performance baseline
shipwright memory decision <type> <summary> Record a design decision
shipwright memory analyze-failure <log> <stage> Analyze failure root cause via AI

Examples:

Terminal window
shipwright memory show # View repo memory
shipwright memory show --global # View cross-repo learnings
shipwright memory search "auth" # Find auth-related memories
shipwright memory export > backup.json # Export memory
shipwright memory import backup.json # Import memory
shipwright memory capture .claude/pipeline-state.md .claude/pipeline-artifacts
shipwright memory inject build # Get context for build stage

See Memory guide for details.

Token usage tracking, budget enforcement, and spending analysis.

Subcommand Description
shipwright cost show Show cost summary for current period
shipwright cost budget set <amount> Set daily budget (USD)
shipwright cost budget show Show current budget and usage
shipwright cost remaining-budget Return remaining daily budget (used by auto-scaler)

Show flags:

Flag Description Default
--period <days> Reporting period 7
--json JSON output off
--by-stage Breakdown by pipeline stage off
--by-issue Breakdown by issue off

Pipeline integration commands (called automatically by pipelines):

Subcommand Description
shipwright cost record <in> <out> <model> <stage> [issue] Record token usage
shipwright cost calculate <in> <out> <model> Calculate cost without recording
shipwright cost check-budget [estimated_usd] Check budget before starting

Model pricing (USD per 1M tokens):

Model Input Output
opus $5.00 $25.00
sonnet $3.00 $15.00
haiku $1.00 $5.00

These are built-in defaults. Override them with ~/.shipwright/model-pricing.json.

Examples:

Terminal window
shipwright cost show # 7-day cost summary
shipwright cost show --period 30 --by-stage # 30-day breakdown by stage
shipwright cost budget set 50.00 # Set $50/day limit
shipwright cost budget show # Check current budget
shipwright cost calculate 50000 10000 opus # Prints the estimated USD cost (0.5000)

See Cost Intelligence guide for details.

Analyze and prepare a repository for agent teams.

Terminal window
shipwright prep [flags]

Flags:

Flag Description
--force Overwrite existing files
--check Audit existing prep without writing (dry run)
--update Refresh auto-generated sections only, keeping your edits
--interactive Interactive quality profile dialogue
--with-claude Deep analysis using Claude Code (slower, richer)

See Repo Preparation guide for details.

Clean up orphaned tmux sessions and panes.

Terminal window
shipwright cleanup # Dry-run: show what would be cleaned
shipwright cleanup --force # Actually clean up

Clean up dead tmux panes (panes where Claude has exited).

Terminal window
shipwright reaper # One-shot cleanup
shipwright reaper --watch # Background auto-cleanup every 5s
shipwright reaper --dry-run # Preview what would be reaped

Also available via tmux keybinding: Ctrl-a then R.

Manage git worktrees for agent isolation.

Terminal window
shipwright worktree create <branch> # Create a worktree
shipwright worktree list # List worktrees
shipwright worktree remove <branch> # Remove a worktree

Browse team templates.

Terminal window
shipwright templates list # List all templates
shipwright templates show <name> # Show template details

Real-time web dashboard for monitoring pipelines, agents, and daemon status.

Terminal window
shipwright dashboard # Start dashboard (foreground)
shipwright dashboard start # Start in background
shipwright dashboard stop # Stop background dashboard

Requires Bun 1.2.19+. The dashboard server listens on port 8767 by default and binds to 127.0.0.1. Use --port <N> to change the port.

Terminal window
shipwright dashboard --port 8080 # Different port
shipwright dashboard --host 0.0.0.0 # Bind to all interfaces (server or fleet mode)
SW_DASHBOARD_HOST=0.0.0.0 shipwright dashboard # Same as --host, via environment variable
shipwright dashboard status # Show server status

Only use --host 0.0.0.0 on a trusted network, since it exposes the dashboard beyond the local machine.

Agent liveness monitoring. Heartbeats are written automatically by pipeline agents and checked by the daemon for stale job detection.

Subcommand Description
shipwright heartbeat list Show all active heartbeats
shipwright heartbeat check <job-id> Check if a specific job is alive
shipwright heartbeat clear Remove stale heartbeats

Heartbeat files are stored at ~/.shipwright/heartbeats/<job-id>.json.

Save and restore pipeline state for resilience and recovery.

Subcommand Description
shipwright checkpoint list List saved checkpoints
shipwright checkpoint save --stage <name> Save current pipeline state for a stage
shipwright checkpoint restore --stage <name> Restore from a checkpoint for a stage
shipwright checkpoint clear --stage <name> Remove a stage’s checkpoint (--all removes every checkpoint)
shipwright checkpoint expire Remove checkpoints older than N hours

Checkpoints are stored in .claude/pipeline-artifacts/checkpoints/.

Manage distributed worker machines for scaling pipeline execution across multiple hosts.

Subcommand Description
shipwright remote list Show registered machines
shipwright remote add <name> --host <h> Register a worker machine
shipwright remote remove <name> Unregister a machine
shipwright remote status Health check all machines

Add flags:

Flag Description Default
--host <hostname> Machine hostname or IP required
--path <path> Shipwright install path on remote required
--user <user> SSH user current user
--max-workers <n> Max concurrent workers 4

Machine registry is stored at ~/.shipwright/machines.json.

See Advanced Features for details.

Generic issue tracker integration that routes to provider-specific implementations.

Terminal window
shipwright tracker init # Configure the tracker provider
shipwright tracker status # Show tracker configuration
shipwright tracker notify <event> <issue> <data> # Send event to tracker

Linear issue tracker integration for bidirectional sync between pipelines and Linear issues.

Terminal window
shipwright linear init # Configure Linear integration
shipwright linear sync <issue> # Sync issue status to Linear

Jira issue tracker integration.

Terminal window
shipwright jira init # Configure Jira integration
shipwright jira sync <issue> # Sync issue status to Jira

Configuration is stored at ~/.shipwright/tracker-config.json. See Issue Tracking guide for setup instructions.

The intelligence layer provides AI-powered analysis and optimization. All intelligence features are behind feature flags in daemon-config.json. The flags default to "auto", which turns them on when the Claude CLI is detected. Set a flag to false to disable it.

Core intelligence engine for semantic analysis, pipeline composition, cost prediction, and decision synthesis.

Subcommand Description
shipwright intelligence analyze Semantic analysis of issues for triage
shipwright intelligence compose AI-driven pipeline composition
shipwright intelligence predict Cost and complexity prediction
shipwright intelligence synthesize Synthesize findings into recommendations
shipwright intelligence search-memory Search cross-repo memory for patterns
shipwright intelligence recommend-model Recommend Claude model for stage
shipwright intelligence cache-stats Show intelligence cache statistics
shipwright intelligence cache-clear Clear intelligence cache

Examples:

Terminal window
shipwright intelligence analyze '{"title":"Add auth","labels":["feature"]}'
shipwright intelligence compose <issue_json>
shipwright intelligence predict '{"title":"Refactor API"}'
shipwright intelligence recommend-model test

Self-optimization and learning system. Analyzes outcomes, tunes template weights, and evolves routing decisions.

Subcommand Description
shipwright optimize analyze-outcome Analyze completed pipeline outcome
shipwright optimize tune Full outcome analysis and model tuning
shipwright optimize report Show optimization learnings and metrics
shipwright optimize evolve-memory Evolve memory from optimization data

Examples:

Terminal window
shipwright optimize analyze-outcome .claude/pipeline-state.md
shipwright optimize tune
shipwright optimize report

Predictive analytics for risk assessment, anomaly detection, and proactive codebase patrol.

Subcommand Description
shipwright predict risk Pre-pipeline risk assessment
shipwright predict anomaly Compare metrics against running baselines
shipwright predict patrol AI-driven code analysis for high-risk code
shipwright predict baseline Update running metric baselines (EMA)

Examples:

Terminal window
shipwright predict risk '{"title":"Add payment","complexity":7}'
shipwright predict anomaly build duration 45.3
shipwright predict patrol "src/auth.ts src/db.ts" "$(git log --oneline -20)"

Multi-persona code review using simulated developer personas (security, performance, maintainability).

Subcommand Description
shipwright simulation review Run 3-persona PR review
shipwright simulation address Address reviewer objections

Examples:

Terminal window
shipwright simulation review <code_diff> "<PR description>"
shipwright simulation address <objections_json> "<implementation context>"

Red-team code review that finds security flaws, race conditions, and edge cases.

Subcommand Description
shipwright adversarial review Hostile security and QA review

Examples:

Terminal window
shipwright adversarial review <code_diff> "<context>"

Living architecture model: build, validate changes, and evolve patterns over time.

Subcommand Description
shipwright architecture build Build architecture model from codebase
shipwright architecture validate Validate code changes against model
shipwright architecture evolve Evolve model with intentional changes

Examples:

Terminal window
shipwright architecture build
shipwright architecture validate <code_diff>
shipwright architecture evolve architecture.json "Added event-driven patterns"

Configuration:

All intelligence features are controlled via feature flags in .claude/daemon-config.json:

{
"intelligence": {
"composer_enabled": "auto",
"optimization_enabled": "auto",
"prediction_enabled": "auto",
"adaptive_enabled": "auto",
"adversarial_enabled": false,
"simulation_enabled": false,
"architecture_enabled": false
}
}

"auto" turns a flag on when the Claude CLI is detected. daemon init writes these defaults. The adversarial, simulation, and architecture flags default to false.

See Intelligence guide for detailed setup and examples.