Skip to main content

Utility for running Claude Code in parallel and managing dedicated git worktrees.

Project description

🌴 Claude-Worktree

Run multiple Claude Code instances in parallel without stepping on each other. This CLI creates isolated git worktrees for each Claude session, so you can work on different features simultaneously while keeping your main branch clean.

Inspired by a script from aaazzam.

🚀 Quick Start

Jump right in without installing anything:

uvx claude-wt new "implement user authentication"

That's it. You're now working in a clean branch where Claude can't mess up your pristine codebase.

Installation Options

If you prefer global installation:

uv tool install claude-wt

Or from source:

git clone https://github.com/anthropics/claude-wt.git
cd claude-wt
uv install -e .

🎯 Commands

✨ Start Fresh: new

Spin up a new isolated Claude session:

uvx claude-wt new "implement user authentication"

Behind the scenes: creates a timestamp branch, sets up a worktree in /tmp/claude/worktrees/, and launches Claude with your query.

Want a memorable branch name? Use --branch:

uvx claude-wt new "fix the parser" --branch parser-fix

🔄 Pick Up Where You Left Off: resume

Claude sessions are like good TV shows—you want to continue watching:

uvx claude-wt resume 20241201-143022

The session ID is shown when you create it.

📋 See What's Running: list

See all your active worktrees:

uvx claude-wt list

Shows each session with its health status.

🧹 Clean Up: clean

Remove a specific session when you're done:

uvx claude-wt clean 20241201-143022

Or clean everything:

uvx claude-wt clean --all  # The Marie Kondo approach

🔧 How It Works

Think of it like having multiple parallel universes for your code:

  1. Branch Creation → Each session gets its own branch (claude-wt-{timestamp} or your custom name)
  2. Worktree Setup → Creates a separate directory in /tmp/claude/worktrees/ so files don't conflict
  3. Claude Launch → Starts Claude in the isolated environment with full repo access
  4. Session Management → Resume, list, and clean up sessions effortlessly

🎁 Why You'll Love This

  • Fear-Free Experimentation → Claude can't break your main branch even if it tries
  • Mental Clarity → No more "did I commit that test code?" anxiety
  • Context Switching → Jump between different Claude conversations effortlessly
  • Easy Cleanup → One command to remove all experimental branches
  • Clean History → Your main branch stays pristine for serious work

📋 What You Need

  • Python 3.12+
  • Git with worktree support (any recent version)
  • Claude CLI (installed and authenticated)

🛠️ Development

Uses uv for dependency management:

uv sync
uv run claude-wt --help

Or test changes without installing:

uvx --from . claude-wt --help

Built with the assumption that your Claude sessions shouldn't be a game of git-roulette with your main branch.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_wt-0.1.0.tar.gz (8.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_wt-0.1.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file claude_wt-0.1.0.tar.gz.

File metadata

  • Download URL: claude_wt-0.1.0.tar.gz
  • Upload date:
  • Size: 8.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.15

File hashes

Hashes for claude_wt-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6074b5ebfb40d3f0228998243d93fc2c061e7b74f14238ed805a5a4ed1e8cd5a
MD5 db20a7899a7cf247a0968e4a32319a7d
BLAKE2b-256 cd846ee17dcd35a38477c06274a478d1625beaa0f8c1bce30bf559e37c9b0c3f

See more details on using hashes here.

File details

Details for the file claude_wt-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: claude_wt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.7.15

File hashes

Hashes for claude_wt-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 c3002b14ef8f502eeb9dbe0288d8b9b73f702b50ecaa863fe742dab94f53f41e
MD5 a77ed80b31a3ab3c30d9811204a3d2b9
BLAKE2b-256 9a6a42608789cb84712f597f2a0e4399239a55651c487138221670f739560691

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page