Repolode
max-sixty

max-sixty/worktrunk

A Rust CLI for managing git worktrees by branch name, built for running multiple AI coding agents in parallel.

Stars
9,341
Forks
333
Open issues
67
Last commit
3 hours ago

What is it?

Worktrunk is a command-line tool for managing git worktrees. Instead of juggling paths and raw git commands, you address each worktree by its branch name: `wt switch` moves between them, `wt list` shows their status, and `wt remove` cleans them up along with the branch. Creating a worktree for a new branch takes a single command, and the directory path is computed from a configurable template.

The project is aimed at workflows where several AI agents such as Claude Code or Codex work on separate tasks at once, each in its own worktree so their changes do not collide. Hooks run commands on events like worktree creation or merge, `wt step copy-ignored` shares build caches such as `target/` or `node_modules/` between worktrees on supported filesystems, and `wt switch pr:123` checks out a pull request's branch.

Worktrunk also includes a local merge command that squashes, rebases, and fast-forwards into the main branch before cleaning up, plus optional LLM-generated commit messages and CI status shown in `wt list --full`. It installs through Homebrew, Cargo, Winget, Arch Linux packages, and conda-forge, and it sets up shell integration so commands can change directories.

Key features

  • 01Switch, create, list, and remove worktrees by branch name
  • 02Start an AI agent such as Claude in a new worktree with one command
  • 03Configurable path templates for worktree directories
  • 04Hooks that run commands on create, pre-merge, and post-merge events
  • 05Share build caches like target/ and node_modules/ across worktrees on APFS, btrfs, and XFS
  • 06Check out pull request branches with wt switch pr:123

Use cases

  • Running several AI coding agents on separate features without their edits colliding
  • Reviewing and testing multiple branches side by side, each with its own dev server port
  • Squashing, rebasing, and merging a finished feature branch into main from the terminal
  • Checking out a teammate's pull request into a separate directory without disturbing current work

Quick start

  1. 1

    Install via Homebrew and set up shell integration

    brew install worktrunk && wt config shell install
  2. 2

    Create a worktree for a new feature

    wt switch --create feature-auth
  3. 3

    List all worktrees with status

    wt list

Things to know

  • The license is listed as NOASSERTION in the metadata, so check the repository's license terms before use.
  • Shell integration is needed for commands to change directories, and Windows uses a different command name (git-wt) by default.

Topics

FAQ

What is worktrunk?
A Rust CLI for managing git worktrees by branch name, built for running multiple AI coding agents in parallel. Worktrunk is a command-line tool for managing git worktrees. Instead of juggling paths and raw git commands, you address each worktree by its branch name: `wt switch` moves between them, `wt list` shows their status, and `wt remove` cleans them up along with the branch. Creating a worktree for a new branch takes a single command, and the directory path is computed from a configurable template.
Is worktrunk free to use? What license does it have?
worktrunk is open source under the Other license. Check the license terms before using it in commercial products.
Is worktrunk still maintained?
Actively maintained. The last commit to worktrunk was on Oct 21, 2026.
What can I use worktrunk for?
Running several AI coding agents on separate features without their edits colliding Reviewing and testing multiple branches side by side, each with its own dev server port Squashing, rebasing, and merging a finished feature branch into main from the terminal Checking out a teammate's pull request into a separate directory without disturbing current work
How do I install worktrunk?
Install via Homebrew and set up shell integration: brew install worktrunk && wt config shell install Create a worktree for a new feature: wt switch --create feature-auth List all worktrees with status: wt list
Where can I get worktrunk?
The source code and installation instructions are on GitHub: https://github.com/max-sixty/worktrunk

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects