Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsMay 1, 2026·3 min de lecture

Worktrunk — Git Worktree Manager for Parallel AI Agents

Worktrunk is a Rust CLI that simplifies Git worktree management, making it easy to run multiple AI coding agents in parallel on isolated branches of the same repository.

Introduction

Worktrunk takes the friction out of Git worktrees so you can spin up isolated working copies for parallel AI agents in seconds. Each agent gets its own directory and branch, preventing conflicts while sharing the same repository history.

What Worktrunk Does

  • Creates and manages Git worktrees with short, memorable names
  • Automatically creates and checks out feature branches for each worktree
  • Provides a status overview showing all active worktrees and their branches
  • Cleans up worktrees and associated branches in a single command
  • Designed for workflows where multiple AI agents work on the same repo simultaneously

Architecture Overview

Worktrunk is a thin Rust CLI wrapping Git's worktree subsystem. It maintains a lightweight index of active worktrees in the repo's .git directory and adds conventions for branch naming and directory placement. All operations delegate to Git commands under the hood, ensuring full compatibility with existing Git workflows and hosting platforms.

Self-Hosting & Configuration

  • Install from crates.io with cargo install worktrunk or download a prebuilt binary
  • No configuration file needed; follows Git conventions automatically
  • Worktrees are created in a sibling directory by default (configurable via --path)
  • Works with any Git remote — GitHub, GitLab, Bitbucket, or self-hosted
  • Integrates with Claude Code and Codex by pointing each agent session at a different worktree path

Key Features

  • Single-command worktree creation with automatic branch setup
  • Clean teardown that removes both the worktree directory and the tracking branch
  • Status dashboard showing all active worktrees at a glance
  • Fast Rust binary with no runtime dependencies
  • MIT licensed and designed for the agentic coding workflow

Comparison with Similar Tools

  • git worktree (raw) — manual branch and path management; Worktrunk automates the ceremony
  • Git Town — focuses on branch workflow conventions; Worktrunk focuses on parallel agent isolation
  • Worktree plugin for VS Code — IDE-specific; Worktrunk is editor-agnostic and CLI-first
  • tmux/screen sessions — process isolation only; Worktrunk provides filesystem and branch isolation

FAQ

Q: Does Worktrunk modify my Git history? A: No. It only creates worktrees and branches using standard Git operations.

Q: Can two agents edit the same file simultaneously? A: Each agent works in its own worktree with a separate working directory, so there are no filesystem conflicts. Merge conflicts are resolved when branches are merged.

Q: Does it work with shallow clones? A: Yes, as long as the underlying Git version supports worktrees with shallow repos.

Q: How do I integrate it with Claude Code? A: Create a worktree with worktrunk create task-name, then launch Claude Code with --cwd pointing to the worktree directory.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires