TopGit
GitHub Repo Review

Worktrunk: git worktree management for AI agent workflows

max-sixty/worktrunk
WTopGit review image for max-sixty/worktrunk
Review by Topgit.dev for max-sixty/worktrunk, with GitHub repository stats and README context.
Quick verdict

Worktrunk is worth installing the moment you're running even one AI agent in parallel with other work. Native git worktree commands require typing a branch name three times just to create one worktree; Worktrunk reduces the common cases to a single command. The catch is that shell integration is effectively required for the full experience, and the copy-on-write build cache only works on APFS, btrfs, and XFS, leaving ext4 users without that particular benefit.

Stars
โ˜… 11.8k
Forks
โ‘‚ 455
Contributors
๐Ÿ‘ฅ 76
Language
Rust
License
See repository
Topic
Developer Tools
Updated
Nov 2026

What is Worktrunk

Worktrunk is a Rust CLI that wraps git worktree operations into developer-friendly commands. It computes worktree paths from branch names using a configurable template, provides a status-rich list view showing ahead/behind counts and commit messages, and integrates with the shell so switching worktrees also changes directories. The README describes it as designed specifically for parallel AI agent workflows, letting multiple Claude Code or Codex instances each work in an isolated directory without conflicts.

Core commands and capabilities

  • โœ“`wt switch` creates or navigates to worktrees by branch name; paths are computed automatically
  • โœ“`wt list` shows all worktrees with status, staged changes, ahead/behind counts, and commit messages
  • โœ“`wt remove` deletes a worktree and optionally its associated branch
  • โœ“`wt merge` squashes, rebases onto a target branch, and cleans up the worktree in one command
  • โœ“`wt step` automates the commit-push lifecycle with LLM-generated commit messages
  • โœ“Hooks run custom commands on worktree creation, pre-merge, post-merge, and other lifecycle events
  • โœ“Copy-on-write shared build caches avoid rebuilding `target/` and `node_modules/` across worktrees
  • โœ“Interactive picker with streaming CI status and diff/PR previews for browsing worktrees visually
How this repository's GitHub stars have grown over time. Source: star-history.com.View the star history โ†—

When to reach for Worktrunk

  • โ€ขRunning multiple AI agents in parallel, each in its own worktree, without agents overwriting each other's changes
  • โ€ขManaging several feature branches simultaneously without checkout switching overhead
  • โ€ขSharing compiled artifacts across worktrees on APFS, btrfs, or XFS filesystems to skip rebuilds
  • โ€ขAutomating development environment setup with hooks that install deps or start dev servers on worktree creation
  • โ€ขPerforming a full commit-merge-cleanup cycle locally without leaving the terminal
  • โ€ขQuick PR review by jumping directly to a PR's branch with `wt switch pr:123`

Installing Worktrunk

Install Worktrunk via Homebrew on macOS or Linux: `brew install worktrunk && wt config shell install`. On Windows, use Winget: `winget install max-sixty.worktrunk`, which installs as `git-wt` to avoid a conflict with Windows Terminal's `wt` alias. From source, run `cargo install worktrunk`. Arch Linux users can `sudo pacman -S worktrunk`. Conda and Pixi users find it in the conda-forge feedstock. After any install, run `wt config shell install` to enable shell integration that changes directories automatically.

Getting started with wt switch and wt list

Create a new worktree for a feature branch and switch to it with a single command: `wt switch --create feature-auth`. This creates the branch, the worktree directory, and drops you into it. Run `wt list` to see every worktree with its status, staged changes, and commit context. When done, `wt remove` cleans up the worktree and the branch. To launch Claude Code directly in a new worktree: `wt switch -x claude -c feature-b -- 'Fix pagination'`. The `-x` flag runs the following command after switching; everything after `--` passes through as arguments.

What Worktrunk adds over plain git

  • โœ“One command replaces the three-to-four git operations normally needed to create a worktree and enter it
  • โœ“Branch names are the primary identifier, so path management becomes unnecessary for common operations
  • โœ“Shell integration changes the working directory automatically when switching worktrees
  • โœ“Interactive picker shows CI status and PR summaries without leaving the terminal
  • โœ“Shared build caches prevent rebuilding dependencies across ten worktrees on supported filesystems
  • โœ“Native launch support for Claude Code and Codex makes AI agent workflows feel designed, not bolted on

Constraints and edge cases

  • โ–ณShell integration (`wt config shell install`) is effectively required for the full experience, adding a setup step on every machine
  • โ–ณCopy-on-write build cache sharing works only on APFS, btrfs, and XFS; ext4 users lose this feature entirely
  • โ–ณWindows requires either disabling the Windows Terminal `wt` alias or using `git-wt` as the command name
  • โ–ณThe repository metadata shows the license field as unknown, which may matter for some compliance reviews
View on GitHub โ†—Homepage โ†—

Other git worktree tools

Native git worktree commands โ€” available everywhere without installation, but require manual path management and offer no status viewgh pr checkout โ€” GitHub CLI's built-in PR checkout that works without Worktrunk, but lacks worktree management featureslazygit โ€” a terminal UI for git that includes worktree support among many other features, but is heavier and less focused on worktree automation โ†—

Frequently asked questions

How do I install Worktrunk on macOS, Linux, or Windows?

On macOS and Linux, Homebrew is the quickest route: brew install worktrunk && wt config shell install. Windows users run winget install max-sixty.worktrunk, which installs as git-wt to avoid clashing with Windows Terminal's wt alias. From source, use cargo install worktrunk. Arch Linux has it in pacman, and conda-forge distributes it for Conda and Pixi users.

Does Worktrunk work with Claude Code and Codex AI agents?

Yes. Worktrunk was designed around these agents. Pass -x claude to wt switch to launch Claude Code after creating or entering a worktree, with arguments after -- forwarded to the agent. Codex is supported the same way. Each agent gets its own isolated working directory, so they won't overwrite each other's changes.

How does shell integration work and why do I need to run wt config shell install?

This command modifies your shell configuration so that Worktrunk can change the current working directory when you switch worktrees. Without it, wt switch enters the worktree but your terminal stays in the old directory. The integration works with bash, zsh, fish, nushell, and pwsh. You run it once per machine.

Can Worktrunk share build caches across worktrees to avoid rebuilding?

Yes. On supported filesystems, Worktrunk can make multiple worktrees share target/, node_modules/, and other build directories without copying or rebuilding them. This uses the filesystem's copy-on-write mechanism, so changes in one worktree stay isolated. The README calls this out as a specific workflow benefit for teams running many worktrees.

What filesystems support the copy-on-write build cache sharing?

APFS (macOS default), btrfs (common on Linux), and XFS support the copy-on-write feature Worktrunk uses. ext4, the default on most Linux distributions, does not. If your build cache sharing doesn't appear to work, check your filesystem.

How do Worktrunk hooks automate local development workflows?

Hooks are custom commands that run at specific points: create, pre-merge, post-merge, and others. You can use them to install dependencies when a worktree is created, start a dev server, or run tests after a merge. Hooks are configured in Worktrunk's config file and can use per-branch variables for templating.

Who should try it โ€” and who should skip

Worktrunk is essential if you're running AI coding agents in parallel. If you're not yet using agents but manage multiple feature branches actively, the quality-of-life improvements still justify the install. Developers who work on a single branch or rarely juggle context should skip it; the overhead only pays off when the worktree count is two or more.

Related repositories

Source & attribution

GitHub repository max-sixty/worktrunk, https://github.com/max-sixty/worktrunk

GitHub data ยท last synced Sep 26, 2026Reviewed by Henry
โ† Back to TopGit

Is worktrunk worth your time?

ChatGPT, Claude and Perplexity can all read this page. Ask one of them what it makes of worktrunk.

GitHub