{"name":"Worktrunk: Streamlining Git Worktree Management for AI Agent Workflows","description":"Worktrunk is a powerful CLI tool built in Rust, designed to simplify Git worktree management. It's particularly optimized for parallel AI agent workflows, making it easy to handle multiple development branches simultaneously. By abstracting away the complexities of native Git worktrees, Worktrunk enhances developer productivity with intuitive commands and automation features.","github":"https://github.com/max-sixty/worktrunk","url":"https://osrepos.com/repo/max-sixty-worktrunk","source":"osrepos.com","sourceDescription":"This repository profile is provided by osrepos.com, an open source repository discovery platform.","repositoryProfile":"https://osrepos.com/repo/max-sixty-worktrunk","generatedFor":"open source discovery and AI-assisted research","markdown":"https://osrepos.com/repo/max-sixty-worktrunk.md","json":"https://osrepos.com/repo/max-sixty-worktrunk.json","topics":["Rust","Git","Worktrees","CLI","AI Agents","Developer Tools","Automation"],"keywords":["Rust","Git","Worktrees","CLI","AI Agents","Developer Tools","Automation"],"stars":null,"summary":"Worktrunk is a powerful CLI tool built in Rust, designed to simplify Git worktree management. It's particularly optimized for parallel AI agent workflows, making it easy to handle multiple development branches simultaneously. By abstracting away the complexities of native Git worktrees, Worktrunk enhances developer productivity with intuitive commands and automation features.","content":"## Introduction\n\nWorktrunk is a powerful command-line interface (CLI) tool, meticulously crafted in Rust, designed to revolutionize how developers manage Git worktrees. It has quickly become a popular Git worktree manager, particularly optimized for parallel AI agent workflows, such as Claude Code and Codex, making it easy to handle multiple development branches simultaneously. Worktrunk addresses the inherent complexities and clunky user experience of native Git worktrees, offering a robust solution for modern development practices.\n\n## Why Use Worktrunk and Key Benefits\n\nNative Git worktrees, while powerful, can be cumbersome, especially when dealing with multiple parallel tasks or AI agent-driven development. Worktrunk simplifies this by providing a suite of intuitive commands and advanced features that transform worktree management into a seamless experience.\n\n**Key benefits and features include:**\n\n*   **Simplified Core Commands:** Worktrunk makes common worktree tasks effortless. Commands like `wt switch`, `wt create`, `wt remove`, and `wt list` abstract away the verbose native Git commands, making worktrees as easy to handle as branches.\n\n    Start with the core commands:\n\n    **Core commands:**\n\n    *   **Switch worktrees:**\n        *   Worktrunk: `wt switch feat`\n        *   Plain git: `cd ../repo.feat`\n    *   **Create + start Claude:**\n        *   Worktrunk: `wt switch -c -x claude feat`\n        *   Plain git:\n            bash\ngit worktree add -b feat ../repo.feat && \\\ncd ../repo.feat && \\\nclaude\n            \n    *   **Clean up:**\n        *   Worktrunk: `wt remove`\n        *   Plain git:\n            bash\ncd ../repo && \\\ngit worktree remove ../repo.feat && \\\ngit branch -d feat\n            \n    *   **List with status:**\n        *   Worktrunk: `wt list`\n        *   Plain git: `git worktree list` (paths only)\n\n*   **Workflow Automation:** Expand into the more advanced commands as needed.\n\n    **Workflow automation features:**\n\n    *   **[Hooks](https://worktrunk.dev/hook/)** - run commands on create, pre-merge, post-merge, etc.\n    *   **[LLM commit messages](https://worktrunk.dev/llm-commits/)** - generate commit messages from diffs.\n    *   **[Merge workflow](https://worktrunk.dev/merge/)** - squash, rebase, merge, clean up in one command.\n    *   **[Interactive picker](https://worktrunk.dev/switch/#interactive-picker)** - browse worktrees with live diff and log previews.\n    *   **[Share build caches](https://worktrunk.dev/step/#wt-step-copy-ignored)** - ten worktrees get `target/`, `node_modules/`, etc without building or copying them (on APFS, btrfs, and XFS).\n    *   **[`wt list --full`](https://worktrunk.dev/list/#full-mode)** - [CI status](https://worktrunk.dev/list/#ci-status) and [AI-generated summaries](https://worktrunk.dev/list/#llm-summaries) per branch.\n    *   **[PR checkout](https://worktrunk.dev/switch/#pull-requests-and-merge-requests)** - `wt switch pr:123` to jump straight to a PR's branch.\n    *   **[Dev server per worktree](https://worktrunk.dev/tips-patterns/#dev-server-per-worktree)** - `hash_port` template filter gives each worktree a unique port.\n    *   **[Aliases](https://worktrunk.dev/extending/#aliases) & [per-branch variables](https://worktrunk.dev/config/#wt-config-state-vars)** - custom `wt <name>` commands and branch-scoped state for hook templates.\n    *   ...and lots more.\n\nWorktrunk is built to empower developers working with parallel AI agents, ensuring that managing multiple isolated development environments is no longer a bottleneck but a catalyst for productivity.\n\n## Installation\n\nWorktrunk is easy to install across various platforms. Shell integration is recommended to allow commands to change directories.\n\n**Homebrew (macOS & Linux):**\n\nbash\nbrew install worktrunk && wt config shell install\n\n\n**Cargo:**\n\nbash\ncargo install worktrunk && wt config shell install\n\n\n**Windows:**\n\n`wt` defaults to Windows Terminal's command, so Winget additionally installs Worktrunk as `git-wt` to avoid the conflict:\n\nbash\nwinget install max-sixty.worktrunk\ngit-wt config shell install\n\n\nAlternatively, disable Windows Terminal's alias (Settings ? Apps ? Advanced app settings ? App execution aliases ? \"Terminal\"/\"Terminal Preview\") to use `wt` directly.\n\n**Arch Linux:**\n\nbash\nsudo pacman -S worktrunk && wt config shell install\n\n\n**Conda / Pixi** (community-maintained feedstock):\n\nbash\nconda install -c conda-forge worktrunk && wt config shell install\n\n\nOr with [Pixi](https://pixi.sh): `pixi global install worktrunk && wt config shell install`.\n\n## Examples\n\nWorktrunk simplifies common Git worktree operations. Here's a quick start guide:\n\n**Create a worktree for a new feature:**\n\nconsole\n$ wt switch --create feature-auth\n? Created branch feature-auth from main and worktree @ ~/repo.feature-auth\n\n\nThis command creates a new branch and worktree, then switches to it. After doing your work, you can check all worktrees with `wt list`:\n\nconsole\n$ wt list\n  Branch        Status      HEAD±     main?    main…±    Remote?  Commit    Age  Message\n@ feature-auth  +   ?      +27   -8   ?1       +31                4bc72dc    2h  Add authenticati…\n^ main              ^?                                    ?1      0e631ad    1d  Initial commit\n\n? Showing 2 worktrees, 1 with changes, 1 ahead, hidden: Path\n\n\nThe `@` marks the current worktree. `+` means staged changes, `?1` means 1 commit ahead of main, `?` means unpushed commits.\n\n**When done, you have two primary workflows:**\n\n**PR workflow** - commit, push, open a PR, merge via GitHub/GitLab, then clean up:\n\nbash\nwt step commit                    # commit staged changes\ngh pr create                      # or glab mr create\nwt remove                         # after PR is merged\n\n\n**Local merge** - squash, rebase onto main, fast-forward merge, clean up:\n\nconsole\n$ wt merge main\n? Generating commit message and committing changes... (2 files, +53, no squashing needed)\n  Add authentication module\n? Committed changes @ a1b2c3d\n? Merging 1 commit to main @ a1b2c3d (no rebase needed)\n  * a1b2c3d Add authentication module\n   auth.rs | 51 +++++++++++++++++++++++++++++++++++++++++++++++++++\n   lib.rs  |  2 ++\n   2 files changed, 53 insertions(+)\n? Merged to main (1 commit, 2 files, +53)\n? Removing feature-auth worktree & branch in background (same commit as main, _)\n? Switched to worktree for main @ ~/repo\n\n\n**For parallel agents, create multiple worktrees and launch an agent in each:**\n\nbash\nwt switch -x claude -c feature-a -- 'Add user authentication'\nwt switch -x claude -c feature-b -- 'Fix the pagination bug'\nwt switch -x claude -c feature-c -- 'Write tests for the API'\n\n\nThe `-x` flag runs a command after switching; arguments after `--` are passed to it. Configure [post-start hooks](https://worktrunk.dev/hook/) to automate setup (install dependencies, start development servers).\n\n## Links\n\nExplore Worktrunk further with these resources:\n\n*   **Official Documentation:** [worktrunk.dev](https://worktrunk.dev)\n*   **GitHub Repository:** [max-sixty/worktrunk](https://github.com/max-sixty/worktrunk)\n*   **Further Reading:**\n    *   [Claude Code: Best practices for agentic coding](https://www.anthropic.com/engineering/claude-code-best-practices)\n    *   [Shipping faster with Claude Code and Git Worktrees](https://incident.io/blog/shipping-faster-with-claude-code-and-git-worktrees)\n    *   [Git worktree pattern discussion](https://github.com/anthropics/claude-code/issues/1052)\n    *   [@DevOpsToolbox's video on Worktrunk](https://youtu.be/WBQiqr6LevQ?t=345)\n    *   [git-worktree documentation](https://git-scm.com/docs/git-worktree)\n*   **Contribute:**\n    *   Star the Worktrunk repository on GitHub.\n    *   [Open an issue](https://github.com/max-sixty/worktrunk/issues/new?title=&body=%23%23%20Description%0A%0A%3C!--%20Describe%20the%20bug%20or%20feature%20request%20--%3E%0A%0A%23%23%20Context%0A%0A%3C!--%20Any%20relevant%20context%3A%20your%20workflow%2C%20what%20you%20were%20trying%20to%20do%2C%20etc.%20--%3E) for feedback, feature requests, or to report any frictions.\n    *   Share Worktrunk on [X](https://twitter.com/intent/tweet?text=Worktrunk%20%E2%80%94%20CLI%20for%20git%20worktree%20management&url=https%3A%2F%2Fworktrunk.dev), [Reddit](https://www.reddit.com/submit?url=https%3A%2F%2Fworktrunk.dev&title=Worktrunk%20%E2%80%94%20CLI%20for%20git%20worktree%20management), or [LinkedIn](https://www.linkedin.com/sharing/share-offsite/?url=https%3A%2F%2Fworktrunk.dev).","metrics":{"detailViews":1,"githubClicks":1},"dates":{"published":null,"modified":"2026-09-09T19:59:31.000Z"}}