使用 Worktrunk 为并行的 Claude Code 和 Codex 分支启动隔离的 git 工作树
Create, switch, and clean per-branch worktrees so multiple coding agents can work the same repo in parallel without stomping each other.
Prerequisites
Git repository, Worktrunk CLI, local shell access, one or more coding agents such as Claude Code or Codex
Installation
Use the upstream install or setup path that matches your environment:
- brew install worktrunk && wt config shell install
- cargo install worktrunk && wt config shell install
- conda install -c conda-forge worktrunk && wt config shell install
Requirements and caveats from upstream:
- worktree requires typing the branch name three times: git worktree add -b feat
Basic usage or getting-started notes:
- Hooks — run commands on create, pre-merge, post-merge, etc
- Homebrew (macOS & Linux):
- bash
- Source: https://github.com/1991513ccie-png/skills
- Extracted from upstream docs: https://raw.githubusercontent.com/max-sixty/worktrunk/HEAD/README.md
Documentation
- https://worktrunk.dev