max-sixty / worktrunk
Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows
View on GitHubAI Architecture Analysis
This repository is indexed by RepoMind. By analyzing max-sixty/worktrunk in our AI interface, you can instantly generate complete architecture diagrams, visualize control flows, and perform automated security audits across the entire codebase.
Our Agentic Context Augmented Generation (Agentic CAG) engine loads full source files into context on-demand, avoiding the fragmentation of traditional RAG systems. Ask questions about the architecture, dependencies, or specific features to see it in action.
Repository Overview (README excerpt)
Crawler view Worktrunk > **March 2026**: Worktrunk was released at the start of the year, and has quickly become the most popular git worktree manager. It's built with love (there's no slop!). Please let me know any frictions at all; I'm intensely focused on continuing to make Worktrunk excellent, and the biggest help is folks posting problems they perceive. Worktrunk is a CLI for git worktree management, designed for running AI agents in parallel. Worktrunk's three core commands make worktrees as easy as branches. Plus, Worktrunk has a bunch of quality-of-life features to simplify working with many parallel changes, including hooks to automate local workflows. Scaling agents becomes trivial. A quick demo: > ### š Full documentation at worktrunk.dev š Context: git worktrees AI agents like Claude Code and Codex can handle longer tasks without supervision, such that it's possible to manage 5-10+ in parallel. Git's native worktree feature give each agent its own working directory, so they don't step on each other's changes. But the git worktree UX is clunky. Even a task as small as starting a new worktree requires typing the branch name three times: , then . Worktrunk makes git worktrees as easy as branches Worktrees are addressed by branch name; paths are computed from a configurable template. > Start with the core commands **Core commands:** Task Worktrunk Plain git Switch worktrees wt switch feat cd ../repo.feat Create + start Claude wt switch -c -x claude feat git worktree add -b feat ../repo.feat && \ cd ../repo.feat && \ claude Clean up wt remove cd ../repo && \ git worktree remove ../repo.feat && \ git branch -d feat List with status wt list git worktree list (paths only) > Expand into the more advanced commands as needed **Workflow automation:** ⢠**Hooks** ā run commands on create, pre-merge, post-merge, etc ⢠**LLM commit messages** ā generate commit messages from diffs ⢠**Merge workflow** ā squash, rebase, merge, clean up in one command ⢠**Interactive picker** ā browse worktrees with live diff and log previews ⢠**Copy build caches** ā skip cold starts by sharing , , etc between worktrees ⢠** ** ā CI status and AI-generated summaries per branch ⢠**PR checkout** ā to jump straight to a PR's branch ⢠**Dev server per worktree** ā template filter gives each worktree a unique port ⢠...and **lots more** A demo with some advanced features: Install **Homebrew (macOS & Linux):** Shell integration allows commands to change directories. **Cargo:** Windows On Windows, defaults to Windows Terminal's command. Winget additionally installs Worktrunk as to avoid the conflict: Alternatively, disable Windows Terminal's alias (Settings ā Privacy & security ā For developers ā App Execution Aliases ā disable "Windows Terminal") to use directly. **Arch Linux:** Quick start Create a worktree for a new feature: This creates a new branch and worktree, then switches to it. Do your work, then check all worktrees with : The marks the current worktree. means staged changes, means unpushed commits. When done, either: **PR workflow** ā commit, push, open a PR, merge via GitHub/GitLab, then clean up: **Local merge** ā squash, rebase onto main, fast-forward merge, clean up: For parallel agents, create multiple worktrees and launch an agent in each: The flag runs a command after switching; arguments after are passed to it. Configure post-start hooks to automate setup (install deps, start dev servers). Next steps ⢠Learn the core commands: , , , ⢠Set up project hooks for automated setup ⢠Explore LLM commit messages, interactive picker, Claude Code integration, CI status & PR links ⢠Browse tips & patterns for recipes: aliases, dev servers, databases, agent handoffs, and more ⢠Run or for quick CLI reference Further reading ⢠Claude Code: Best practices for agentic coding ā Anthropic's official guide, including the worktree pattern ⢠Shipping faster with Claude Code and Git Worktrees ā incident.io's workflow for parallel agents ⢠Git worktree pattern discussion ā Community discussion in the Claude Code repo ⢠@DevOpsToolbox's video on Worktrunk ⢠git-worktree documentation ā Official git reference Contributing ⢠ā Star the repo ⢠Tell a friend about Worktrunk ⢠Open an issue ā feedback, feature requests, even a small friction or imperfect user message, or a worktree pain not yet solved ⢠Share: X Ā· Reddit Ā· LinkedIn > ### š Full documentation at worktrunk.dev š Star history