{"id":50564227,"url":"https://github.com/wbnns/cw","last_synced_at":"2026-06-04T13:01:53.801Z","repository":{"id":336640422,"uuid":"1150539441","full_name":"wbnns/cw","owner":"wbnns","description":"Git worktree manager for running multiple Claude Code instances in parallel","archived":false,"fork":false,"pushed_at":"2026-02-17T20:22:59.000Z","size":31,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-18T01:28:02.715Z","etag":null,"topics":["anthropic","claude","claude-ai","claude-code"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wbnns.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-02-05T11:57:26.000Z","updated_at":"2026-02-17T20:23:03.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/wbnns/cw","commit_stats":null,"previous_names":["wbnns/cw"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/wbnns/cw","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbnns%2Fcw","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbnns%2Fcw/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbnns%2Fcw/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbnns%2Fcw/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wbnns","download_url":"https://codeload.github.com/wbnns/cw/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wbnns%2Fcw/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33905359,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-04T02:00:06.755Z","response_time":64,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":["anthropic","claude","claude-ai","claude-code"],"created_at":"2026-06-04T13:01:52.887Z","updated_at":"2026-06-04T13:01:53.797Z","avatar_url":"https://github.com/wbnns.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# cw\n\nGit worktree manager for running multiple Claude Code instances in parallel.\n\n## Installation\n\nClone or download this repository anywhere on your system, then install with pipx:\n\n```bash\ngit clone https://github.com/wbnns/claude-worktrees ~/claude-worktrees\npipx install ~/claude-worktrees\n```\n\nAfter installation, the `cw` command is available globally.\n\n## Quick Start\n\n```bash\n# Navigate to any git repository\ncd your-repo\n\n# Create a worktree and launch Claude Code\ncw\n```\n\nThat's it. Running `cw` with no arguments:\n1. Auto-initializes config and git hooks (first run only)\n2. Creates a new branch named `wbnns/\u003cunix-timestamp\u003e`\n3. Creates a worktree in `~/cw/\u003crepo\u003e/\u003cbranch\u003e`\n4. Symlinks dependency directories from the main repo\n5. Launches Claude Code in the new worktree\n\n## Commands\n\n### `cw` (no arguments)\n\nCreate a new worktree with auto-generated name and launch Claude Code.\n\n### `cw new [branch]`\n\nCreate a worktree with a specific branch name.\n\n```bash\ncw new feature/auth          # Create new branch + worktree\ncw new --from existing-branch existing-branch  # Use existing branch\ncw new --no-claude           # Don't launch Claude Code\ncw new --no-deps             # Skip dependency symlinking\n```\n\n### `cw list`\n\nList all managed worktrees with status, PR info, and disk usage.\n\n### `cw cleanup`\n\nRemove worktrees for merged branches.\n\n```bash\ncw cleanup              # Interactive\ncw cleanup --dry-run    # Preview what would be removed\ncw cleanup --force      # Remove without prompting\n```\n\n### `cw remove \u003cbranch\u003e`\n\nRemove a specific worktree.\n\n### `cw open \u003cbranch\u003e`\n\nLaunch Claude Code in an existing worktree.\n\n### `cw init`\n\nManually initialize config and git hooks. This runs automatically on first `cw` use, so you typically don't need this.\n\n## Dependency Sharing\n\nTo avoid reinstalling dependencies for each worktree, `cw` symlinks common dependency directories from your main repo:\n\n- **JavaScript/Node:** `node_modules`, `.pnpm-store`, `.yarn/cache`\n- **Ruby/Rails:** `vendor/bundle`, `.bundle`\n- **Python/Django:** `.venv`, `venv`, `env`\n- **PHP:** `vendor`\n- **Go:** `vendor`\n- **Elixir:** `deps`\n- **iOS/macOS:** `Pods`\n- **Java/Kotlin:** `.gradle`\n\nAll worktrees share the same dependencies, saving disk space and install time.\n\n## Dotfiles\n\n`cw` also symlinks common environment dotfiles so your config is available in each worktree:\n\n- `.env`\n- `.env.local`\n- `.env.development`\n- `.env.development.local`\n- `.env.test`\n- `.env.test.local`\n\n## Configuration\n\nOptional config at `~/.claude-worktrees.toml`:\n\n```toml\n[global]\nworktree_base = \"~/cw\"\nauto_cleanup = true\n\n[deps]\nstrategy = \"symlink\"  # symlink | copy | custom\n# post_create_hook = \"bundle install\"  # for custom strategy\n\n[github]\ncheck_pr_status = true  # Check PR merge status via gh CLI\n```\n\n### Dependency Strategies\n\n- **symlink** (default): Symlinks deps from main repo. Fast, saves space.\n- **copy**: Copy-on-write copies (macOS). Independent but space-efficient.\n- **custom**: Run your own command via `post_create_hook`.\n\n## Automatic Cleanup\n\nRunning `cw` automatically:\n1. Pulls latest changes from remote (if configured)\n2. Runs cleanup on every invocation (and also via the `post-merge` git hook)\n\nWorktrees are cleaned up when:\n- **A PR exists for the branch** - opened, merged, or closed; detected via `gh` CLI\n- **Branch merged locally** - detected via `git branch --merged`\n- **Older than 1 day** - with no open PR (for repos without GitHub)\n\nThe worktree you're currently inside is always skipped, and worktrees with\nuncommitted changes are skipped in auto mode.\n\n## Directory Structure\n\n```\n~/cw/\n└── my-project/\n    ├── wbnns-1738789200/\n    ├── wbnns-1738789500/\n    └── feature-auth/\n```\n\n## Requirements\n\n- Python 3.10+\n- Git\n- Claude Code CLI (`claude`)\n- `gh` CLI (optional, for PR status checking)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwbnns%2Fcw","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwbnns%2Fcw","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwbnns%2Fcw/lists"}