CLI Reference
Complete reference for all workbench CLI commands and flags.
Commands
| Command | Description |
|---|---|
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 setup | Create .workbench/, install skills, and optionally create a profile |
wb status | Show active worktrees and final review status |
wb stop | Kill all running agent tmux sessions |
wb clean | Remove all workbench worktrees and wb/ branches |
wb agents init | Create agents.yaml with built-in adapter configs |
wb agents list | List 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 conventions init | Create a starter .workbench/conventions.md (--generate to draft from the repo) |
wb conventions show | Print the current conventions file |
wb conventions edit | Open the conventions file in $EDITOR |
wb conventions delete | Remove the conventions file |
wb profile init | Create profile.yaml from defaults |
wb profile show | Show resolved profile |
wb profile set <key> <value> | Update a profile field |
wb profile diff | Show 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
| Flag | Description |
|---|---|
-j N | Max concurrent agents (default: 4) |
--max-retries N / -r N | Max fix cycles per failed stage (default: 2) |
--skip-test | Skip the test phase |
--skip-review | Skip the review phase |
--tdd | Test-driven: write tests first, then implement |
--agent CMD | Agent CLI command (default: claude) |
--no-tmux | Run agents as subprocesses instead of tmux |
--name NAME | Name for the session branch (default: workbench-N) |
--base BRANCH | Base branch to start from (default: main) |
--local | Branch from local ref instead of fetching origin |
-b NAME / --session-branch | Session branch name; created from --base if it doesn't exist, reused if it does. Alias of --name. |
-w N / --wave | Run only wave N (clamped to valid range) |
--start-wave N | Start from wave N, run through end (default: 1) |
--end-wave N | Stop after wave N (default: last wave) |
--retry-failed | Auto-retry tasks that crashed (not those that exhausted fix retries) |
--fail-fast | Stop after the first wave with any failed tasks |
--only-incomplete | Skip completed tasks from a prior run (requires -b) |
--task ID | Run only specific tasks by ID or slug (repeatable) |
--cleanup | Remove worktrees after completion |
--keep-branches | Keep task branches after merging (default: auto-delete on success) |
--push | Push the session branch to origin after merging (sets upstream tracking) |
--final-review | Run a whole-branch review after merges complete; opens a PR on PASS |
--pr-title TEXT | Override the PR title (default: plan H1, then plan id) |
--pr-body-file PATH | Use this file's content as the PR body |
--pr-base BRANCH | Override the PR base branch (default: session's recorded base) |
--skip-pr | Skip PR creation even on PASS verdict |
--pr-writer-directive TEXT | Override the PR writer agent's instructions |
--summarizer-directive TEXT | Override the requirements summarizer agent's instructions |
--branch-reviewer-directive TEXT | Override the branch reviewer agent's instructions |
--repo PATH | Repository path (auto-detected if omitted) |
--profile PATH | Use a specific profile.yaml |
--profile-name NAME | Use a named profile (profile.<name>.yaml) |
--*-directive TEXT | Override 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.
| Key | CLI flag | Type |
|---|---|---|
session_branch | -b / --session-branch | string (alias of name) |
name | --name | string (alias of session_branch) |
base | --base | string |
local | --local | bool |
agent | --agent | string |
profile | --profile | string (path) |
profile_name | --profile-name | string |
max_concurrent | -j / --max-concurrent | int (>= 1) |
max_retries | --max-retries | int (>= 0) |
tdd | --tdd | bool |
skip_test | --skip-test | bool |
skip_review | --skip-review | bool |
retry_failed | --retry-failed | bool |
fail_fast | --fail-fast | bool |
cleanup | --cleanup | bool |
keep_branches | --keep-branches | bool |
push | --push | bool |
final_review | --final-review | bool |
See Plan Frontmatter for the full format and examples.
Examples
Run a plan with default settings:
wb run plan.mdRun with TDD mode and skip the review stage:
wb run plan.md --tdd --skip-reviewResume a previously interrupted session from wave 3 through the end:
wb run plan.md -b workbench-1 --start-wave 3Run only a specific wave in an existing session:
wb run plan.md -b workbench-1 -w 2Run a range of waves:
wb run plan.md -b workbench-1 --start-wave 2 --end-wave 4Run only specific tasks by id or slug (repeatable):
wb run myplan --task token-service --task api-routesReference a plan by name (resolves to .workbench/myplan/plan.md):
wb run myplan -w 2
wb run myplan -b workbench-1 --only-incompleteResume a session, re-running every incomplete task:
wb resume workbench-1Retry only incomplete tasks manually (use this if you need to override flags):
wb run plan.md -b workbench-1 --only-incompleteAdd 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
| Flag | Description |
|---|---|
--no-tmux | Run agents as subprocesses instead of tmux |
--agent CMD | Agent CLI command (default: claude) |
-j N | Max parallel tasks per wave (default: 4) |
--max-retries N | Max fix attempts after a failed test or review (default: 2) |
--tdd | Run pending tasks in TDD mode |
--profile PATH | Use a specific profile.yaml |
--name NAME | Named profile to resolve |
--repo PATH | Repository 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-tmuxwb 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
| Flag | Description |
|---|---|
--from FILE | Transform an existing document (spec, draft, or rough plan) into workbench format |
-n NAME / --name NAME | Plan file name, written to .workbench/<name>/plan.md (default: plan) |
--copy-settings | Copy the current effective profile.yaml and agents.yaml into the plan folder |
--agent CMD | Agent CLI to run the planner (default: claude) |
--no-tmux | Run the planner as a subprocess instead of in tmux |
--repo PATH | Repository 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 authCombine a prompt with an existing document as seed material:
wb plan "Focus on security and edge cases" --from existing-spec.md --name secure-authGenerate a plan and freeze the current agent config into the plan folder:
wb plan "Add JWT auth" --name auth --copy-settingsAfter 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 planwb 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
| Flag | Description |
|---|---|
-b NAME / --session-branch | Session branch to merge into (required) |
--plan PATH | Plan file to determine status file (auto-detected if omitted) |
--agent CMD | Agent CLI for conflict resolution (default: claude) |
--no-tmux | Run resolver agents as subprocesses instead of tmux |
--keep-branches | Keep task branches after merging |
--push | Push the session branch to origin after merging (sets upstream tracking) |
--review | After merging, run a whole-branch review (and open a PR on PASS) |
--max-retries N | Max review/fix iterations when --review is active (default: 2) |
--pr-title TEXT | Override the PR title |
--pr-body-file PATH | Use this file's content as the PR body |
--pr-base BRANCH | Override the PR base branch |
--skip-pr | Skip PR creation even on PASS verdict |
--pr-writer-directive TEXT | Override the PR writer agent's instructions |
--summarizer-directive TEXT | Override the requirements summarizer agent's instructions |
--branch-reviewer-directive TEXT | Override the branch reviewer agent's instructions |
--repo PATH | Repository path (auto-detected if omitted) |
Examples
wb merge -b workbench-1 # merge completed task branches
wb merge -b workbench-1 --push # also push the session branch to origin
wb merge -b workbench-1 --push --review # merge, run the branch review, open a PR on PASS
wb merge -b workbench-1 --review --skip-pr # review but never open a PRSee Review & Pull Requests for the full requirements → review → PR flow.
wb final-review
Alias: wb review. Run a whole-branch review for a completed session. A requirements summarizer extracts a structured digest from the plan, then a branch reviewer and branch fixer loop until the review passes or --max-retries is exhausted.
On VERDICT: PASS, the review branch is merged back into the session branch and workbench opens a GitHub PR via gh pr create. On VERDICT: FAIL after all retries, no PR is created — the final report lists findings with file/line evidence and suggested fixes.
Artifacts land under .workbench/<plan-id>/wrap-up/<session>/:
requirements.md— the requirements digestreview.md— the review reportpr-body.md— the PR title and body (written on PASS)
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 review 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 metadatagh 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
| Flag | Description |
|---|---|
--agent CMD | Agent CLI command (default: claude) |
--no-tmux | Run agents as subprocesses instead of tmux |
--max-retries N | Max review/fix iterations (default: 2) |
--pr-title TEXT | Override the PR title (default: plan H1, else plan id) |
--pr-body-file PATH | Use this file's content as the PR body |
--pr-base BRANCH | Override the PR base branch (default: session's recorded base) |
--skip-pr | Skip PR creation even on PASS verdict |
--pr-writer-directive TEXT | Override the PR writer agent's instructions |
--summarizer-directive TEXT | Override the requirements summarizer agent's instructions |
--branch-reviewer-directive TEXT | Override the branch reviewer agent's instructions |
--profile PATH | Use a specific profile.yaml |
--profile-name NAME | Use a named profile |
--repo PATH | Repository path (auto-detected if omitted) |
The summarizer, branch_reviewer, and fixer roles are configurable in profile.yaml like any other role (agent, directive). See Profiles and Review & Pull Requests.
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
| Flag | Description |
|---|---|
-b NAME / --session-branch | Session branch (required if the plan has multiple sessions) |
--agent CMD | Agent CLI command (default: claude) |
--no-tmux | Run the PR writer agent as a subprocess instead of tmux |
--pr-title TEXT | Override the agent-generated title |
--pr-body-file PATH | Skip the PR writer and use this file's content as the body |
--pr-base BRANCH | Override the PR base branch (default: session's recorded base) |
--pr-writer-directive TEXT | Override the PR writer agent's instructions |
--profile PATH | Use a specific profile.yaml |
--profile-name NAME | Use a named profile |
--repo PATH | Repository 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 filewb 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
| Flag | Description |
|---|---|
--agent NAME | Target platform: claude, gemini, cursor, codex, copilot, manual (auto-detected if omitted) |
--global | Install skills to user-level paths only (skip .workbench/ creation) |
--symlink | Symlink instead of copy (stays in sync with package updates) |
--profile | Also create a profile.yaml with the detected agent |
--update | Force-update skills to the latest version |
--repo PATH | Repository 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
| Flag | Description |
|---|---|
--cleanup | Also remove worktrees and wb/ branches |
--repo PATH | Repository 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
| Flag | Description |
|---|---|
--yes | Skip confirmation prompt |
--repo PATH | Repository path (auto-detected if omitted) |
wb agents
Manage agent adapters — built-in and custom CLI integrations.
Group options
| Flag | Description |
|---|---|
--plan NAME | Scope 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-cliWhen --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.yamlwb agents list
List all available agents (built-in and custom):
wb agents list [--repo PATH]
wb agents --plan <name> list # show plan-scoped agentswb 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| Flag | Description |
|---|---|
--command CMD | CLI command to invoke (required) |
--args TEMPLATE | Argument template, comma-separated (default: {prompt}) |
--output-format FMT | text or json (default: text) |
--json-result-key KEY | JSON key for result (default: result) |
--json-cost-key KEY | JSON key for cost (default: cost_usd) |
--repo PATH | Repository 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 conventions
Manage the shared conventions file at .workbench/conventions.md. The conventions file is loaded by every agent role (implementor, tester, reviewer, fixer, planner) and is the single place to record house style, libraries to prefer, things to avoid, and any other repo-wide guidance that should apply across all workbench-dispatched work.
See Conventions for what to put in the file and how it's injected into agent prompts.
wb conventions init
Create a starter .workbench/conventions.md with section headings and inline guidance to fill in. Errors if the file already exists (use wb conventions edit instead).
wb conventions init [options]| Flag | Description |
|---|---|
--generate | Dispatch the generate-conventions agent to draft a conventions file from the repo |
--agent CMD | Agent CLI command for --generate (default: claude) |
--no-tmux | Run the generator agent as a subprocess instead of tmux |
--repo PATH | Repository path (auto-detected if omitted) |
wb conventions init # write a blank starter file
wb conventions init --generate # have an agent draft it from the repowb conventions show
Print the current conventions file to stdout. Exits non-zero with a friendly message if no conventions file exists.
wb conventions show [--repo PATH]wb conventions edit
Open .workbench/conventions.md in $EDITOR (falls back to vi). Creates the file from the starter template if it doesn't exist yet.
wb conventions edit [--repo PATH]wb conventions delete
Remove .workbench/conventions.md. Prompts for confirmation unless --yes is passed.
wb conventions delete [--yes] [--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]| Flag | Description |
|---|---|
--global | Create in ~/.workbench/ instead of .workbench/ |
--name NAME | Create a named profile (profile.<name>.yaml) |
--set KEY=VALUE | Set role fields inline (repeatable) |
--repo PATH | Repository path (auto-detected if omitted) |
wb profile show
Display the resolved profile configuration:
wb profile show [options]| Flag | Description |
|---|---|
--name NAME | Show a named profile |
--profile PATH | Path to a specific profile.yaml |
--full | Show the complete directive text for each role, including built-in defaults |
--repo PATH | Repository 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."| Flag | Description |
|---|---|
--global | Update ~/.workbench/ instead of local |
--name NAME | Update a named profile |
--repo PATH | Repository path (auto-detected if omitted) |
wb profile diff
Show differences between your current profile and the default:
wb profile diff [options]| Flag | Description |
|---|---|
--name NAME | Diff a named profile |
--profile PATH | Path to a specific profile.yaml |
--repo PATH | Repository path (auto-detected if omitted) |