v4.0.0 · Open Source · MIT License

The power-user toolkit for Claude Code

Concurrent sessions, rate limit auto-switch, per-account dashboards, session archival — plus multi-account management, project bindings, and disk cleanup. No Node, no Python — just bash.

$ curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bash COPY
ccm — zsh
$ ccm list
Managed Accounts:
1 ★ darshan@personal.dev [personal] healthy
2 darshan@company.com [work] healthy
3 client@agency.io [client] healthy
$ ccm switch work
✓ Switched: personal → work

Claude Code wasn't built for power users.

No multi-account support
10+ open issues requesting account switching — still not shipped. CCM does it with project bindings.
Unbounded disk growth
~/.claude can grow to 500GB+ from a single session. CCM cleans 9 targets with one command.
Invisible config rot
Dead permission rules, stale locks, orphaned processes — ccm doctor finds them, ccm --fix resolves them.

CCM fixes all of this — one bash script, zero dependencies beyond bash + jq.

ccm — zsh
⟩_
Account Switching
ccm switch <id>
Rotate between accounts in one command. Aliases, history, undo, reorder, import/export.
Project Bindings
ccm bind . work
Bind project directories to accounts. Auto-switch on cd with eval "$(ccm hook)" in your shell rc — zero overhead, parent directory matching.
Session Management
ccm session search
List, inspect, relocate, search, and clean sessions. Full-text search across all conversation history.
Usage Analytics
ccm usage history
Token usage breakdown by project and day. Disk usage, session counts, project ranking.
Health & Maintenance
ccm doctor
13 health checks: disk size, tmp bloat, orphaned processes, stale locks, hook config. Auto-fix with --fix. Clean tmp files, kill leaked processes.
Concurrent Sessions
ccm switch --isolated work
True parallel sessions via CLAUDE_CONFIG_DIR. Run multiple accounts simultaneously without conflicts.
Rate Limit Watcher
ccm watch --threshold 85 --auto
Monitor rate limits in real time. Auto-switch to the next available account when usage hits your threshold.
Per-Account Dashboard
ccm usage dashboard
Token usage attributed per account. See which account is burning tokens and where, with per-project drill-down.
Session Archive
ccm session archive
Compress old sessions instead of deleting them. Reclaim disk space while keeping conversation history searchable.
Setup Wizard
ccm setup
Interactive first-run onboarding. Add accounts, configure bindings, install statusline, and set shell hook — all guided.
Project Init
ccm init
Auto-generate .claudeignore by project type. Saves 40-60% tokens by excluding node_modules, build dirs, and more.
Permissions Audit
ccm permissions audit
Find duplicate, contradictory, and dead "Always Allow" rules bloating your settings.json. Auto-fix with --fix.
Statusline
ccm statusline
Live status bar: session cost, context %, tokens, burn rate, rate limits, branch. Shareable standalone install.
Environment Snapshots
ccm env snapshot
Save and restore your Claude Code config. Audit MCP servers for token waste.
Shell Auto-Switch
eval "$(ccm hook)"
Auto-switch accounts when you cd into a bound directory. Zero-overhead bash array lookups, native zsh chpwd hook.
Security Hardened
No eval · umask 077
No eval with external data, atomic writes with restrictive umask, input validation at every boundary, path traversal protection.
1
Install
curl -fsSL .../install.sh | bash
One command, no sudo required. Works on macOS, Linux, WSL.
2
Add your accounts
ccm add
Run once per account. CCM detects your active Claude Code credentials.
3
Switch anytime
ccm switch work
Swap accounts instantly. Your sessions and config stay intact.
$ curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bash
Requires: bash 4.4+, jq · Works on macOS, Linux, WSL
Homebrew: brew tap dr5hn/tap && brew install ccm
npm: npm install -g @dr5hn/ccm
Skill: npx skills add dr5hn/ccm@ccm
Or clone manually: git clone https://github.com/dr5hn/ccm.git && cd ccm && ./install.sh
GitHub stars · MIT Licensed · bash 4.4+ · Zero dependencies beyond jq
Account Management
16 commands
ccm addAdd current account
ccm remove <id>Remove account by number, email, or alias
ccm switch [id]Switch account (next, specific, or project-bound)
ccm undoRevert last switch
ccm listList managed accounts
ccm alias <id> <name>Set account alias
ccm reorder <from> <to>Reorder account positions
ccm bind [path] <account>Bind project directory to an account
ccm unbind [path]Remove project binding
ccm bind listShow all project bindings
ccm hookShell hook for auto-switch on cd
ccm verify [id]Verify backup integrity
ccm historyShow switch history
ccm export <path>Export accounts to archive
ccm import <path>Import from archive
ccm switch --isolated <id>Switch with isolated CLAUDE_CONFIG_DIR
Session Management
6 commands
ccm session listList all project sessions
ccm session info <path>Session details for a project
ccm session search <query> [--limit N]Full-text search across all sessions
ccm session relocate <old> <new>Move sessions after project relocation
ccm session clean [--dry-run]Remove orphaned sessions
ccm session archive [--days N]Compress old sessions to save disk
Environment
5 commands
ccm env snapshot [name]Save current environment
ccm env restore <name> [--force]Restore from snapshot
ccm env listList snapshots
ccm env delete <name>Remove a snapshot
ccm env auditAudit MCP token efficiency
Health & Maintenance
10 commands
ccm doctor13 health checks (disk, tmp, processes, hooks, locks, cache)
ccm doctor --fixAuto-fix safe issues
ccm clean debug [--days N]Clean debug logs (default: 30 days)
ccm clean telemetryRemove telemetry data
ccm clean todos [--days N]Remove old todo files
ccm clean history [--keep N]Trim history (default: keep 1000)
ccm clean tmp [--days N]Clean orphaned tmp output files (default: 1 day)
ccm clean processesKill orphaned Claude subagent processes
ccm clean cacheClean plugin cache
ccm clean all [--dry-run]Clean everything safe
Rate Limit Watcher
3 commands
ccm watchMonitor rate limits for active account
ccm watch --threshold NSet usage % threshold for alerts
ccm watch --threshold N --autoAuto-switch account on rate limit
Usage Stats
4 commands
ccm usage summaryClaude Code footprint overview
ccm usage top [--count N]Top projects by disk usage
ccm usage history [--days N] [--project <path>]Token usage by project and day
ccm usage dashboardPer-account token usage dashboard
Setup & Tools
4 commands
ccm setupInteractive first-run onboarding wizard
ccm init [--force]Generate .claudeignore for detected project type
ccm permissions audit [--fix]Scan for duplicate/dead permission rules
ccm statusline [install|remove]Install/remove smart status bar in Claude Code