About this project
Worktrunk is a command-line tool that makes git worktrees as easy to manage as branches, specifically aimed at developers running multiple AI agents (like Claude Code or Codex) in parallel. It provides three core commands—`wt switch`, `wt list`, and `wt merge`—that streamline creating, switching, listing, and cleaning up worktrees. Worktrees are addressed by branch name, with paths computed from a configurable template, and commands also accept worktree paths.
Key features include:
- **Core commands**: `wt switch` to create/switch worktrees (with `-c` to create and `-x` to run a command like launching an agent), `wt list` to show all worktrees with status, CI info, and AI-generated summaries, `wt merge` to squash/rebase/merge and clean up in one step, and `wt remove` for cleanup.
- **Workflow automation**: Hooks for create, pre-merge, post-merge events; LLM-generated commit messages; interactive picker with streaming CI status and diff/log/PR previews; copy-on-write build cache sharing (for `target/`, `node_modules/`, etc. on APFS, btrfs, XFS); PR checkout via `wt switch pr:123`; per-worktree dev server ports via `hash_port` template filter; aliases and per-branch variables.
- **Parallel agent support**: Launch multiple agents in separate worktrees with simple commands, e.g., `wt switch -x claude -c feature-a -- 'Add user authentication'`.
- **Installation**: Available via Homebrew, Cargo, Winget (Windows, as `git-wt`), Arch Linux pacman, Conda/Pixi. Shell integration (`wt config shell install`) enables directory-changing commands.
- **Documentation**: Full docs at worktrunk.dev, with guides for hooks, LLM commits, merge workflows, tips and patterns, and extending via aliases.
Worktrunk is written in Rust and is open-source under MIT or Apache-2.0. It is designed to reduce the friction of managing many parallel worktrees, making it ideal for AI-agent-driven development workflows.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.