cmux

by craigscVerified

cmux: tmux for Claude Code

598
Stars
35
Forks
Shell
Language
8/23/2026
Added
View on GitHubDownload ZIP

⚠️ Third-Party Software Notice

This skill is third-party open-source software developed and hosted independently on GitHub. SkillTip is an informational directory and does not control or maintain the underlying repository. Any security checks displayed are automated and limited in scope. Review the source code before installing.

Read the Terms of Service

Installation

Add to your Claude Code skills directory:

# Add to your Claude Code skills
git clone https://github.com/craigsc/cmux

Getting Started

Guides for using skills like cmux.

Security Report

Verified

Last scanned: —

{
  "status": "PASSED",
  "issues": []
}

README.md

cmux — tmux for Claude Code

Run a fleet of Claude agents on the same repo — each in its own worktree, zero conflicts, one command each.

Claude 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.

Git worktrees 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.

You wanna go fast without losing your goddamn mind. This is how.

Install

curl -fsSL https://github.com/craigsc/cmux/releases/latest/download/install.sh | sh

Then add .worktrees/ to your .gitignore:

echo '.worktrees/' >> .gitignore

Quick start

cmux new <your feature name>       # creates worktree + branch, runs setup hook, opens Claude

That's it. One command, one agent, fully isolated. See Workflow for the full loop.

Commands

CommandWhat it does
cmux new <branch> [--from <base>]Create new worktree + branch, run setup hook, launch Claude
cmux start <branch>Continue where you left off in an existing worktree
cmux cd [branch]cd into a worktree (no args = repo root)
cmux lsList active worktrees
cmux merge [branch] [--squash]Merge worktree branch into your primary checkout (no args = current worktree)
cmux rm [branch | --all]Remove a worktree and its branch (no args = current, --all = every worktree with confirmation)
cmux init [--replace]Generate .cmux/setup hook using Claude (--replace to regenerate)
cmux updateUpdate cmux to the latest version
cmux versionShow current version

Workflow

You're building a feature:

cmux new feature-auth        # agent starts working on auth

Bug comes in. No problem — spin up another agent without leaving the first one:

cmux new fix-payments        # second agent, isolated worktree, independent session

Merge the bugfix when it's done:

cmux merge fix-payments --squash
cmux rm fix-payments

Need a sub-feature off an existing branch? Use --from:

cmux new auth-oauth --from feature-auth   # branches from feature-auth instead of main

Come back tomorrow and pick up the feature work right where you left off:

cmux start feature-auth      # picks up right where you left off

The key distinction: new = new worktree, new session. start = existing worktree, continuing session.

Setup hook

When 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.

The easy way — let Claude write it for you:

cmux init

Or create one manually:

#!/bin/bash
REPO_ROOT="$(git rev-parse --git-common-dir | xargs dirname)"
ln -sf "$REPO_ROOT/.env" .env
npm ci

See examples/ for more.

How it works

  • Worktrees live under .worktrees/<branch>/ in the repo root
  • Branch names are sanitized: feature/foo becomes feature-foo
  • cmux new branches from the repo's default branch (detected via remote HEAD, then main, then master). Use --from <branch> to branch from a different base
  • cmux new is idempotent on the worktree — if it already exists, it skips creation and setup, but still launches a new Claude session
  • cmux merge and cmux rm with no args detect the current worktree from $PWD
  • Pure bash — just git and the Claude CLI

Tab completion

You never have to remember branch names. Built-in completion for bash and zsh — automatically registered when you source cmux.sh, no extra setup.

  • cmux <TAB> — subcommands
  • cmux start <TAB> — existing worktree branches
  • cmux cd <TAB> — existing worktree branches
  • cmux rm <TAB> — worktree branches + --all
  • cmux merge <TAB> — worktree branches
  • cmux init <TAB>--replace

Community

ProjectDescription
claude-orchestration-in-cmuxClaude Code skill that turns one session into an orchestrator -- discovers panes, delegates tasks to other Claude sessions, monitors progress via screen polling, and manages the full commit-merge-rebase cycle with worktree isolation.

License

MIT

Frequently Asked Questions

What is cmux?

cmux is an open-source cli tools skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by craigsc. cmux: tmux for Claude Code. It has 598 GitHub stars.

Is cmux safe to use?

Yes. cmux passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install cmux?

Clone the repository with "git clone https://github.com/craigsc/cmux" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is cmux written in?

cmux is primarily written in Shell. It is open-source under craigsc on GitHub, so you can review or fork the full source.

Are there alternatives to cmux?

Yes. SkillsLLM lists many other CLI Tools skills you can browse and compare side by side. Open the CLI Tools category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh cmux against similar tools.

Comments (0)

No comments yet. Be the first to share your thoughts!

ui-ux-pro-max-skill

by nextlevelbuilder

12

An AI skill that provides design intelligence for building professional UI/UX across multiple platforms.

119,92012,870Python
CLI Toolsai-skillsantigravity
View details

happy

by slopus

Mobile and Web client for Codex and Claude Code, with realtime voice, encryption and fully featured

23,4501,980TypeScript
CLI Tools
View details

claudecodeui

by siteboon

Use Claude Code, OpenCode, Cursor CLI, and Codex on mobile and web with CloudCLI (aka Claude Code UI). CloudCLI is a free open source webui/GUI that helps you manage your Claude Code session and projects remotely.

13,3941,866TypeScript
CLI Tools
View details

CRS-自建Claude Code镜像,一站式开源中转服务,让 Claude、OpenAI、Gemini、Droid 订阅统一接入,支持拼车共享,更高效分摊成本,原生工具无缝使用。

12,5471,869JavaScript
CLI Tools
View details

ccstatusline

by sirmalloc

🚀 Beautiful highly customizable statusline for Claude Code CLI with powerline support, themes, and more.

12,508545TypeScript
CLI Tools
View details

Developers Also Liked

Based on votes and bookmarks from developers who liked this skill

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI Agentsai-agentsanthropicclaude-code
View details
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI Agentsai-agentsbrainstorming
View details

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP Serversapisai-tools
View details

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI Agentsai-agentsanthropicclaude-code
View details

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI Agentsclaude-codeai-tools
View details