max-sixty/worktrunk

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

What it solves

Worktrunk simplifies the management of git worktrees, which are separate working directories for different branches. This is specifically designed to enable developers to run multiple AI agents (like Claude Code or Codex) in parallel without them interfering with each other's changes, removing the clunky manual overhead of native git worktree commands.

How it works

It provides a CLI that treats worktrees as easily as branches. It uses a configurable template to compute paths automatically based on branch names, allowing users to switch, create, and remove worktrees with single commands. It also integrates with shell environments to handle directory changes automatically.

Who it’s for

Developers who use AI coding agents to handle multiple tasks simultaneously and those who want a more streamlined way to manage parallel feature branches without constantly switching contexts or manually managing multiple directories.

Highlights

  • Parallel Agent Support: Quickly launch AI agents in separate worktrees using the -x flag to run commands after switching.
  • Workflow Automation: Includes hooks for actions like create, pre-merge, and post-merge.
  • AI Integration: Features LLM-generated commit messages and AI-generated branch summaries.
  • Streamlined Merging: A single wt merge command that can squash, rebase, and clean up the worktree in one go.
  • Developer QoL: Includes an interactive picker for browsing worktrees with live diffs, PR checkout capabilities, and build cache sharing to avoid cold starts.