{"id":47638706,"url":"https://github.com/davedev42/git-worktree-manager","last_synced_at":"2026-04-13T15:01:07.233Z","repository":{"id":345266019,"uuid":"1185145401","full_name":"DaveDev42/git-worktree-manager","owner":"DaveDev42","description":"Rust rewrite of claude-worktree — CLI integrating git worktree with AI coding assistants","archived":false,"fork":false,"pushed_at":"2026-04-12T15:58:06.000Z","size":653,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-12T16:12:29.584Z","etag":null,"topics":["ai","cli","developer-tools","git","rust","terminal","worktree"],"latest_commit_sha":null,"homepage":"https://github.com/DaveDev42/git-worktree-manager","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/DaveDev42.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-18T09:32:28.000Z","updated_at":"2026-04-12T15:54:55.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/DaveDev42/git-worktree-manager","commit_stats":null,"previous_names":["davedev42/git-worktree-manager"],"tags_count":25,"template":false,"template_full_name":null,"purl":"pkg:github/DaveDev42/git-worktree-manager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveDev42%2Fgit-worktree-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveDev42%2Fgit-worktree-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveDev42%2Fgit-worktree-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveDev42%2Fgit-worktree-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DaveDev42","download_url":"https://codeload.github.com/DaveDev42/git-worktree-manager/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DaveDev42%2Fgit-worktree-manager/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31757482,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T13:27:56.013Z","status":"ssl_error","status_checked_at":"2026-04-13T13:21:23.512Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","cli","developer-tools","git","rust","terminal","worktree"],"created_at":"2026-04-02T00:31:40.583Z","updated_at":"2026-04-13T15:01:07.218Z","avatar_url":"https://github.com/DaveDev42.png","language":"Rust","readme":"# git-worktree-manager (gw)\n\n[![crates.io](https://img.shields.io/crates/v/git-worktree-manager.svg)](https://crates.io/crates/git-worktree-manager)\n[![CI](https://github.com/DaveDev42/git-worktree-manager/actions/workflows/test.yml/badge.svg)](https://github.com/DaveDev42/git-worktree-manager/actions)\n[![License: BSD-3-Clause](https://img.shields.io/badge/License-BSD%203--Clause-blue.svg)](LICENSE)\n\nCLI tool integrating git worktree with AI coding assistants. Single static binary (~1.9MB), instant startup (~3ms).\n\nSupports macOS (ARM64/x86), Linux (ARM64/x86), and Windows (x86_64).\n\nSuccessor to [claude-worktree](https://github.com/DaveDev42/claude-worktree) (Python).\n\n\u003e **Backward compatible:** The `cw` command is included as an alias. Existing `cw` workflows, `.cwshare`, and `.cwconfig.json` files work unchanged.\n\n## Install\n\n```bash\ncargo install git-worktree-manager\n```\n\nThis installs both `gw` and `cw` binaries.\n\n\u003cdetails\u003e\n\u003csummary\u003eOther installation methods\u003c/summary\u003e\n\n```bash\n# Homebrew (macOS/Linux)\nbrew tap DaveDev42/tap\nbrew install git-worktree-manager\n\n# cargo-binstall (pre-built binary, no compile)\ncargo binstall git-worktree-manager\n\n# Direct download\n# https://github.com/DaveDev42/git-worktree-manager/releases/latest\n```\n\n\u003c/details\u003e\n\nAfter installing, run `gw upgrade` at any time to update to the latest version (self-replacing binary). Homebrew users should use `brew upgrade git-worktree-manager` instead.\n\n## Quick Start\n\n```bash\n# Create a worktree and launch your AI coding assistant\ngw new fix-auth\n\n# Create with a specific terminal launcher\ngw new fix-auth --term tmux\n\n# Create and pass an initial prompt to the AI tool\ngw new fix-auth --prompt \"Fix the JWT token expiration bug in auth.rs\"\n\n# List all worktrees\ngw list\n\n# Resume an AI session in an existing worktree\ngw resume fix-auth\n\n# Create a GitHub PR\ngw pr\n\n# Merge back to base branch and clean up\ngw merge\n```\n\n## Commands\n\n| Command | Description |\n|---------|-------------|\n| `gw new \u003cname\u003e` | Create worktree + launch AI tool |\n| `gw resume [branch]` | Resume AI session in worktree |\n| `gw shell [branch]` | Open shell in worktree |\n| `gw pr [branch]` | Create GitHub PR |\n| `gw merge [branch]` | Rebase + merge + cleanup |\n| `gw delete \u003ctarget\u003e` | Remove worktree |\n| `gw list` | List all worktrees |\n| `gw status` | Show current worktree info |\n| `gw tree` | Visual tree display |\n| `gw stats` | Usage analytics |\n| `gw diff \u003cb1\u003e \u003cb2\u003e` | Compare branches |\n| `gw sync [branch]` | Rebase on base branch |\n| `gw change-base \u003cnew-base\u003e [branch]` | Change base branch for worktree |\n| `gw clean` | Batch cleanup (`--merged`, `--older-than`) |\n| `gw backup create/list/restore` | Git bundle backup |\n| `gw stash save/list/apply` | Worktree-aware stash |\n| `gw hook add/remove/list/...` | Lifecycle hooks |\n| `gw config ...` | Configuration management |\n| `gw export` / `gw import` | Config export/import |\n| `gw doctor` | Health check diagnostics |\n| `gw upgrade` | Self-update to latest version |\n| `gw scan` | Register repos for global mode |\n| `gw prune` | Clean up stale registry entries |\n| `gw setup-claude` | Install Claude Code skill |\n| `gw shell-setup` | Interactive shell integration setup |\n| `gw -g \u003ccmd\u003e` | Global mode (cross-repo) |\n\n## Terminal Launchers\n\nControl how AI tools are launched with `--term` (or configure a default via `gw config set launch.method`):\n\n```bash\ngw new fix-auth --term tmux         # New tmux session\ngw new fix-auth --term iterm-tab    # New iTerm tab\ngw new fix-auth --term zellij       # New Zellij session\ngw new fix-auth --term wezterm-tab  # New WezTerm tab\ngw resume fix-auth --bg             # Background launch\n```\n\n| Launcher | Variants |\n|----------|----------|\n| **Foreground** | `foreground` (default) |\n| **Detached** | `detach` |\n| **iTerm** | `iterm-window`, `iterm-tab`, `iterm-pane-h`, `iterm-pane-v` |\n| **tmux** | `tmux`, `tmux-window`, `tmux-pane-h`, `tmux-pane-v` |\n| **Zellij** | `zellij`, `zellij-tab`, `zellij-pane-h`, `zellij-pane-v` |\n| **WezTerm** | `wezterm-window`, `wezterm-tab`, `wezterm-tab-bg`, `wezterm-pane-h`, `wezterm-pane-v` |\n\nEach launcher also has a short alias (e.g., `t` for tmux, `i-t` for iterm-tab).\n\n## Claude Code Integration\n\nDelegate coding tasks to isolated worktrees directly from Claude Code:\n\n```bash\ngw setup-claude    # One-time setup: installs the /gw skill\n```\n\nOnce installed, use the `/gw` slash command or natural language in Claude Code to delegate tasks. Each task runs in its own worktree with a separate Claude Code instance.\n\n## Shell Integration\n\n```bash\n# Interactive setup (recommended)\ngw shell-setup\n```\n\n\u003cdetails\u003e\n\u003csummary\u003eManual setup\u003c/summary\u003e\n\n```bash\n# bash/zsh - add to your shell rc file\nsource \u003c(gw _shell-function bash)\n\n# fish\ngw _shell-function fish | source\n```\n\n\u003c/details\u003e\n\nThis enables:\n- **`gw-cd \u003cbranch\u003e`** - Navigate to a worktree directory (interactive selector if no args)\n- **Tab completion** - Branch names, config keys, and options\n\nGenerate shell completions separately with `gw --generate-completion \u003cbash|zsh|fish|powershell|elvish\u003e`.\n\n## Configuration\n\nConfig file: `~/.config/git-worktree-manager/config.json` (also reads legacy `~/.config/claude-worktree/config.json`)\n\n```bash\ngw config show                     # Show current config\ngw config list                     # List all keys with descriptions\ngw config set \u003ckey\u003e \u003cvalue\u003e        # Set a value\ngw config get \u003ckey\u003e                # Get a value\ngw config reset                    # Reset to defaults\n```\n\n### AI Tool Presets\n\n```bash\ngw config use-preset claude              # Default\ngw config use-preset claude-yolo         # Skip permission prompts\ngw config use-preset claude-remote       # Remote control mode\ngw config use-preset claude-yolo-remote  # Remote + skip permissions\ngw config use-preset codex               # OpenAI Codex\ngw config use-preset codex-yolo          # Codex without sandbox\ngw config use-preset no-op               # No AI tool\n```\n\n### Environment Variables\n\n| Variable | Description |\n|----------|-------------|\n| `CW_AI_TOOL` | Override AI tool command (space-separated) |\n| `CW_LAUNCH_METHOD` | Override terminal launch method |\n\n## Hooks\n\nRun custom commands at lifecycle events. Pre-hooks abort the operation on failure.\n\n```bash\ngw hook add worktree.post_create \"npm install\"\ngw hook add pr.pre \"cargo test\" --description \"Run tests before PR\"\ngw hook list\ngw hook disable worktree.post_create \u003chook-id\u003e\n```\n\n**Available events:** `worktree.pre_create`, `worktree.post_create`, `worktree.pre_delete`, `worktree.post_delete`, `merge.pre`, `merge.post`, `pr.pre`, `pr.post`, `resume.pre`, `resume.post`, `sync.pre`, `sync.post`\n\nHook context is passed via `CW_*` environment variables.\n\n## License\n\nBSD-3-Clause\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavedev42%2Fgit-worktree-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavedev42%2Fgit-worktree-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavedev42%2Fgit-worktree-manager/lists"}