Worktrunk is a command-line interface (CLI) tool designed to simplify Git worktree management, specifically optimized for running multiple AI agents—such as Claude Code or Codex—in parallel. By providing each agent with an isolated working directory via native Git worktrees, the tool enables users to manage 5 to 10+ concurrent long-running tasks without directory conflicts. Worktrunk abstracts the cumbersome standard Git worktree UX through three core commands: `wt switch` (which can create branches and execute commands via the `-x` flag), `wt list` (providing an enhanced status view including CI status and AI-generated summaries), and `wt remove` (which handles branch and worktree cleanup). Advanced features include automated workflow hooks (create, pre-merge, post-merge), LLM-generated commit messages, and a streamlined merge workflow that automates squashing, rebasing, and cleanup. To optimize resource usage across parallel environments, Worktrunk utilizes copy-on-write build caches for directories like `node_modules` or `target` on APFS, btrfs, and XFS. Additional utilities include an interactive picker for browsing worktrees with streaming CI status, a `hash_port` template filter for unique dev server ports, and direct PR checkout via `wt switch pr:[ID]`. The tool is available via Homebrew, Cargo, Pacman, and Conda.
Read original
github-trending/rust