{"id":49215819,"url":"https://github.com/tqer39/ccw-cli","last_synced_at":"2026-04-26T16:01:02.741Z","repository":{"id":353218011,"uuid":"1218369847","full_name":"tqer39/ccw-cli","owner":"tqer39","description":"Claude Code worktree launcher with picker \u0026 superpowers preamble","archived":false,"fork":false,"pushed_at":"2026-04-24T00:24:15.000Z","size":2858,"stargazers_count":0,"open_issues_count":3,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-04-24T00:29:35.690Z","etag":null,"topics":["bash","claude-code","cli","git-worktree"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"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/tqer39.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-04-22T20:06:00.000Z","updated_at":"2026-04-24T00:22:51.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/tqer39/ccw-cli","commit_stats":null,"previous_names":["tqer39/ccw-cli"],"tags_count":13,"template":false,"template_full_name":null,"purl":"pkg:github/tqer39/ccw-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqer39%2Fccw-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqer39%2Fccw-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqer39%2Fccw-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqer39%2Fccw-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tqer39","download_url":"https://codeload.github.com/tqer39/ccw-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tqer39%2Fccw-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32303177,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T09:34:17.070Z","status":"ssl_error","status_checked_at":"2026-04-26T09:34:00.993Z","response_time":129,"last_error":"SSL_read: 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":["bash","claude-code","cli","git-worktree"],"created_at":"2026-04-24T00:01:24.764Z","updated_at":"2026-04-26T16:01:02.734Z","avatar_url":"https://github.com/tqer39.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n![ccw-cli — Claude Code x worktree](docs/assets/header.png)\n\n**A thin launcher for [Claude Code](https://docs.claude.com/claude-code)'s built-in `--worktree` — run `ccw` anywhere in the repo to pick an existing worktree (PR info attached) or start fresh. Plain CLI, stays out of your tmux/zellij setup.**\n\n[![Go](https://img.shields.io/badge/go-1.25-00ADD8?logo=go\u0026logoColor=white)](go.mod)\n[![Release](https://img.shields.io/github/v/release/tqer39/ccw-cli?logo=github)](https://github.com/tqer39/ccw-cli/releases)\n[![License](https://img.shields.io/github/license/tqer39/ccw-cli)](LICENSE)\n[![Homebrew](https://img.shields.io/badge/brew-tqer39%2Ftap%2Fccw-FBB040?logo=homebrew\u0026logoColor=white)](https://github.com/tqer39/homebrew-tap)\n[![brew-audit](https://github.com/tqer39/ccw-cli/actions/workflows/brew-audit.yml/badge.svg)](https://github.com/tqer39/ccw-cli/actions/workflows/brew-audit.yml)\n[![codecov](https://codecov.io/gh/tqer39/ccw-cli/branch/main/graph/badge.svg)](https://codecov.io/gh/tqer39/ccw-cli)\n\n[🇺🇸 English](README.md) · [🇯🇵 日本語](docs/README.ja.md)\n\n\u003c/div\u003e\n\n---\n\n## ⚡ Quick Start\n\n```bash\n# 1. install\nbrew install tqer39/tap/ccw\n\n# 2. run inside any git repo\nccw\n```\n\nThat's it. `ccw` scans `.claude/worktrees/` and shows the picker, or spins up a fresh worktree if none exist.\n\n## ✨ Features\n\n- 🤝 **Hand-off and step aside** — pick (or create) a worktree, launch `claude` in it, then ccw exits. No daemon, no wrapper process, no coupling to tmux/zellij — just the bridge.\n- 🎯 **Worktree state at a glance** — pushed / ahead / behind / dirty, plus PR info, all in one picker\n- 🧹 **Bulk cleanup** — `[clean pushed]` or `ccw --clean-all` sweeps the worktrees you're done with\n- 📋 **Machine-readable list** — `ccw -L --json` aggregates worktree × git × PR × session info in one shot, ideal for scripts and Claude Code agent use\n\n## 🎬 Demo\n\n![picker demo](docs/assets/picker-demo.gif)\n\n\u003e **Note:** the `💬 RESUME` badge only signals that a session log exists for the worktree. The session title or first prompt is **not** previewed in the picker — `ccw` simply runs `claude --continue` and lets the Claude Code CLI pick the most recent session.\n\n## 📖 Usage\n\n```bash\nccw                                       # pick an existing worktree, or start fresh\nccw -n                                    # new worktree, skip picker\nccw -s                                    # new worktree + inject the localized superpowers preamble as first prompt\nccw -- --model \u003cmodel-id\u003e                 # pass-through: any flags after `--` go to claude verbatim\nccw -L                                    # list ccw worktrees (text table)\nccw -L --json                             # same, JSON for scripts / agents\nccw -L -d ~/repo --no-pr --no-session     # target a specific repo, skip gh and session lookup\nccw --clean-all --status=pushed --dry-run # preview bulk delete targets\nccw --clean-all --force -y                # nuke everything without prompt\n```\n\nRun `ccw --help` for the full flag reference.\n\n## 🎯 Picker reference\n\nWorktree status badge:\n\n| Badge | Meaning |\n|---|---|\n| 🟢 `[PUSHED]` | Clean, upstream tracked, 0 commits ahead |\n| 🟡 `[LOCAL]` | No upstream, or ahead of upstream |\n| 🔴 `[DIRTY]` | Working tree has uncommitted changes |\n\nPR state badge (shown only when [`gh`](https://cli.github.com/) is installed and authenticated):\n\n| Badge | Meaning |\n|---|---|\n| 🟩 `[OPEN]` | PR is open and awaiting review / merge |\n| ⬛ `[DRAFT]` | PR is a draft |\n| 🟪 `[MERGED]` | PR has been merged |\n| 🟥 `[CLOSED]` | PR was closed without merging |\n\nSession badge:\n\n| Badge | Meaning |\n|---|---|\n| 💬 `RESUME` | Past session log exists — `run` restores the conversation |\n| ⚡ `NEW`    | No session log — `run` starts fresh |\n\nSelecting a worktree opens `[r] run` / `[d] delete` / `[b] back`. `run` calls `claude --continue` to restore the past conversation when a session log exists, or `claude -n \u003cworktree\u003e` to start fresh otherwise. Bulk shortcuts (`[delete all]`, `[clean pushed]`, `[custom select]`) remove many at once; dirty items require either `--force` or a three-choice confirm (`y` force · `s` skip dirty · `N` cancel).\n\nWithout `gh`, the picker stays functional and shows a hint; rate-limit / network failures hide the PR column silently.\n\n## 🏷️ Naming\n\nWhen ccw creates a new worktree, the worktree directory and the Claude Code session name are kept 1:1:\n\n- Directory: `\u003crepo\u003e/.claude/worktrees/\u003cname\u003e/`\n- Session name: `\u003cname\u003e` (set via `claude -n \u003cname\u003e`)\n\n`\u003cname\u003e` is generated as `ccw-\u003cowner\u003e-\u003crepo\u003e-\u003cyymmdd\u003e-\u003chhmmss\u003e` (e.g. `ccw-tqer39-ccw-cli-260426-143055`). `\u003cowner\u003e` / `\u003crepo\u003e` come from the `origin` remote URL; the timestamp is the worktree creation time in your local timezone. When `origin` is unset, `\u003cowner\u003e` becomes `local` and `\u003crepo\u003e` is the directory basename. Duplicate names (e.g. two worktrees created within the same second) are disambiguated with `-2`, `-3`, … Renaming the session manually with `/rename` is fine — ccw does not track it, and `--continue` keys off the working directory so conversation restore is unaffected.\n\n## 📦 Installation\n\n### Homebrew (recommended)\n\n```bash\nbrew install tqer39/tap/ccw\n```\n\n### From source\n\n```bash\ngit clone https://github.com/tqer39/ccw-cli ~/ccw-cli\ngo build -o ~/.local/bin/ccw ~/ccw-cli/cmd/ccw\n```\n\nMake sure `~/.local/bin` is on your `PATH`.\n\n### Requirements\n\n- [`git`](https://git-scm.com/)\n- [Claude Code](https://docs.claude.com/claude-code) `\u003e= 2.1.76` — ccw uses `--worktree \u003cname\u003e` (added in 2.1.49) together with `-n \u003cname\u003e` (added in 2.1.76). ccw offers to install `claude` via npm / brew if missing.\n- *(optional)* [`gh`](https://cli.github.com/) — enables PR info in the picker\n- *(optional)* [superpowers](https://github.com/obra/superpowers) plugin — declared in [`.claude/settings.json`](./.claude/settings.json) so Claude Code prompts to install it on first launch in this repo\n\n## ⚙️ Environment\n\n| Variable | Effect |\n|---|---|\n| `NO_COLOR=1` | Disable colored output |\n| `CCW_DEBUG=1` | Verbose debug logging |\n| `CCW_LANG=en\\|ja` | Force output language. Overridden by `--lang`. Falls back to system locale (`LC_ALL` / `LC_MESSAGES` / `LANG`), then English. |\n\nExit codes: `0` success · `1` user error / cancel · anything else is forwarded from `claude`.\n\n## 🛠️ Development\n\n```bash\ngo test ./...\ngo vet ./...\ngo build ./cmd/ccw\n```\n\nSet up the full dev environment (Homebrew required) with:\n\n```bash\nmake bootstrap\n```\n\nThis installs the Homebrew packages listed in [`Brewfile`](Brewfile), provisions Go / Node via [`mise`](https://mise.jdx.dev/), and enables [lefthook](https://github.com/evilmartians/lefthook) pre-commit hooks.\n\nSee [`docs/assets/picker-demo-setup.sh`](docs/assets/picker-demo-setup.sh) + [`picker-demo.tape`](docs/assets/picker-demo.tape) to regenerate the demo GIF with [vhs](https://github.com/charmbracelet/vhs).\n\n## 🤖 Built With\n\nThis project was built with [Claude Code](https://docs.claude.com/claude-code) using Claude **Opus 4.7**.\n\n## 📄 License\n\n[MIT](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftqer39%2Fccw-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftqer39%2Fccw-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftqer39%2Fccw-cli/lists"}