Create a Workflow
Workflows allow you to automate multi-step development tasks across branches and worktrees simultaneously. Configure ordered command sequences once and execute them whenever needed without opening separate terminal windows.
How to Create a Workflow
Open the Workflow Drawer
In the Workflows view, select the Add Workflow button in the top toolbar, or press the keyboard shortcut:
- Shortcut:
Shift + A
Enter Name and Commands
The Add Workflow drawer slides open from the right:
- Name: Enter a clear, purpose-based name (e.g.
Quality Checks,Setup New Worktree,Full Build). - Command: Enter the first shell command to execute.
- Select Add Command to append additional steps. Commands execute strictly from top to bottom in the order defined.

Save the Workflow
Select Save. WorktreeWise validates the commands and writes the definition to .git/WorktreeWise/<name>/details.json. The workflow appears immediately in your Saved Workflows table.
Command Ordering & Fail-Fast Execution
Within each target worktree, workflows execute commands sequentially:
- Step 1 runs in the worktree root directory (
cwd). - If Step 1 exits with code
0(success), Step 2 begins immediately. - If any step fails (non-zero exit code), execution stops immediately for that worktree, and the failure is highlighted in the live Log panel.
Common Workflow Examples
Modern Web Application (Node.js / TypeScript)
- Name:
Verify Pull Request - Commands:
npm cinpm run lintnpm run test -- --cinpm run build
Full-Stack Database Workflow
- Name:
Reset & Seed Database - Commands:
npx prisma migrate reset --forcenpx prisma db seednpm test
Rust Project
- Name:
Cargo Check & Test - Commands:
cargo check --all-targetscargo clippy -- -D warningscargo test
Python Project
- Name:
Pytest & Typecheck - Commands:
poetry install --no-rootruff check .mypy srcpytest
Running the Workflow
Once created:
- Locate the workflow in the Saved Workflows table.
- Choose Sequential or Parallel execution mode.
- Select target worktrees in the dropdown.
- Select the green Play (▶) button. For details, see Run a Workflow.
Related Pages
- Run a Workflow: Learn about PTY execution, log streaming, and process controls.
- Edit & Duplicate Workflows: Modify existing workflows or clone variations.
- Import Workflows: Share and import workflow templates across repositories.