All notable changes to CCM (Claude Code Manager) will be documented in this file.
- Statusline now shows the active model (display name) on its own line above the context bar.
- Statusline shows /effort level 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.
- 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.
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.
- 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).
ccm switch --isolated <account>— create CLAUDE_CONFIG_DIR-based isolated profiles for true concurrent multi-account sessions in different terminalsccm profiles list|sync|delete— manage isolated profile directoriesccm watch --threshold N [--auto]— background rate limit monitor that notifies or auto-switches accounts when 5-hour usage exceeds thresholdccm watch stop|status— stop watcher or show current state and latest rate limit dataccm usage dashboard [--days N] [--account <name>]— per-account token usage attribution by correlating session JSONL with switch historyccm usage compare— side-by-side account comparisonccm session archive [--older-than Nd] [--project <path>] [--dry-run]— compress old sessions to tar.gz archives instead of deletingccm session restore <archive>— restore sessions from a compressed archiveccm session archives— list all saved archives with metadataccm usage sessions [--project <path>] [--days N] [--limit N]— per-session token usage and estimated cost breakdown with model-specific pricing (Opus/Sonnet/Haiku)ccm session summary [path] [--limit N]— show what happened in each session: topic (first user message), tool usage breakdown, and files modifiedccm setup— interactive first-run wizard (dependency check, account import, statusline install, shell hook setup, project init)ccm recover— detect and fix inconsistent credential state from interrupted operations (checks sequence.json vs files, Keychain, profiles)- Statusline now writes rate limit data to
~/.claude-switch-backup/rate-limits.jsonfor the watcher module - Statusline shows bound account indicator when in a bound project directory
- Statusline uses
CLAUDE_CODE_USER_EMAILenv var (Claude Code v2.1.51+) as fallback for account detection
ccm status— useccm listor Claude Code's native/statuscommandccm interactive— use direct CLI commands insteadccm optimize— use Claude Code's native/insightscommand (AI-powered, 3,200 lines)ccm launch— use Claude Code's native--permission-modeflags or/sandboxcommand
- Version bumped to 4.0.0 (major: breaking changes from removed commands)
- Deprecated commands show migration notices instead of errors
- Help text updated with all new commands and examples
- Session module now routes
summary|archive|restore|archivessubcommands - Usage module now routes
sessions|dashboard|comparesubcommands - Now available via Homebrew:
brew tap dr5hn/tap && brew install ccm - Now available via npm:
npm install -g @dr5hn/ccm - GitHub Actions workflow auto-updates Homebrew formula on new releases
- Add error checking to Keychain rename during account reorder to prevent silent data inconsistency
ccm hook— outputs shell hook code for auto-switching accounts oncd. Addeval "$(ccm hook)"to.zshrc/.bashrcand bound projects auto-switch when you enter them- Shell hook caches bindings in an associative array at startup (~30ms), then does pure-bash lookups on every
cd(~0ms overhead) - Parent directory matching — binding
~/Personalmatches~/Personal/projects/foo/src - Zsh uses native
chpwdhook; Bash wrapscd/pushd/popd - Mtime guard: re-reads
sequence.jsononly when the file changes ccm bindnow shows a tip aboutccm hookfor auto-switch on cd
- Eliminated
evalcommand injection — replacedeval "$(jq ...)"in statusline with safeIFS read+ jq@tsvpattern; data is never interpreted as shell code - Fixed temp file race condition — credential and config writes now use
umask 077beforemktemp, ensuring files are owner-only from creation - Added path traversal protection — new
validate_account_params()validates account numbers (numeric-only) and emails (regex) before constructing file paths - Secured trap cleanup patterns —
trap "rm -rf '$dir'"replaced withtrap 'rm -rf -- "$dir"'for proper deferred expansion and end-of-options safety - Fixed awk injection vectors — all
awk "... $var ..."patterns replaced with safeawk -v name="$var" '...'variable passing - Added jq result validation —
resolve_account_identifier()now validates extracted account numbers are numeric before use - Added input bounds checking — identifier inputs limited to 255 characters
ccm statusline [install|remove]— install a smart statusline at the bottom of Claude Code showing context bar, token count, session cost, duration, burn rate, 5hr/7-day rate limits with reset times, project directory, git branch, Claude Code version, and CCM account infoccm status --short— single-line account output for integrations- Standalone statusline installer —
curl -fsSL .../statusline.sh | bashfor sharing within orgs without CCM dependency - Visual statusline guide —
statusline.htmlwith annotated diagram explaining all 12 data points - Statusline adapts: 2 lines for single-account users, 3 lines for multi-account, compact warning at 80%+ context
- Rate limit color coding: green <60%, yellow 60-79%, red 80%+
- Token count in statusline now matches Claude Code's display (sums input + cache_creation + cache_read)
ccm statusnow forwards arguments (was missingshiftin dispatcher)- Statusline reads config from both
~/.claude/.claude.jsonand~/.claude.jsonfallback
ccm launch [auto|yolo|plan|safe]— launch Claude Code with preset permission modes and terminal state reset on exit (fixes broken Ctrl-C/Ctrl-D in tmux/kitty/ghostty)ccm init [--force]— auto-generate.claudeignorebased on detected project type (Node, Python, Go, Rust, Java, Ruby, PHP, .NET, Dart, Swift)ccm permissions audit [--fix]— scan settings.json for duplicate rules, contradictions, verbatim "Always Allow" junk, and rule count bloat
- Atomic credential writes on Linux/WSL (temp file + mv) to prevent corruption on interrupted writes
- Atomic config backup writes (same pattern)
- Stale bindings now auto-removed when an account is deleted
- Reorder writes sequence.json before credential rename for safe recovery if interrupted
- Bindings updated during account reorder to reference new account numbers
--keep 0inclean_historyrejected (would wipe entire file)cmd_optimizeMEMORY.md path encoding fixed (%2F→-)
ccm clean tmp— clean orphaned subagent output files from/tmp/claude-*/(--days N, default 1)ccm clean processes— detect and kill orphaned Claude subagent processesccm usage history— token usage analytics with per-project and per-day breakdowns (--days N,--project <path>)ccm session search— full-text search across all session JSONL files (--limit N)ccm reorder— reorder account positions with automatic credential renamingccm bind/ccm unbind— bind project directories to specific accounts for auto-switchingccm listnow shows project bindings- Enhanced
ccm doctor— 4 new health checks: total disk size, tmp output files, orphaned processes, hook async audit
ccm switch(no args) now checks project bindings before cycling to next accountccm clean allnow includes tmp file cleanup and orphaned process detection- Schema version bumped to 3.1 (auto-migrates from 3.0, adds
bindingsfield)
ccm session relocateno longer hangs on large projects — usesgrep -qF(fixed-string) instead of regex, adds per-file progress output
- Renamed from
ccswitchtoccm— new hybrid CLI with subcommand pattern - Session management —
ccm session list,info,relocate,clean - Environment snapshots —
ccm env snapshot,restore,list,delete - MCP token audit —
ccm env auditflags MCP servers with CLI alternatives - Usage stats —
ccm usage summary,usage top - Doctor —
ccm doctorscans for health issues (stale locks, log bloat, cache, orphaned sessions) - Clean —
ccm clean debug|telemetry|todos|history|cache|allwith--dry-runsupport - Token optimizer —
ccm optimizeanalyzes context window footprint - Help system —
ccm help <module>for per-module documentation - Version command —
ccm version - ASCII art banner — branded logo in help output and interactive mode
- Installer script —
install.shfor sudo-free install to~/.ccm/bin/ - Skills ecosystem — installable via
npx skills add dr5hn/ccm@ccm - Website —
index.htmlwith CRT terminal aesthetic - Cross-platform date formatting —
format_iso_date()helper for macOS and Linux - Path decoding heuristic — filesystem-walking algorithm for accurate session path display
- CLI pattern:
--flagstyle replaced with hybrid subcommands (ccm switchinstead ofccswitch --switch) - Color initialization deferred to support
--no-colorfrom any argument position - Unicode symbols replaced with ASCII equivalents when
--no-coloris active cmd_remove_accountandcmd_set_aliasnow accept aliases (not just numbers/emails)- Schema version bumped from
2.0to3.0with automatic migration - Interactive mode header updated with ASCII art logo
--no-colorflag now works correctly (colors were previouslyreadonlyand couldn't be overridden)- Path decoding no longer splits hyphenated directory names into separate segments
date -jmacOS-only calls replaced with cross-platform helper- Stale
account_mapin interactive mode loop now properly reset between iterations
- Account aliases (
--set-alias) - Switch history tracking (last 10 entries)
- Usage count per account
- Health status monitoring
- Schema v2.0 with automatic migration from v1.0
- Account verification (
--verify) - Export/Import (
--export,--import) - Interactive mode (
--interactive)
- Major code refactoring for readability and maintainability
- Added comprehensive docstrings to all functions
- Initial release as
ccswitch - Multi-account add/remove/switch
- macOS Keychain and Linux file-based credential storage
- Cross-platform support (macOS, Linux, WSL)
- Container detection