Our take
- Activity
- 91
- Community
- 57
- Issues
- 82
- Pull requests
- 84
+345 stars in the last 10 days
- Merges more pull requests than 97% of the projects we track
- Releases more often than 93% of the projects we track
- Closes issues faster than 82% of the projects we track
Overview
Worktrunk is a command-line tool for managing Git worktrees as easily as branches. It streamlines common tasks such as creating a worktree, switching to it, viewing worktree status, and removing it, avoiding the repeated path and branch handling of plain Git commands.
It is particularly useful when separate tasks need isolated working directories, including workflows with multiple AI coding agents. Hooks and other workflow features can help coordinate setup and cleanup across those worktrees.
Key Features
- Create a branch and worktree, then switch to it with
wt switch. - Launch a command after switching, such as an AI agent, with
wt switch -x. - List worktrees with branch status and related information using
wt list. - Remove worktrees and branches through a streamlined cleanup command.
- Automate local workflows with hooks for events such as worktree creation and merges.
- Run merge workflows and generate commit messages from diffs.
- Share build caches across worktrees on APFS, btrfs, and XFS.
- Support shell integration so commands can change directories.
Use Cases
- Developers running several coding agents in parallel can give each task its own worktree and launch the agent from that directory.
- A developer switching among feature branches can use branch-oriented commands instead of manually navigating worktree paths.
- Teams with repeatable project setup steps can use hooks to automate local worktree preparation.
- Contributors who finish changes locally can use the merge workflow to integrate and clean up a worktree.
Getting Started
On macOS or Linux, install with Homebrew and set up shell integration:
brew install worktrunk && wt config shell install
See the README for Cargo, Windows, Arch Linux, and other installation options, along with command examples. Full documentation is available at worktrunk.dev.
Alternatives
- opencode-worktree: opencode-worktree is a retired OpenCode V1 plugin that creates worktrees and terminal sessions, while worktrunk is a general-purpose Git worktree CLI.
| Project | Language | License | Stars | Status |
|---|---|---|---|---|
| worktrunk | Rust | Other | 8.7k | Not checked yet |
| opencode-worktree | TypeScript | MIT | 728 | Archived |
Considerations
- Shell integration is needed for commands that change directories. The Homebrew setup command installs it.
- On Windows,
wtmay conflict with Windows Terminal. The documented Winget installation usesgit-wtby default. - Sharing build caches is documented for APFS, btrfs, and XFS, so do not assume that capability applies to other filesystems.
- The repository metadata reports the license as
NOASSERTION, while the README displays an MIT OR Apache-2.0 badge. Check the repository’s license details if licensing affects adoption.
Found this useful?
Share it with someone who would like worktrunk.