🔷 Gemini-Worktree
Run multiple Gemini Code instances in parallel without stepping on each other. This CLI creates isolated git worktrees for each Gemini session, so you can work on different features simultaneously while keeping your main branch clean.
This is a fork of claude-wt that works with Gemini instead of Claude. Inspired by Jeremiah Lowin.
🚀 Quick Start
Jump right in without installing anything:
uvx gemini-wt new
That's it. You're now working in a clean branch where Gemini can't mess up your pristine codebase.
Installation Options
If you prefer global installation:
uv tool install gemini-wt
🎯 Commands
✨ Start Fresh: new
Spin up a new isolated Gemini session:
uvx gemini-wt new
Behind the scenes: creates a timestamp branch, sets up a worktree in .gemini/worktrees/, and launches Gemini in the isolated environment.
Want a memorable branch name? Use --name:
uvx gemini-wt new --name parser-fix
Need to branch from a specific source? Use --branch:
uvx gemini-wt new --branch main --name hotfix-123
🔄 Pick Up Where You Left Off: resume
Gemini sessions are like good TV shows—you want to continue watching:
uvx gemini-wt resume 20241201-143022 (your the branch name)
The session ID is shown when you create it.
📋 See What's Running: list
See all your active worktrees:
uvx gemini-wt list
Shows each session with its health status.
🧹 Clean Up: clean
Remove a specific session when you're done:
uvx gemini-wt clean 20241201-143022
Or clean everything:
uvx gemini-wt clean --all # The Marie Kondo approach
🔧 How It Works
Think of it like having multiple parallel universes for your code:
- Branch Creation → Each session gets its own branch (
gemini-{timestamp}or your custom name) - Worktree Setup → Creates a separate directory in
.gemini/worktrees/so files don't conflict - Gemini Launch → Starts Gemini in the isolated environment with full repo access
- Session Management → Resume, list, and clean up sessions effortlessly
🎁 Why You'll Love This
- Fear-Free Experimentation → Gemini 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 Gemini 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)
- Gemini CLI (installed and authenticated)
🛠️ Development
Uses uv for dependency management:
uv sync
uv run gemini-wt --help
Or test changes without installing:
uvx --from . gemini-wt --help
Metadata
Release files for gemini-wt 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| gemini_wt-0.1.3.tar.gz | 15.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| gemini_wt-0.1.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 22.3 kB
Release files / gemini_wt-0.1.3.tar.gz
| Download URL | gemini_wt-0.1.3.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6749b4e10be6167cef74d6d7ed89574f1e57be9a94908b73054109991b9fc63f
|
|
BLAKE2b-256 checksum How to use checksums |
6e0c9943fa2b4554a13d559f78902e1db98ad052a932b5a3468511e43c40457e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.3
|
Release files / gemini_wt-0.1.3-py3-none-any.whl
| Download URL | gemini_wt-0.1.3-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
566c4ab3ba6b563b02b4f551c6a8f3c2c4df3260f3b05c4918c5e2dea570a25c
|
|
BLAKE2b-256 checksum How to use checksums |
5a4ea38c0c7e323e8297a544e97c55e0e508af849741e7eececf68f7535d807a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.8.3
|