The Multi-Agent Development Era
GWTree is built for the AI-assisted development era where multiple AI coding agents can work on different features simultaneously. Git worktrees are the perfect solution for parallel agent execution.Why Worktrees for AI Agents?
AI coding agents like Claude Code, Command Code, and Cursor need:Isolated Environments
Each agent needs its own working directory to avoid conflicts with file modifications
Separate Branches
Clean separation of changes allows independent code review and merging
Parallel Execution
Work on multiple features simultaneously instead of waiting for sequential completion
Easy Merging
Review each agent’s work independently and merge when ready
Quick Start: Parallel Agent Setup
Create three worktrees instantly for three different features:The
-x flag (--no-editor) prevents editors from automatically opening, perfect for batch creation.auth, api, dashboard
Multi-Agent Workflow
Create isolated worktrees
Use batch creation to set up multiple worktrees at once:From the source code (src/commands/create.ts:326-458), the batch creation function:
- Prunes stale worktrees once at the start
- Creates each worktree from the main branch
- Auto-installs dependencies if configured
- Handles branch name conflicts automatically
Work in parallel
Each agent works independently:
- Claude Code implements OAuth2 authentication in
my-repo-auth/ - Command Code builds REST API endpoints in
my-repo-api/ - Cursor creates dashboard components in
my-repo-dashboard/
Real-World Example
Scenario: E-commerce Feature Sprint
You need to ship three features simultaneously:- Payment integration
- Product search
- User reviews
Traditional Approach (Sequential)
GWTree Approach (Parallel)
Automatic Dependency Management
GWTree automatically installs dependencies in each worktree:- pnpm (detected via
pnpm-lock.yaml) - Bun (detected via
bun.lockb) - Yarn (detected via
yarn.lock) - npm (detected via
package-lock.json)
Editor Integration
Open each worktree in your preferred editor automatically:Status Monitoring
The status dashboard provides real-time visibility into all agent progress:Status Indicators
Ready to merge
Ready to merge
In progress
In progress
Merged
Merged
gwt clean.Cleanup Merged Work
After merging, clean up worktrees:Best Practices
Advanced: Custom Workflows
Feature Branch from Non-Main
Press ESC during name input to specify different branch and worktree names:my-repo-hotfix-auth/ with branch fix/auth-bug-123.
Fast Mode for Automation
Skip all prompts with-y flag:
- Auto-stash changes
- Auto-switch to main
- Auto-pull latest
- Auto-install dependencies
Learn More
Naming Patterns
Understand the
{repo}-{name} naming conventionGit Worktrees
Deep dive into how git worktrees work