https://github.com/jlowin/claude-wt
๐ด Simple utility for managing parallel Claude Code instances
https://github.com/jlowin/claude-wt
agent claude claude-ai claude-code
Last synced: 2 months ago
JSON representation
๐ด Simple utility for managing parallel Claude Code instances
- Host: GitHub
- URL: https://github.com/jlowin/claude-wt
- Owner: jlowin
- Created: 2025-06-26T01:27:01.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-07-07T16:41:44.000Z (3 months ago)
- Last Synced: 2025-07-07T17:02:17.827Z (3 months ago)
- Topics: agent, claude, claude-ai, claude-code
- Language: Python
- Homepage:
- Size: 23.4 KB
- Stars: 4
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ๐ด 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](https://github.com/aaazzam).*
## ๐ Quick Start
Jump right in without installing anything:
```bash
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:
```bash
uv tool install claude-wt
```Or from source:
```bash
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:
```bash
uvx claude-wt new "implement user authentication"
```Behind the scenes: creates a timestamp branch, sets up a worktree in `.claude-wt/worktrees/`, and launches Claude with your query.
Want a memorable branch name? Use `--name`:
```bash
uvx claude-wt new "fix the parser" --name parser-fix
```Need to branch from a specific source? Use `--branch`:
```bash
uvx claude-wt new "hotfix for prod" --branch main --name hotfix-123
```### ๐ Pick Up Where You Left Off: `resume`
Claude sessions are like good TV showsโyou want to continue watching:
```bash
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:
```bash
uvx claude-wt list
```Shows each session with its health status.
### ๐งน Clean Up: `clean`
Remove a specific session when you're done:
```bash
uvx claude-wt clean 20241201-143022
```Or clean everything:
```bash
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 `.claude-wt/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:
```bash
uv sync
uv run claude-wt --help
```Or test changes without installing:
```bash
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.*