Command reference

The most relevant current Switchman CLI commands. Run any command with --help to see full options.

Current first-run flow

CommandDescription
switchman quickcheckCheck repo readiness and print one exact next command.
switchman start "goal"Fastest guided path. Creates or refreshes workspaces, local MCP config, and task planning for a new run.
switchman start "goal" --agents 4 --yesRun the guided start flow non-interactively with a specific agent count.
switchman session-summaryShow a compact summary of what Switchman coordinated in the recent session.

Setup & verification

CommandDescription
switchman setup --agents NCreate N agent workspaces, set up the coordination database, and write MCP config files. Run from your repo root.
switchman verify-setupCheck that the database, workspaces, and MCP config are all wired correctly.
switchman initInitialise Switchman in the current git repo without creating extra workspaces.
switchman demoRun a self-contained demo showing conflict prevention in a throwaway repo.
switchman demo --path /tmp/demoRun the demo at a specific path.

Status & monitoring

CommandDescription
switchman statusShow the full repo dashboard — health, active agents, blocked items, queue state, and next actions.
switchman status --watchLive-updating dashboard. Refreshes automatically as agents work.
switchman status --jsonOutput status as JSON for scripting.
switchman scanScan all worktrees for conflicts, unclaimed changes, and stale work.
switchman explain claim <file>Explain who owns a file and what task they are working on.
switchman explain queue <item-id>Explain why a queue item is blocked, retrying, or ready.
switchman explain stale --pipeline <pipeline-id>Explain stale waves and which tasks need to be retried.
switchman explain landing <pipeline-id>Explain the current landing branch or recovery state for a pipeline.
switchman monitor statusCheck the background rogue-edit monitor.

Tasks

CommandDescription
switchman task add "title" --priority NAdd a task to the queue. Priority 1–10, higher = picked up first.
switchman task listList all tasks with their status and priority.
switchman task next --worktree <name>Quickly get and lease the next pending task for a workspace.
switchman task retry <task-id>Return a failed or stale-completed task to pending.
switchman task retry-stale --pipeline <pipeline-id>Reset the stale tasks for one pipeline back to pending together.
switchman task done <task-id>Mark a task as complete.
switchman task fail <task-id>Mark a task as failed and requeue it.

Leases

CommandDescription
switchman lease next --worktree <name>Claim the next pending task for a worktree. Returns the task and lease ID.
switchman lease heartbeat <lease-id>Refresh a lease. Must be called at least every 60 seconds to keep the lease active.
switchman lease reapExpire all stale leases and requeue their tasks.
switchman lease listList all active leases.
switchman lease policyShow the current stale-lease policy.
switchman lease policy setUpdate automatic lease-reaping behaviour for the repo.

File claims

CommandDescription
switchman claim <task-id> <worktree> <files...>Claim one or more files for a task and worktree. Fails if any file is already claimed.
switchman claim --force <worktree> <files...>Override an existing claim. Use only for operator-led recovery — not normal operation.
switchman release <task-id>Release active file claims for a task during manual recovery.
switchman write <path> <content>Write through the governed gateway so claim rules are enforced.
switchman wrap <command...>Run a shell command through Switchman’s enforcement layer.

Merge queue

CommandDescription
switchman queue add <branch>Add a finished branch to the merge queue.
switchman queue add --worktree <name>Add a finished worktree branch to the merge queue.
switchman queue add --pipeline <pipeline-id>Queue a pipeline’s inferred landing branch, including synthetic landing branches when needed.
switchman queue listList queue items with retry and escalation state.
switchman queue statusShow the merge queue and each item's readiness.
switchman queue runProcess the queue — land each branch onto main in priority order.
switchman queue run --follow-planOnly run queue items that are currently in the land_now lane.
switchman queue run --merge-budget NLand at most N branches in this run.
switchman queue retry <item-id>Retry a blocked or held queue item after intervention.
switchman queue remove <item-id>Remove an item from the queue.

Pipelines & governed landing

CommandDescription
switchman pipeline start "title"Create a tracked pipeline and split one goal into structured subtasks.
switchman pipeline exec <pipeline-id> "/path/to/agent-command"Run a pipeline through one agent command and record structured outcomes.
switchman pipeline status <pipeline-id>Show what is running, blocked, policy-gated, or ready to land.
switchman pipeline pr <pipeline-id>Generate a PR-ready summary for the pipeline.
switchman pipeline bundle <pipeline-id>Export reviewer-ready pipeline artifacts to disk.
switchman pipeline comment <pipeline-id>Post or update the pipeline landing summary on a PR.
switchman pipeline sync-pr <pipeline-id>Bundle artifacts, update the PR comment, and write GitHub outputs in one step.
switchman pipeline publish <pipeline-id>Create the hosted PR once the landing state is ready.
switchman pipeline land <pipeline-id>Materialize or inspect the landing branch for a pipeline.
switchman pipeline land <pipeline-id> --refreshRefresh a stale synthetic landing branch after branches moved.
switchman pipeline land <pipeline-id> --recoverOpen a guided recovery worktree for landing conflicts.
switchman pipeline land <pipeline-id> --resumeResume landing after recovery work is committed.
switchman pipeline land <pipeline-id> --cleanupClean up temporary landing recovery resources.

Gate, policy & CI

CommandDescription
switchman gate ciRun the repo gate — checks for conflicts, unclaimed changes, stale worktrees, and compliance issues.
switchman gate ci --githubRun the gate with GitHub Actions output formatting.
switchman gate install-ciInstall a GitHub Actions workflow that runs the gate on every push and PR.
switchman policy initWrite a starter enforcement policy for generated-path exceptions.
switchman policy init-changeWrite a starter change policy for governed domains like auth, payments, and schema.
switchman policy show-changeShow the active change policy for the repo.
switchman policy override <pipeline-id> --task-types tests --reason "why"Record an explicit policy override for a pipeline requirement.
switchman policy list-overrides <pipeline-id>List policy overrides for a pipeline.

Pro commands

CommandDescription
switchman loginSign in with GitHub to activate your Pro licence.
switchman login --statusCheck your current plan, email, and renewal date.
switchman logoutSign out and remove saved credentials.
switchman upgradeOpen switchman.dev/pro in your browser.
switchman team invite <email>Invite a teammate to your Pro team. Returns an invite token.
switchman login --invite <token>Accept a team invite and join the shared coordination.
switchman team listList all team members and their status.
switchman plan "goal"Generate a parallel task plan from a goal description. Pro only.
switchman plan "goal" --applyCreate the planned tasks in the queue.
switchman plan --issue 47Generate a plan directly from a GitHub issue.
switchman plan --issue 47 --apply --commentApply the issue plan and comment the summary back to the issue or PR.

Utilities

CommandDescription
switchman claude refreshGenerate or update CLAUDE.md with Switchman coordination instructions.
switchman mcp install --windsurfInstall MCP config for Windsurf.
switchman audit verifyVerify the integrity of the audit trail.
switchman advanced brew-formula --sha256 <sha> --output Formula/switchman-dev.rbGenerate the Homebrew formula used during releases.
switchman telemetry statusCheck whether anonymous telemetry is enabled.
switchman telemetry enableEnable anonymous usage telemetry.
switchman telemetry disableDisable anonymous usage telemetry.
switchman telemetry testSend one test telemetry event and report whether delivery succeeded.