Coding Agent Session Manager for Claude Code / Gemini CLI / Codex CLI / Cursor Agent / Copilot CLI / Cline CLI / OpenCode / Kimi CLI
Coding Agent Session Manager for Claude Code / Gemini CLI / Codex CLI / Cursor Agent / Copilot CLI / Cline CLI / OpenCode / Kimi CLI
CCManager is a CLI application for managing multiple AI coding assistant sessions (Claude Code, Gemini CLI, Codex CLI, Cursor Agent, Copilot CLI, Cline CLI, OpenCode, Kimi CLI) across Git worktrees and projects.
https://github.com/user-attachments/assets/15914a88-e288-4ac9-94d5-8127f2e19dbf
.worktreeinclude support: carry gitignored project files (.env, local certs) into newly created worktreesBoth tools solve the same problem - managing multiple Claude Code sessions - but take different approaches.
If you love tmux-based workflows, stick with Claude Squad! It's a great tool that leverages tmux's power for session management.
CCManager is for developers who want:
CCManager is completely self-contained. No need to install or configure tmux - it works out of the box. Perfect if you don't use tmux or want to keep your tmux setup separate from Claude Code management.
CCManager shows the actual state of each Claude Code session directly in the menu:
Claude Squad doesn't show session states in its menu, making it hard to know which sessions need attention. While Claude Squad offers an AutoYes feature, this bypasses Claude Code's built-in security confirmations - not recommended for safe operation.
Following Claude Code's philosophy, CCManager keeps things minimal and intuitive. The interface is so simple you'll understand it in seconds - no manual needed.
npm install -g ccmanager
npm install
bun run build
npm start
ccmanager
Or run without installing:
npx ccmanager
You can customize keyboard shortcuts in two ways:
~/.config/ccmanager/config.json or .ccmanager.json for per-project settings (see Per-Project Configuration)Example configuration:
// config.json (new format)
{
"shortcuts": {
"returnToMenu": {
"ctrl": true,
"key": "r"
},
"cancel": {
"key": "escape"
}
}
}
Note: Shortcuts from shortcuts.json will be automatically migrated to config.json on first use.
CCManager supports per-project configuration by placing a .ccmanager.json file in your git repository root. Project settings are merged with the global config (~/.config/ccmanager/config.json), with project settings always taking priority.
For detailed configuration options and examples, see docs/project-config.md.
This repository doubles as a plugin marketplace providing the ccmanager-config skill, which teaches Claude Code or Codex the whole configuration schema and ships a validator for it:
# Claude Code
claude plugin marketplace add kbwo/ccmanager
claude plugin install ccmanager-config@ccmanager
# Codex CLI
codex plugin marketplace add kbwo/ccmanager
codex plugin add ccmanager-config@ccmanager
Then just ask — "set this repo up to run codex in ccmanager", "notify me when a session is waiting for input", "why is my .ccmanager.json being ignored?". See plugins/ccmanager-config/README.md.
CCManager supports multiple AI coding assistants with tailored state detection for each:
| Assistant | Command | Installation |
|---|---|---|
| Claude Code (Default) | claude |
code.claude.com |
| Gemini CLI | gemini |
github.com/google-gemini/gemini-cli |
| Codex CLI | codex |
github.com/openai/codex |
| Cursor Agent | cursor-agent |
cursor.com/cli |
| Copilot CLI | copilot |
github.com/github/copilot-cli |
| Cline CLI | cline |
github.com/cline/cline |
| OpenCode | opencode |
opencode.ai/docs |
| Kimi CLI | kimi |
kimi-cli.com |
| MiniMax Code (MCode) | mcode |
npmjs.com/package/@minimax-ai/code |
Each assistant has its own state detection strategy to properly track:
See Gemini Support Documentation for CCManager-specific configuration.
CCManager supports configuring the command and arguments used to run Claude Code sessions, with automatic fallback options for reliability.
claude)--resume)--resume for resuming sessions)For detailed configuration options and examples, see docs/command-config.md.
When running the claude command with the default (claude) detection strategy, CCManager automatically appends --teammate-mode in-process to the CLI arguments. This prevents conflicts between Claude Code's agent teams feature and ccmanager's PTY-based session management.
claude command sessions.--teammate-mode in your preset args, your value takes priority.Setting "teammateMode": "in-process" in Claude Code's settings.json alone is not sufficient when running inside a tmux-like environment, which is why CCManager controls this via the CLI argument.
CCManager can copy Claude Code session data (conversation history, context, and project state) when creating new worktrees, allowing you to maintain context across different branches.
When creating a new worktree, CCManager:
~/.claude/projects/[source-path] to ~/.claude/projects/[target-path]The default choice (copy or start fresh) will be pre-selected when creating new worktrees.
A new Git worktree contains only tracked files, so gitignored files a project needs in order to run — .env, local certificates, generated local config — do not come along. If the repository root has a .worktreeinclude file (gitignore syntax) listing those files, CCManager copies them into every worktree it creates.
git-worktreeinclude, so an existing .worktreeinclude works with CCManager unchanged.worktreeinclude file existsFor pattern syntax, the exact selection rule, and troubleshooting, see docs/worktree-include.md.
Closing CCManager kills the AI assistant processes it started, so reopening it normally means finding each worktree again and starting each session by hand. To avoid that, CCManager keeps a record of the sessions it currently has open, and on the next start offers to launch them again:
Restore previous sessions
Found 2 sessions from the last time ccmanager ran. Start them again?
feature-login — Main
fix-timeout (review) — Codex
> Restore
Don't restore
kill -9, or a closed terminal leaves it intact.No open issues yet, or sync has not completed.