CLI Reference

Complete reference for all workbench CLI commands and flags.

Commands

CommandDescription
wb run <plan>Execute a plan with parallel agents
wb resume <session>Resume a session, re-running every task that isn't done + merged
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 final-review <branch> / wb review <branch>Run a whole-branch review (requirements summarizer + branch reviewer) and optionally open a PR
wb pull-request <plan>Open a GitHub PR for a session with an AI-written description
wb preview <plan>Dry-run: show parsed tasks and waves
wb setupCreate .workbench/, install skills, and optionally create a profile
wb statusShow active worktrees and final review status
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-branchSession branch name; created from --base if it doesn't exist, reused if it does. Alias of --name.
-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-incompleteSkip 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)
--final-reviewRun a whole-branch review after merges complete; opens a PR on PASS
--pr-title TEXTOverride the PR title (default: plan H1, then plan id)
--pr-body-file PATHUse this file's content as the PR body
--pr-base BRANCHOverride the PR base branch (default: session's recorded base)
--skip-prSkip PR creation even on PASS verdict
--pr-writer-directive TEXTOverride the PR writer agent's instructions
--summarizer-directive TEXTOverride the requirements summarizer agent's instructions
--branch-reviewer-directive TEXTOverride the branch reviewer agent's instructions
--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

Frontmatter-readable flags

Plans may declare these keys in a YAML frontmatter block (--- delimiters) at the top of the file. Frontmatter values act as defaults; explicit CLI flags always win. Unknown keys raise an error.

KeyCLI flagType
session_branch-b / --session-branchstring (alias of name)
name--namestring (alias of session_branch)
base--basestring
local--localbool
agent--agentstring
profile--profilestring (path)
profile_name--profile-namestring
max_concurrent-j / --max-concurrentint (>= 1)
max_retries--max-retriesint (>= 0)
tdd--tddbool
skip_test--skip-testbool
skip_review--skip-reviewbool
retry_failed--retry-failedbool
fail_fast--fail-fastbool
cleanup--cleanupbool
keep_branches--keep-branchesbool
push--pushbool
final_review--final-reviewbool

See Plan Frontmatter for the full format and examples.

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

Resume a session, re-running every incomplete task:

wb resume workbench-1

Retry only incomplete tasks manually (use this if you need to override flags):

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

Add custom reviewer instructions:

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

wb resume

Sugar over wb run <plan> -b <session> --only-incomplete. Looks up the session in .workbench/<plan>/status.yaml (legacy .workbench/status-*.yaml is still read), finds the original plan via the recorded plan_source, and re-runs every task that isn't done + merged. Frontmatter is read from the plan referenced by the session's plan_source; CLI flags override frontmatter, same as wb run.

wb resume <session-branch> [options]

This includes tasks that failed AND tasks that never started (e.g., a crash before the wave reached them). For finer-grained control — wave ranges, directive overrides, selective tasks — use wb run directly.

Flags

FlagDescription
--no-tmuxRun agents as subprocesses instead of tmux
--agent CMDAgent CLI command (default: claude)
-j NMax parallel tasks per wave (default: 4)
--max-retries NMax fix attempts after a failed test or review (default: 2)
--tddRun pending tasks in TDD mode
--profile PATHUse a specific profile.yaml
--name NAMENamed profile to resolve
--repo PATHRepository path (auto-detected if omitted)

Examples

wb resume workbench-1
wb resume workbench-1 --tdd       # if the original session was TDD
wb resume workbench-1 --no-tmux

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/<name>/plan.md (default: plan)
--copy-settingsCopy the current effective profile.yaml and agents.yaml into the plan folder
--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)

Subcommands

wb plan copy-settings

Copy the current effective profile.yaml and agents.yaml into an existing plan folder, with a date-stamped header. Use this to freeze a plan's agent configuration at a point in time so it doesn't change when the project-level config evolves.

wb plan copy-settings <name>

This writes .workbench/<name>/profile.yaml and .workbench/<name>/agents.yaml from the current resolved config. You can also pass --copy-settings to wb plan to do this in the same step as generating the plan.

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

Generate a plan and freeze the current agent config into the plan folder:

wb plan "Add JWT auth" --name auth --copy-settings

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

cat .workbench/plan/plan.md      # review the generated plan
wb preview .workbench/plan/plan.md
wb run .workbench/plan/plan.md
# Or use the plan name directly (resolves to .workbench/<name>/plan.md)
wb preview plan
wb run plan

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)
--reviewAfter merging, run a whole-branch review (and open a PR on PASS)
--pr-title TEXTOverride the PR title
--pr-body-file PATHUse this file's content as the PR body
--pr-base BRANCHOverride the PR base branch
--skip-prSkip PR creation even on PASS verdict
--pr-writer-directive TEXTOverride the PR writer agent's instructions
--summarizer-directive TEXTOverride the requirements summarizer agent's instructions
--branch-reviewer-directive TEXTOverride the branch reviewer agent's instructions
--repo PATHRepository path (auto-detected if omitted)

wb final-review

Alias: wb review. Run a whole-branch review for a completed session. Two agents run in sequence: a requirements summarizer extracts a structured digest from the plan, then a branch reviewer evaluates the session-branch diff against that digest and writes a markdown report.

On VERDICT: PASS, workbench opens a GitHub PR via gh pr create. On VERDICT: FAIL, no PR is created — the report lists findings with file/line evidence and suggested fixes.

Artifacts land under .workbench/<plan-id>/reviews/<session>/:

  • requirements.md — the requirements digest
  • report.md — the review report

Each run appends an entry to the session's final_reviews list in .workbench/<plan-id>/status.yaml. wb status surfaces the latest verdict and PR URL (or report path on fail).

wb final-review workbench-1                       # default: open PR on PASS
wb final-review workbench-1 --skip-pr             # never open a PR
wb final-review workbench-1 --pr-title "My feat"  # override PR metadata

gh must be installed and authenticated for PR creation. When it isn't, the review still runs; the PR step prints a copy-pasteable gh pr create command instead of failing.

Flags

FlagDescription
--agent CMDAgent CLI command (default: claude)
--no-tmuxRun agents as subprocesses instead of tmux
--pr-title TEXTOverride the PR title (default: plan H1, else plan id)
--pr-body-file PATHUse this file's content as the PR body
--pr-base BRANCHOverride the PR base branch (default: session's recorded base)
--skip-prSkip PR creation even on PASS verdict
--pr-writer-directive TEXTOverride the PR writer agent's instructions
--summarizer-directive TEXTOverride the requirements summarizer agent's instructions
--branch-reviewer-directive TEXTOverride the branch reviewer agent's instructions
--profile PATHUse a specific profile.yaml
--profile-name NAMEUse a named profile
--repo PATHRepository path (auto-detected if omitted)

The summarizer and branch_reviewer roles are configurable in profile.yaml like any other role (agent, directive). See Profiles.

wb pull-request

Open a GitHub PR for a session, with an AI-written title and description. The PR writer agent reads the plan context, git diff stat, commit log, and merged task titles to author a relevant PR body. Falls back to a plan-derived body if the agent fails.

Unlike wb final-review, this command skips the requirements review and goes straight to PR creation. Use it after a session is complete and already merged, when you don't need the branch review step.

wb pull-request <plan> [options]

<plan> can be a plan name (e.g. myfeature, resolved to .workbench/myfeature/plan.md) or a path to a plan.md file. If the plan has multiple sessions, specify which one with -b.

gh must be installed and authenticated for PR creation.

Flags

FlagDescription
-b NAME / --session-branchSession branch (required if the plan has multiple sessions)
--agent CMDAgent CLI command (default: claude)
--no-tmuxRun the PR writer agent as a subprocess instead of tmux
--pr-title TEXTOverride the agent-generated title
--pr-body-file PATHSkip the PR writer and use this file's content as the body
--pr-base BRANCHOverride the PR base branch (default: session's recorded base)
--pr-writer-directive TEXTOverride the PR writer agent's instructions
--profile PATHUse a specific profile.yaml
--profile-name NAMEUse a named profile
--repo PATHRepository path (auto-detected if omitted)

Examples

wb pull-request myfeature
wb pull-request myfeature -b workbench-3      # when plan has multiple sessions
wb pull-request myfeature --pr-title "Add JWT auth"
wb pull-request myfeature --pr-body-file pr-body.md   # skip PR writer, use file

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.

Group options

FlagDescription
--plan NAMEScope all subcommands to .workbench/<name>/agents.yaml instead of the project-level file

Pass --plan immediately after wb agents and before the subcommand:

wb agents --plan myfeature list
wb agents --plan myfeature add my-agent --command my-cli

When --plan is omitted, subcommands read and write .workbench/agents.yaml (the project-level file).

wb agents init

Create 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 --plan <name> init   # create plan-scoped agents.yaml

wb agents list

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

wb agents list [--repo PATH]
wb agents --plan <name> list   # show plan-scoped agents

wb agents show

Show the full configuration for a specific agent:

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

wb agents add

Add or update a custom agent adapter:

wb agents add <name> [options]
wb agents --plan <plan> add <name> [options]   # write to plan-scoped agents.yaml
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 agents --plan <plan> remove <name>

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
--fullShow the complete directive text for each role, including built-in defaults
--repo PATHRepository path (auto-detected if omitted)

wb profile set

Update a profile field:

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

The key uses dot notation: <role>.<field> or <role>.<sub_mode>.<field>.

Roles: implementor, tester, reviewer, fixer, merger, planner

wb profile set implementor.agent gemini
wb profile set reviewer.agent claude
wb profile set tester.tdd.directive "Use pytest fixtures for shared setup."
wb profile set reviewer.followup.directive "Focus only on changes since last review."
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)