Skip to content

Releases: dr5hn/ccm

v4.2.0

Choose a tag to compare

@dr5hn dr5hn released this 25 Apr 12:45

CCM v4.2.0

Added

  • 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 --name or /rename) beside model + effort.
  • Statusline shows a +N -M indicator 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_day rate limit) was empty: bash read with IFS=$'\t' collapsed consecutive tabs and shifted later values (version, model, effort) into the wrong variables. Switched the jq extractor to ASCII Unit Separator (\x1f) so empty fields are preserved.

Install / Update

curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bash

v4.1.0

Choose a tag to compare

@dr5hn dr5hn released this 17 Apr 06:28

CCM v4.1.0

Added

  • ccm hook --isolated — emit a shell hook that activates isolated CLAUDE_CONFIG_DIR profiles per shell on cd into 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"]=val stored 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_isolated now returns on error instead of calling exit, 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 | bash

v4.0.0 — Concurrent Sessions, Rate Limit Watcher, Usage Dashboard

Choose a tag to compare

@dr5hn dr5hn released this 03 Apr 08:47

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 pricing
  • ccm 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 wizard
  • ccm recover — credential state recovery for interrupted operations
  • Statusline now writes rate limits to shared file for watcher module
  • Statusline uses CLAUDE_CODE_USER_EMAIL env var (Claude Code v2.1.51+)

Removed (Native Claude Code Equivalents)

  • ccm status → use ccm list or Claude Code's /status
  • ccm interactive → use direct CLI commands
  • ccm optimize → use Claude Code's /insights
  • ccm launch → use --permission-mode flags

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

Choose a tag to compare

@dr5hn dr5hn released this 30 Mar 07:35

CCM v3.3.2

Fixed

  • Add error checking to Keychain rename during account reorder to prevent silent data inconsistency

Install / Update

curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bash

v3.3.1 — Shell Hook Auto-Switch & Security Hardening

Choose a tag to compare

@dr5hn dr5hn released this 30 Mar 05:22

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 personal

Performance: ~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 creationumask 077 + mktemp replaces post-hoc chmod 600 (prevents race condition where file is briefly world-readable)
  • Input validationvalidate_account_params() guards all credential file operations against path traversal
  • Injection preventionawk -v var="$val" replaces awk "BEGIN{... $val ...}" everywhere
  • Statuslineeval of jq output replaced with safe IFS=$'\t' read pattern
  • Safe mv — all mv calls use -- to prevent filenames starting with - being interpreted as flags
  • Account lookup hardeningresolve_account_identifier validates 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 cd exit code in bash scripts)
  • trap quoting fixed in export/import ('$var'"$var")
  • Standalone statusline.sh synced with all security improvements

Install / Update

curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bash

Statusline (standalone, no CCM needed):

curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/statusline.sh | bash

v3.3.0 — Statusline

Choose a tag to compare

@dr5hn dr5hn released this 28 Mar 11:19

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 install

Standalone install (share with your team, no CCM needed)

curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/statusline.sh | bash

Visual 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 | bash

v3.2.0 — Launch Modes, Project Init, Permissions Audit

Choose a tag to compare

@dr5hn dr5hn released this 28 Mar 10:15

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 session

Fixes 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 existing

Addresses 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 0 rejected in clean_history
  • cmd_optimize MEMORY.md path encoding fixed

Install / Update

curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bash

v3.1.0 — 7 New Commands

Choose a tag to compare

@dr5hn dr5hn released this 28 Mar 07:43

CCM v3.1.0 — 7 New Commands

New Commands

🧹 Cleanup

  • ccm clean tmp [--days N] — Clean orphaned subagent .output files 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. Running ccm switch in 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 all now includes tmp cleanup and orphaned process detection
  • Schema v3.1 with auto-migration (adds bindings field)
  • Fixed ccm optimize MEMORY.md path lookup (was using wrong encoding)
  • Numeric validation on all --days / --limit arguments
  • Input validation on PID before process termination

Install / Update

curl -fsSL https://raw.githubusercontent.com/dr5hn/ccm/main/install.sh | bash

v3.0.1 — Bug Fix

Choose a tag to compare

@dr5hn dr5hn released this 25 Mar 10:28

CCM v3.0.1 — Bug Fix

Fix

  • ccm session relocate no longer hangs on large projects — The command would freeze at "Updating path references in session files..." when processing projects with many/large .jsonl session files. Root cause: grep -q treated file paths as regex patterns, causing catastrophic backtracking on large JSON files. Now uses grep -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 | bash

v3.0.0 — Claude Code Manager

Choose a tag to compare

@dr5hn dr5hn released this 25 Mar 09:12

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 | bash

Or install as a skill for Claude Code / Cursor / Codex / Gemini CLI:

npx skills add dr5hn/ccm@ccm

What's New

New Modules

  • Session Managementccm session list, info, relocate, clean — manage all Claude Code project sessions
  • Environment Snapshotsccm env snapshot, restore, list, delete — save and restore config state
  • MCP Token Auditccm env audit — flag MCP servers with CLI alternatives to save tokens
  • Usage Statsccm usage summary, usage top — see your Claude Code footprint
  • Doctorccm doctor [--fix] — scan and fix health issues (stale locks, log bloat, cache, orphaned sessions)
  • Cleanccm clean debug|telemetry|todos|history|cache|all — targeted cleanup with --dry-run
  • Token Optimizerccm optimize — analyze context window footprint and suggest reductions

CLI Overhaul

  • Hybrid subcommand pattern: ccm switch work instead of ccswitch --switch-to work
  • Per-module help: ccm help session, ccm help env, etc.
  • --no-color works from any argument position
  • ASCII art banner with tagline

Distribution

  • Installerinstall.sh for sudo-free install to ~/.ccm/bin/
  • Skills ecosystemnpx skills add dr5hn/ccm@ccm for 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
  • remove and alias commands now accept aliases (not just numbers/emails)
  • Stale account map in interactive mode properly reset

See CHANGELOG.md for full details.