{"id":44754807,"url":"https://github.com/craigsc/cmux","last_synced_at":"2026-02-20T04:00:38.185Z","repository":{"id":338287491,"uuid":"1157370628","full_name":"craigsc/cmux","owner":"craigsc","description":"cmux: tmux for Claude Code","archived":false,"fork":false,"pushed_at":"2026-02-18T20:43:48.000Z","size":56,"stargazers_count":282,"open_issues_count":3,"forks_count":11,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-19T06:56:21.947Z","etag":null,"topics":["claude","claude-code","git","terminal"],"latest_commit_sha":null,"homepage":"","language":"Shell","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/craigsc.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-13T18:35:24.000Z","updated_at":"2026-02-19T05:34:00.000Z","dependencies_parsed_at":"2026-02-17T01:00:31.734Z","dependency_job_id":null,"html_url":"https://github.com/craigsc/cmux","commit_stats":null,"previous_names":["craigsc/cmux"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/craigsc/cmux","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigsc%2Fcmux","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigsc%2Fcmux/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigsc%2Fcmux/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigsc%2Fcmux/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/craigsc","download_url":"https://codeload.github.com/craigsc/cmux/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/craigsc%2Fcmux/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29640861,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-20T03:21:14.183Z","status":"ssl_error","status_checked_at":"2026-02-20T03:18:24.455Z","response_time":59,"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":["claude","claude-code","git","terminal"],"created_at":"2026-02-16T00:00:35.472Z","updated_at":"2026-02-20T04:00:38.145Z","avatar_url":"https://github.com/craigsc.png","language":"Shell","funding_links":[],"categories":["Feature Dimensions"],"sub_categories":["7. Worktrees \u0026 Workspace Management"],"readme":"# cmux — tmux for Claude Code\n\nRun a fleet of Claude agents on the same repo — each in its own worktree, zero conflicts, one command each.\n\nClaude Code works best when it has full ownership of the working directory. Want two agents working in parallel? They'll stomp on each other — conflicting edits, dirty state, broken builds. You need separate checkouts.\n\n[Git worktrees](https://git-scm.com/docs/git-worktree) are the perfect primitive for this. They share the same `.git` database but give each agent its own directory tree — no cloning, no syncing, branches stay in lockstep. cmux wraps the entire worktree lifecycle into single commands so you can spin agents up, jump between them, and tear them down without thinking about it.\n\nYou wanna go fast without losing your goddamn mind. This is how.\n\n## Install\n\n```sh\ncurl -fsSL https://github.com/craigsc/cmux/releases/latest/download/install.sh | sh\n```\n\nThen add `.worktrees/` to your `.gitignore`:\n\n```sh\necho '.worktrees/' \u003e\u003e .gitignore\n```\n\n## Quick start\n\n```sh\ncmux new \u003cyour feature name\u003e       # creates worktree + branch, runs setup hook, opens Claude\n```\n\nThat's it. One command, one agent, fully isolated. See [Workflow](#workflow) for the full loop.\n\n## Commands\n\n| Command | What it does |\n|---------|-------------|\n| `cmux new \u003cbranch\u003e` | Create **new** worktree + branch, run setup hook, launch Claude |\n| `cmux start \u003cbranch\u003e` | **Continue** where you left off in an existing worktree |\n| `cmux cd [branch]` | cd into a worktree (no args = repo root) |\n| `cmux ls` | List active worktrees |\n| `cmux merge [branch] [--squash]` | Merge worktree branch into your primary checkout (no args = current worktree) |\n| `cmux rm [branch \\| --all]` | Remove a worktree and its branch (no args = current, `--all` = every worktree with confirmation) |\n| `cmux init [--replace]` | Generate `.cmux/setup` hook using Claude (`--replace` to regenerate) |\n| `cmux update` | Update cmux to the latest version |\n| `cmux version` | Show current version |\n\n## Workflow\n\nYou're building a feature:\n\n```sh\ncmux new feature-auth        # agent starts working on auth\n```\n\nBug comes in. No problem — spin up another agent without leaving the first one:\n\n```sh\ncmux new fix-payments        # second agent, isolated worktree, independent session\n```\n\nMerge the bugfix when it's done:\n\n```sh\ncmux merge fix-payments --squash\ncmux rm fix-payments\n```\n\nCome back tomorrow and pick up the feature work right where you left off:\n\n```sh\ncmux start feature-auth      # picks up right where you left off\n```\n\nThe key distinction: `new` = new worktree, new session. `start` = existing worktree, continuing session.\n\n## Setup hook\n\nWhen `cmux new` creates a worktree, it runs `.cmux/setup` if one exists. This handles project-specific init — symlinking secrets, installing deps, running codegen. If no setup hook exists, you'll be prompted to generate one.\n\nThe easy way — let Claude write it for you:\n\n```sh\ncmux init\n```\n\nOr create one manually:\n\n```bash\n#!/bin/bash\nREPO_ROOT=\"$(git rev-parse --git-common-dir | xargs dirname)\"\nln -sf \"$REPO_ROOT/.env\" .env\nnpm ci\n```\n\nSee [`examples/`](examples/) for more.\n\n## How it works\n\n- Worktrees live under `.worktrees/\u003cbranch\u003e/` in the repo root\n- Branch names are sanitized: `feature/foo` becomes `feature-foo`\n- `cmux new` is idempotent on the worktree — if it already exists, it skips creation and setup, but still launches a new Claude session\n- `cmux merge` and `cmux rm` with no args detect the current worktree from `$PWD`\n- Pure bash — just git and the Claude CLI\n\n## Tab completion\n\nYou never have to remember branch names. Built-in completion for bash and zsh — automatically registered when you source `cmux.sh`, no extra setup.\n\n- `cmux \u003cTAB\u003e` — subcommands\n- `cmux start \u003cTAB\u003e` — existing worktree branches\n- `cmux cd \u003cTAB\u003e` — existing worktree branches\n- `cmux rm \u003cTAB\u003e` — worktree branches + `--all`\n- `cmux merge \u003cTAB\u003e` — worktree branches\n- `cmux init \u003cTAB\u003e` — `--replace`\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigsc%2Fcmux","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcraigsc%2Fcmux","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcraigsc%2Fcmux/lists"}