Releases: dr5hn/ccm
Release list
v4.2.0
CCM v4.2.0
Added
- Statusline now shows the active model (display name) on its own line above the context bar.
- Statusline shows
/effortlevel next to the model, color-coded by intensity (low=dim, medium=green, high=yellow, xhigh/max=red). Hidden when the active model does not support reasoning effort. - Statusline shows the custom session name (set via
--nameor/rename) beside model + effort. - Statusline shows a
+N -Mindicator of total lines added/removed in the session, next to the burn rate.
Fixed
- Statusline rendering corruption when an optional JSON field (e.g.
seven_dayrate limit) was empty: bashreadwithIFS=$'\t'collapsed consecutive tabs and shifted later values (version, model, effort) into the wrong variables. Switched thejqextractor to ASCII Unit Separator (\x1f) so empty fields are preserved.
Install / Update
curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bashv4.1.0
CCM v4.1.0
Added
ccm hook --isolated— emit a shell hook that activates isolated CLAUDE_CONFIG_DIR profiles per shell oncdinto a bound directory, instead of rewriting the global active account. Concurrent terminals in different bound directories no longer clobber each other's credentials.ccm switch --isolated --quiet— print only the profile path to stdout for use in command substitution; creates the profile on demand.
Fixed
- Shell auto-switch hook was silently a no-op under zsh because
_ccm_bindings["$path"]=valstored keys with literal quote characters, making${_ccm_bindings[$PWD]}lookups always miss. Changed to unquoted subscript so bash and zsh agree on the key. switch_isolatednow returns on error instead of callingexit, preserving the calling shell when invoked programmatically (e.g. from the hook).
Install / Update
curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bashv4.0.0 — Concurrent Sessions, Rate Limit Watcher, Usage Dashboard
What's New in v4.0.0
Competitive Moat Features
ccm switch --isolated <account>— CLAUDE_CONFIG_DIR-based concurrent sessions (counters Cloak)ccm watch --threshold N [--auto]— rate limit monitoring with auto-switch (counters Van Damme-o-Matic)ccm usage dashboard— per-account token usage attribution (unique to CCM)ccm usage sessions— per-session cost & token breakdown with model-specific pricingccm session summary— see what happened in each session (topic, tools, files)ccm session archive/restore— compress old sessions instead of deleting
Growth & Onboarding
ccm setup— interactive first-run wizardccm recover— credential state recovery for interrupted operations- Statusline now writes rate limits to shared file for watcher module
- Statusline uses
CLAUDE_CODE_USER_EMAILenv var (Claude Code v2.1.51+)
Removed (Native Claude Code Equivalents)
ccm status→ useccm listor Claude Code's/statusccm interactive→ use direct CLI commandsccm optimize→ use Claude Code's/insightsccm launch→ use--permission-modeflags
Stats
- 7 files changed, 1,895 insertions, 821 deletions
- Script grew from 6,077 to 7,023 lines
How CCM Compares
| Feature | CCM | Cloak | aisw | Native CC |
|---|---|---|---|---|
| Multi-account | ✅ | ✅ | ✅ | ❌ |
| Concurrent sessions | ✅ | ✅ | ❌ | ❌ |
| Auto rate-limit switch | ✅ | ❌ | ❌ | ❌ |
| Per-account usage | ✅ | ❌ | ❌ | ❌ |
| Session cleanup | ✅ | ❌ | ❌ | Buggy |
| Health checks (13) | ✅ | ❌ | ❌ | MCP only |
| Zero dependencies | ✅ (bash+jq) | ❌ (Node) | ❌ (Rust) | N/A |
Full changelog: https://github.com/dr5hn/ccm/blob/main/CHANGELOG.md
v3.3.2
v3.3.1 — Shell Hook Auto-Switch & Security Hardening
CCM v3.3.1
Shell Hook — Auto-Switch on cd
Add one line to your shell rc and CCM auto-switches accounts when you enter a bound directory:
# ~/.zshrc or ~/.bashrc
eval "$(ccm hook)"Then:
ccm bind ~/work/project work
ccm bind ~/personal/side-project personal
cd ~/work/project # → auto-switches to work account
cd ~/personal/side # → auto-switches to personalPerformance: ~30ms at shell startup (one jq call), ~0ms per cd (pure bash array lookup). Re-reads sequence.json only when file mtime changes. Parent directory matching — binding ~/work matches ~/work/project/src.
Shell support: Zsh uses native chpwd hook. Bash wraps cd/pushd/popd.
Security Hardening
- Atomic file creation —
umask 077+mktempreplaces post-hocchmod 600(prevents race condition where file is briefly world-readable) - Input validation —
validate_account_params()guards all credential file operations against path traversal - Injection prevention —
awk -v var="$val"replacesawk "BEGIN{... $val ...}"everywhere - Statusline —
evalof jq output replaced with safeIFS=$'\t' readpattern - Safe mv — all
mvcalls use--to prevent filenames starting with-being interpreted as flags - Account lookup hardening —
resolve_account_identifiervalidates jq output is^[0-9]+$ - Input bounds — identifiers rejected if >255 chars
- write_json — removed unconditional
chmod 600(was wrong for settings.json which should be 644)
Fixes
- Shell hook returns 0 on switch failure (doesn't break
cdexit code in bash scripts) trapquoting fixed in export/import ('$var'→"$var")- Standalone
statusline.shsynced with all security improvements
Install / Update
curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bashStatusline (standalone, no CCM needed):
curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/statusline.sh | bashv3.3.0 — Statusline
CCM v3.3.0 — Statusline
Smart Status Bar for Claude Code
See your session cost, context usage, rate limits, and more — right in the terminal:
▓▓▓░░░░░░░ 33% · 326K tokens · $54.57 · 1h33m · 4K/m · 5hr: 23% ↻16:30 · 7d: 41%
…projects/my-app · main · v1.0.80
personal (darshan@gmail.com) · 3 accounts · ●
What it shows
- Context bar — color-coded: green <70%, yellow 70-89%, red 90%+
- Token count — matches Claude Code's display (input + cache)
- Session cost — live cumulative USD cost
- Session duration — how long this session has been running
- Token burn rate — tokens/min to predict when you'll hit limits
- 5hr rate limit — Pro/Max rolling window with reset time
- 7-day rate limit — Max plan weekly cap with reset time
- Directory + git branch + Claude Code version
- Active account — only shown for multi-account users (via CCM)
- Compact warning — ⚠ /compact at 80%+ context
Install via CCM
ccm statusline installStandalone install (share with your team, no CCM needed)
curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/statusline.sh | bashVisual guide
See what every stat means: https://dr5hn.github.io/ccm/statusline.html
Adapts to your setup
- API key users — 2 lines, no rate limits
- Pro/Max users — 2 lines with rate limits
- Multi-account (CCM) — 3 lines with account info
Install / Update CCM
curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bashv3.2.0 — Launch Modes, Project Init, Permissions Audit
CCM v3.2.0
New Commands
Launch Modes
Launch Claude Code with preset permission modes and automatic terminal reset on exit:
ccm launch auto # auto-accept most actions
ccm launch yolo # skip ALL permissions (asks confirmation)
ccm launch plan # read-only mode
ccm launch safe # ask for everything
ccm launch auto -c # auto mode + continue last sessionFixes broken Ctrl-C/Ctrl-D after Claude Code exit in tmux/kitty/ghostty (anthropics/claude-code#38761).
Project Init
Auto-generate .claudeignore based on detected project type — saves 40-60% token costs:
ccm init # detects Node, Python, Go, Rust, Java, Ruby, PHP, .NET, Dart, Swift
ccm init --force # overwrite existingAddresses anthropics/claude-code#30857.
Permissions Audit
Scan settings.json for broken permission rules — the #1 pain point in Claude Code (anthropics/claude-code#30519):
ccm permissions audit # find duplicates, contradictions, dead rules, bloat
ccm permissions audit --fix # auto-remove duplicates (creates backup)Data Safety Fixes
- Atomic credential writes on Linux/WSL (temp file + mv)
- Stale bindings auto-removed when account is deleted
- Reorder writes registry before file rename for safe recovery
--keep 0rejected inclean_historycmd_optimizeMEMORY.md path encoding fixed
Install / Update
curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bashv3.1.0 — 7 New Commands
CCM v3.1.0 — 7 New Commands
New Commands
🧹 Cleanup
ccm clean tmp [--days N]— Clean orphaned subagent.outputfiles from/tmp/claude-*/(default: 1 day). Addresses anthropics/claude-code#26911 where these files can grow to 500+ GB.ccm clean processes— Detect and kill orphaned Claude subagent processes that leak memory after sessions end (macOS).
📊 Analytics
ccm usage history [--days N] [--project <path>]— Token usage breakdown by project and day, parsed from session JSONL files. Addresses anthropics/claude-code#33978.
🔍 Search
ccm session search <query> [--limit N]— Full-text search across all conversation session files.
🔄 Account Management
ccm reorder <from> <to>— Reorder account positions with automatic credential file renaming.ccm bind [path] <account>/ccm unbind [path]— Bind project directories to specific accounts. Runningccm switchin a bound directory auto-switches to the configured account.
Enhanced Doctor
ccm doctor now runs 13 checks (up from 9):
- Total
~/.claude/disk size (warn >1GB, critical >5GB) - Tmp output file accumulation
- Orphaned Claude processes (macOS)
- Hook async configuration audit
Other Improvements
ccm clean allnow includes tmp cleanup and orphaned process detection- Schema v3.1 with auto-migration (adds
bindingsfield) - Fixed
ccm optimizeMEMORY.md path lookup (was using wrong encoding) - Numeric validation on all
--days/--limitarguments - Input validation on PID before process termination
Install / Update
curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bashv3.0.1 — Bug Fix
CCM v3.0.1 — Bug Fix
Fix
ccm session relocateno longer hangs on large projects — The command would freeze at "Updating path references in session files..." when processing projects with many/large.jsonlsession files. Root cause:grep -qtreated file paths as regex patterns, causing catastrophic backtracking on large JSON files. Now usesgrep -qF(fixed-string match) for dramatically faster matching. Also adds per-file progress output ([1/31] filename.jsonl) so you can see it working.
Install / Update
curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bashv3.0.0 — Claude Code Manager
CCM v3.0.0 — Claude Code Manager
The power-user toolkit for Claude Code
Major release — renamed from ccswitch to ccm with a complete expansion from account switcher to full environment manager.
Install
curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bashOr install as a skill for Claude Code / Cursor / Codex / Gemini CLI:
npx skills add dr5hn/ccm@ccmWhat's New
New Modules
- Session Management —
ccm session list,info,relocate,clean— manage all Claude Code project sessions - Environment Snapshots —
ccm env snapshot,restore,list,delete— save and restore config state - MCP Token Audit —
ccm env audit— flag MCP servers with CLI alternatives to save tokens - Usage Stats —
ccm usage summary,usage top— see your Claude Code footprint - Doctor —
ccm doctor [--fix]— scan and fix health issues (stale locks, log bloat, cache, orphaned sessions) - Clean —
ccm clean debug|telemetry|todos|history|cache|all— targeted cleanup with--dry-run - Token Optimizer —
ccm optimize— analyze context window footprint and suggest reductions
CLI Overhaul
- Hybrid subcommand pattern:
ccm switch workinstead ofccswitch --switch-to work - Per-module help:
ccm help session,ccm help env, etc. --no-colorworks from any argument position- ASCII art banner with tagline
Distribution
- Installer —
install.shfor sudo-free install to~/.ccm/bin/ - Skills ecosystem —
npx skills add dr5hn/ccm@ccmfor cross-agent support - Website — CRT terminal aesthetic landing page
Bug Fixes
- Cross-platform date formatting (no more macOS-only
date -j) - Path decoding heuristic for hyphenated directory names
removeandaliascommands now accept aliases (not just numbers/emails)- Stale account map in interactive mode properly reset
See CHANGELOG.md for full details.