A CLI tool for managing Claude instances with git worktree for parallel development workflows.
This project is designed as a personal workflow tool, tailored to my specific development needs. While you're welcome to use it as-is, I won't be merging features that I don't personally use. Instead, I encourage you to fork this project and make it your own! Feel free to customize it to perfectly fit your workflow, that's the beauty of open source. Your fork might even become the perfect solution for others with similar needs.
- Create isolated workspaces: Each Claude instance runs in its own git worktree
- Seamless switching: Open and switch between multiple development contexts
- Smart cleanup: Safely delete worktrees with uncommitted change detection
- Session tracking: View Claude conversation history across instances
- Random naming: Generate memorable names using BIP39 word list
cargo install xlaudeOr build from source:
git clone https://github.com/xuanwo/xlaude
cd xlaude
cargo build --release# Create with custom name
xlaude create feature-auth
# Create with random name (e.g., "dolphin", "rabbit")
xlaude createThis creates a new git worktree at ../<repo>-<name> and a corresponding branch.
# Open specific workspace
xlaude open feature-auth
# Open current directory if it's a worktree
xlaude open
# Interactive selection (when not in a worktree)
xlaude openThis switches to the worktree directory and launches Claude with --dangerously-skip-permissions. When run without arguments in a worktree directory, it opens the current worktree directly.
# Add current worktree with branch name
cd ../myproject-bugfix
xlaude add
# Add with custom name
xlaude add hotfixxlaude listShows all managed worktrees with:
- Name, repository, and path
- Creation time
- Recent Claude sessions (up to 3)
- Last user message from each session
# Delete current workspace
xlaude delete
# Delete specific workspace
xlaude delete feature-authPerforms safety checks for:
- Uncommitted changes
- Unpushed commits
- Branch merge status
- Confirms before deletion when needed
xlaude cleanRemoves worktrees from state management that have been manually deleted using git worktree remove.
xlaude rename <old_name> <new_name>Renames a worktree in xlaude management. This only updates the xlaude state and doesn't affect the actual git worktree or directory.
-
Start a new feature:
xlaude create auth-system xlaude open auth-system
-
Work on the feature with Claude assistance
-
Switch contexts:
xlaude open # Select another workspace # Or if you're already in a worktree directory: cd ../project-feature xlaude open # Opens current worktree directly
-
Clean up when done:
xlaude delete auth-system # Or clean up all invalid worktrees: xlaude clean
State is persisted to platform-specific locations:
- macOS:
~/Library/Application Support/com.xuanwo.xlaude/state.json - Linux:
~/.config/xlaude/state.json - Windows:
%APPDATA%\xuanwo\xlaude\config\state.json
- Worktree keys use format:
<repo-name>/<worktree-name>(v0.3+) - Automatic migration from older formats
- Tracks creation time and Claude session history
- Git with worktree support
- Claude CLI installed
- Rust (for building from source)
Licensed under the Apache License, Version 2.0. See LICENSE for details.