max-sixty

worktrunk: Manage Git Worktrees for Parallel Development

Worktrunk is a Rust CLI that simplifies creating, switching between, and cleaning up Git worktrees. It suits developers running parallel tasks, especially with AI coding agents, who want consistent worktree workflows and automation.

RustOther licenseCLIDeveloper ToolsGit
Stars
8.7k
Forks
315
Stars, last 10 days
+345

Our take

Health score

79/100

How it is scored
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.
ProjectLanguageLicenseStarsStatus
worktrunkRustOther8.7kNot checked yet
opencode-worktreeTypeScriptMIT728Archived

Considerations

  • Shell integration is needed for commands that change directories. The Homebrew setup command installs it.
  • On Windows, wt may conflict with Windows Terminal. The documented Winget installation uses git-wt by 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.

Comparisons