Skip to main content

Manage parallel Gemini CLI instances

Project description

🔷 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:

  1. Branch Creation → Each session gets its own branch (gemini-{timestamp} or your custom name)
  2. Worktree Setup → Creates a separate directory in .gemini/worktrees/ so files don't conflict
  3. Gemini Launch → Starts Gemini 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 → 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

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

gemini_wt-0.1.3.tar.gz (15.7 kB view details)

Uploaded Source

Built Distribution

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

gemini_wt-0.1.3-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file gemini_wt-0.1.3.tar.gz.

File metadata

  • Download URL: gemini_wt-0.1.3.tar.gz
  • Upload date:
  • Size: 15.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.3

File hashes

Hashes for gemini_wt-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6749b4e10be6167cef74d6d7ed89574f1e57be9a94908b73054109991b9fc63f
MD5 881e46ccba141a2fd4a634b0b5a177b6
BLAKE2b-256 6e0c9943fa2b4554a13d559f78902e1db98ad052a932b5a3468511e43c40457e

See more details on using hashes here.

File details

Details for the file gemini_wt-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: gemini_wt-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.8.3

File hashes

Hashes for gemini_wt-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 566c4ab3ba6b563b02b4f551c6a8f3c2c4df3260f3b05c4918c5e2dea570a25c
MD5 2403e81f1c1e4d0fe06f88caca2a2067
BLAKE2b-256 5a4ea38c0c7e323e8297a544e97c55e0e508af849741e7eececf68f7535d807a

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