What This Project Does

Worktrunk is a command line tool for managing Git worktrees. Its core goal is to make worktrees as easy to use as switching branches. It shortens a worktree's address to its branch name, with the real path derived from a configurable template, so you no longer need to remember a long directory string. It has only a handful of core commands: wt switch feat switches, wt switch -c -x claude feat creates a worktree and launches Claude to work in it, and wt remove cleans up. On top of those there is wt list to show every worktree with its status, wt merge main to do squash, rebase, merge, and cleanup in one step, and wt step commit to record changes. Each agent gets its own working directory, so they never step on each other. It is built specifically for the case where several AI agents work on the same repository at the same time, which is why the commands stay so small and addressable by branch alone.

What Problem It Solves

Agents like Claude Code and Codex can now take on longer tasks that need less human supervision, so many teams run 5 to 10 or more of them at once. Native Git worktrees do give each agent a separate directory, but the UX is clumsy. Creating a single worktree means typing the branch name three times. Once you have seven or eight worktrees open, just remembering which folder each one lives in becomes a burden. Worktrunk shortens that flow to branch name addressing. You say the branch name and let the template figure out the directory. It also fills the gaps in parallel workflows. You get hook automation, LLM generated commit messages, an interactive picker for CI status and AI summaries, and shared build caches like target/ and node_modules/ across worktrees. On filesystems such as APFS, btrfs, and XFS it uses copy on write, which removes the wait of rebuilding from scratch. For a project where a build can take ten-plus minutes, rerunning it in every worktree is real wasted time, and this cache layer cuts that wait out. If you are building multi agent setups, see What Is Claude-Code-Game-Studios and How to Use It, since the thinking overlaps a lot.

Language and Architecture

  • Main language is Rust.
  • Install channels cover Homebrew, Cargo, and Winget. One catch to watch: on Windows it is installed as git-wt to avoid a name clash with the Windows Terminal's wt. Arch Linux, Conda, and Pixi also carry it.
  • The core commands follow the worktree lifecycle, and an interactive picker streams CI status, diff, log, PR, and comment previews in one place.
  • Quality features are thorough. Hooks fire commands at create, pre-merge, and post-merge moments. LLM commit messages generate the message straight from the diff. The hash_port template filter gives each worktree its own dev server port. wt switch pr:123 jumps straight to the branch behind a PR. Aliases and branch scoped variables are supported.
  • The project launched in early 2026, authored by max-sixty (Maximilian Roos), and has quickly become the most popular git worktree manager. The template system lets you build the on disk path from variables, and together with filters like hash_port the same config grows different ports and variables per worktree, so you skip editing the environment by hand.

License

MIT OR Apache-2.0 (dual license, pick either)

In 2026, running AI agents in parallel became the mainstream way of working, and worktree management is a real pain point you cannot avoid. Worktrunk ships a clean CLI and then stacks on hooks, CoW caching, LLM commits, and a CI aware picker, which quickly put it at the top of this niche. It has about 11.6k stars in total, with roughly 546 stars added that day.

Where to Find It

https://github.com/max-sixty/worktrunk (docs https://worktrunk.dev)

Getting Started

Start by spinning up a worktree with wt switch -c feat to feel the flow, then run wt list to see whether the status display matches what you expect. To run agents in parallel, open one worktree per task and use hash_port to spread the dev server ports so they do not fight over the same address. When it comes to commits, turn on LLM commit messages to keep the messages coherent and make it easier to review later what each worktree changed. In production, set Hooks on pre-merge to validate, which lowers the risk of merging half done work back to the main branch. For cleanup, use wt remove consistently instead of deleting directories by hand and leaving dangling references. As you settle in, look at aliases and branch scoped variables to trim the commands you type most, since those also help keep each agent's environment consistent. Windows users should remember the command name git-wt and not confuse it with the Windows Terminal's wt, or the command will open the terminal instead.

Summary

Worktrunk moves Git worktrees from "usable but awkward" to "handy enough to use every day". For teams that want several AI agents working in parallel without being slowed by directories and build caches, it removes the chore of hand writing scripts to stitch worktrees together, and that makes it a low level tool worth installing.

FAQ

wt or git-wt, which one is correct? On Windows the command is git-wt, installed that way to avoid clashing with the Windows Terminal's built in wt. On macOS and Linux it is normally just wt. Check the platform note at install time and you are fine.

Which projects benefit most from the copy on write cache? Projects with large directories like target/ in Rust or node_modules/ in Node gain the most. Worktrunk shares those directories with CoW on APFS, btrfs, and XFS, so each worktree skips the repeated build.

Can multiple agents edit the same repo at once? Yes, and that is exactly what it is built for. Each agent takes its own worktree and they stay out of each other's way. When done, use wt merge to bring the results back. The key is giving each worktree a different port so the dev servers do not grab the same address.