CLI Reference

Complete reference for all workbench CLI commands and flags.

Commands

CommandDescription
wb run <plan>Execute a plan with parallel agents
wb plan <prompt>Generate a workbench plan from a prompt or existing document using a planner agent
wb merge -b <branch>Merge completed-but-unmerged task branches (auto-detects plan)
wb preview <plan>Dry-run: show parsed tasks and waves
wb setupCreate .workbench/, install skills, and optionally create a profile
wb statusShow active worktrees
wb stopKill all running agent tmux sessions
wb cleanRemove all workbench worktrees and wb/ branches
wb agents initCreate agents.yaml with built-in adapter configs
wb agents listList built-in and custom agent adapters
wb agents show <name>Show details for an agent adapter
wb agents add <name>Add or update a custom agent adapter
wb agents remove <name>Remove a custom agent adapter
wb profile initCreate profile.yaml from defaults
wb profile showShow resolved profile
wb profile set <key> <value>Update a profile field
wb profile diffShow differences from defaults

wb run

The primary command. Parses a plan, creates isolated git worktrees, and dispatches agents in parallel.

wb run <plan.md> [options]

Flags

FlagDescription
-j NMax concurrent agents (default: 4)
--max-retries N / -r NMax fix cycles per failed stage (default: 2)
--skip-testSkip the test phase
--skip-reviewSkip the review phase
--tddTest-driven: write tests first, then implement
--agent CMDAgent CLI command (default: claude)
--no-tmuxRun agents as subprocesses instead of tmux
--name NAMEName for the session branch (default: workbench-N)
--base BRANCHBase branch to start from (default: main)
--localBranch from local ref instead of fetching origin
-b NAME / --session-branchResume an existing session branch
-w N / --waveRun only wave N (clamped to valid range)
--start-wave NStart from wave N, run through end (default: 1)
--end-wave NStop after wave N (default: last wave)
--retry-failedAuto-retry tasks that crashed (not those that exhausted fix retries)
--fail-fastStop after the first wave with any failed tasks
--only-failedSkip completed tasks from a prior run (requires -b)
--task IDRun only specific tasks by ID or slug (repeatable)
--cleanupRemove worktrees after completion
--keep-branchesKeep task branches after merging (default: auto-delete on success)
--pushPush the session branch to origin after merging (sets upstream tracking)
--repo PATHRepository path (auto-detected if omitted)
--profile PATHUse a specific profile.yaml
--profile-name NAMEUse a named profile (profile.<name>.yaml)
--*-directive TEXTOverride instructions for a specific agent role

Examples

Run a plan with default settings:

wb run plan.md

Run with TDD mode and skip the review stage:

wb run plan.md --tdd --skip-review

Resume a previously interrupted session from wave 3 through the end:

wb run plan.md -b workbench-1 --start-wave 3

Run only a specific wave in an existing session:

wb run plan.md -b workbench-1 -w 2

Run a range of waves:

wb run plan.md -b workbench-1 --start-wave 2 --end-wave 4

Retry only the tasks that failed in a previous run:

wb run plan.md -b workbench-1 --only-failed

Add custom reviewer instructions:

wb run plan.md --reviewer-directive "Focus on error handling and edge cases"

wb plan

Dispatch a planner agent to generate a workbench plan. The planner surveys the repository, designs a task graph for parallel execution, and writes a plan markdown file you can review and run with wb run.

wb plan "<prompt>" [--from FILE] [options]

At least one of a prompt or --from is required.

Flags

FlagDescription
--from FILETransform an existing document (spec, draft, or rough plan) into workbench format
-n NAME / --name NAMEPlan file name, written to .workbench/plans/<name>.md (default: plan)
--agent CMDAgent CLI to run the planner (default: claude)
--no-tmuxRun the planner as a subprocess instead of in tmux
--repo PATHRepository path (auto-detected if omitted)

Examples

Generate a plan from a prompt:

wb plan "Add JWT authentication to the FastAPI app"

Convert an existing spec into a workbench plan:

wb plan --from docs/auth-spec.md --name auth

Combine a prompt with an existing document as seed material:

wb plan "Focus on security and edge cases" --from existing-spec.md --name secure-auth

After a plan is written, the CLI prints the path and suggested next commands:

cat .workbench/plans/plan.md      # review the generated plan
wb preview .workbench/plans/plan.md
wb run .workbench/plans/plan.md

wb merge

Merge completed-but-unmerged task branches into the session branch. Useful when tasks completed but merging was interrupted or skipped. The plan is auto-detected from the session branch unless you specify --plan.

wb merge -b <session-branch> [options]

Flags

FlagDescription
-b NAME / --session-branchSession branch to merge into (required)
--plan PATHPlan file to determine status file (auto-detected if omitted)
--agent CMDAgent CLI for conflict resolution (default: claude)
--no-tmuxRun resolver agents as subprocesses instead of tmux
--keep-branchesKeep task branches after merging
--pushPush the session branch to origin after merging (sets upstream tracking)
--repo PATHRepository path (auto-detected if omitted)

wb preview

Dry-run a plan. Shows parsed tasks, the dependency graph, and wave assignments without executing any code or creating worktrees.

wb preview <plan.md>

wb setup

Initialize a repository for workbench. Creates the .workbench/ directory, installs agent skill files, and optionally creates a profile.

wb setup [options]

Flags

FlagDescription
--agent NAMETarget platform: claude, gemini, cursor, codex, copilot, manual (auto-detected if omitted)
--globalInstall skills to user-level paths only (skip .workbench/ creation)
--symlinkSymlink instead of copy (stays in sync with package updates)
--profileAlso create a profile.yaml with the detected agent
--updateForce-update skills to the latest version
--repo PATHRepository path (auto-detected if omitted)

wb status

Shows active workbench worktrees.

wb status [--repo PATH]

wb stop

Kill all running agent tmux sessions.

wb stop [options]

Flags

FlagDescription
--cleanupAlso remove worktrees and wb/ branches
--repo PATHRepository path (auto-detected if omitted)

wb clean

Remove all workbench-created git worktrees and wb/ branches. Useful for reclaiming disk space after a run or cleaning up after interrupted sessions.

wb clean [options]

Flags

FlagDescription
--yesSkip confirmation prompt
--repo PATHRepository path (auto-detected if omitted)

wb agents

Manage agent adapters — built-in and custom CLI integrations.

wb agents init

Create .workbench/agents.yaml pre-populated with configs for all built-in adapters (Claude, Gemini, Codex, Cursor, Copilot). Use as a starting point for customization.

wb agents init [--repo PATH]

wb agents list

List all available agents (built-in and custom):

wb agents list [--repo PATH]

wb agents show

Show the full configuration for a specific agent:

wb agents show <name> [--repo PATH]

wb agents add

Add or update a custom agent adapter:

wb agents add <name> [options]
FlagDescription
--command CMDCLI command to invoke (required)
--args TEMPLATEArgument template, comma-separated (default: {prompt})
--output-format FMTtext or json (default: text)
--json-result-key KEYJSON key for result (default: result)
--json-cost-key KEYJSON key for cost (default: cost_usd)
--repo PATHRepository path (auto-detected if omitted)

wb agents remove

Remove a custom agent adapter:

wb agents remove <name> [--repo PATH]

wb profile

Manage agent profiles — saved configurations for which agent handles which pipeline role.

wb profile init

Create a profile from defaults:

wb profile init [options]
FlagDescription
--globalCreate in ~/.workbench/ instead of .workbench/
--name NAMECreate a named profile (profile.<name>.yaml)
--set KEY=VALUESet role fields inline (repeatable)
--repo PATHRepository path (auto-detected if omitted)

wb profile show

Display the resolved profile configuration:

wb profile show [options]
FlagDescription
--name NAMEShow a named profile
--profile PATHPath to a specific profile.yaml
--repo PATHRepository path (auto-detected if omitted)

wb profile set

Update a profile field:

wb profile set <key> <value> [options]

Roles: implementor, tester, reviewer, fixer

wb profile set implementor gemini
wb profile set reviewer claude
FlagDescription
--globalUpdate ~/.workbench/ instead of local
--name NAMEUpdate a named profile
--repo PATHRepository path (auto-detected if omitted)

wb profile diff

Show differences between your current profile and the default:

wb profile diff [options]
FlagDescription
--name NAMEDiff a named profile
--profile PATHPath to a specific profile.yaml
--repo PATHRepository path (auto-detected if omitted)