v0.5.x
currentProfile backup & cloning, shell completions, prompt and status-line integration, and concurrency-safe credential handling.
- Added
CCPM Desktop: download for macOS
- The optional desktop app is now a downloadable .dmg on GitHub Releases — a ~3–4 MB build for your Mac's chip (Apple Silicon or Intel). Open it and drag CCPM into Applications. No more building from source to try the GUI.
- First launch needs a one-time Gatekeeper bypass (right-click → Open) because the app isn't notarized yet. The app uses the ccpm CLI for write actions, so keep the CLI installed.
- The app now updates itself: it checks for new releases on launch and, on your click, downloads and swaps in the new version in place — no re-downloading or re-dragging to Applications. The desktop app versions independently of the CLI, shipping on its own `desktop-v*` release tags.
- ImprovedAddedFixed
Usage: more accurate counts, cost estimates, and 5-hour blocks
- Fixed a token undercount: usage is now deduplicated by (message id + request id) with the largest usage snapshot winning, matching how Claude Code appends growing snapshots for one response. This corrects both cross-request collisions and a first-seen under-count. Existing usage stores re-ingest once to adopt the corrected numbers.
- The desktop app's Usage tab now shows an API-equivalent dollar-cost estimate per total, model, and project (estimated from public list prices — not subscription billing).
- New live "current 5-hour block" card in the desktop Usage tab: cost so far, burn rate ($/hr), time left in the window, and projected end-of-block cost — inspired by ccusage.
- The desktop app also gained a Settings editor tab and plugin install/remove.
- Added
CCPM Desktop — an optional native app for managing profiles
- A new desktop GUI (in `ccpm/desktop/`, built with Wails) sits alongside the CLI: a sidebar of profiles plus per-profile tabs for Overview, Cascade, Assets, MCP & Plugins, Permissions, Usage, and Health. It reuses ccpm's own engine for reads and shells out to the CLI for writes, so it stays exactly in sync with what `ccpm` does.
- The Cascade tab shows the effective host→global→profile config with provenance badges on every asset and setting, and flags overrides/shadowing — so you can finally see what actually resolves, and why.
- Clone, rename, delete, open, and run profiles from the toolbar; add/remove assets and MCP servers, toggle plugins, and edit permissions/env without touching JSON. The view auto-refreshes when the CLI changes things underneath it.
- Build it with `make desktop` (needs the Wails CLI). It's local-first, no signup, and unsigned for now (one-time Gatekeeper bypass on macOS). Creating a profile or importing `~/.claude` opens a Terminal to complete sign-in.
- Improved
`ccpm usage` heatmap is now amber
- The contribution heatmap switched from purple to amber so the CLI matches the new CCPM Desktop theme. `NO_COLOR` still renders plain glyphs.
- Added
`ccpm usage` — per-profile token usage with a contribution heatmap
- New `ccpm usage [profile]` reports token usage (input, output, cache-write, cache-read) read straight from a profile's Claude Code session transcripts — fully retroactive over your existing history, with no dollar cost computed.
- On a terminal it opens an interactive dashboard — tabbed Overview/Days/Models/Projects/Sessions, switch profile with `[`/`]`, cycle the time window with `w`, scroll with arrows. The Overview shows totals and a GitHub-style contribution heatmap rendered in purple. Use `--plain`, `--json`, or `--by-model`/`--by-project`/`--sessions`/`--all`/`--since` for static, scriptable output.
- Counts are correct by construction: Claude Code writes each response as several transcript lines sharing one message id, so totals are deduplicated by message id (a naive sum over-counts ~3x).
- Data is maintained incrementally in a local per-profile store (`<profileDir>/usage/`) — each run reads only new transcript bytes. Opt in to `ccpm config set usage_tracking true` to keep it warm via a SessionEnd hook; `ccpm usage` works without it.
- Improved
Status line now matches /usage and is colour-coded
- The `5h`/`7d` usage segments now show the percentage **used**, matching Claude's own `/usage` panel, so the numbers line up instead of reading as the inverse.
- The line is now colour-coded: the usage percentage shades green → amber → red as your remaining headroom shrinks, with orange window labels and a yellow reset clock. Set `NO_COLOR` for plain text.
- Added
In-TUI status line: see which profile is running, plus usage and limits
- `ccpm run` now shows which profile a session is using right inside the Claude Code window — a status line pinned to the bottom that reads e.g. `⬢ work · Sonnet 4.6 · ctx 34% · 5h 58% ↺16:15 · 7d 88% · $1.23`.
- For Claude Pro/Max accounts it surfaces how much of your rolling **5-hour and 7-day usage windows** is left (remaining %, with the reset time), plus current context fill and session cost. API-key profiles show profile, model, and cost.
- It's wired in automatically when a profile has no status line of its own, and never overwrites one you set in `~/.claude/settings.json`, a profile, or a trusted project. Opt out with `ccpm config set statusline false`, per-launch with `ccpm run <profile> --no-statusline`, or remove an injected one with `ccpm settings statusline "" --profile <name>`.
- v0.5.0Added
Profile backup, cloning, shell completions, and prompt integration
- `ccpm export <profile>` packages a profile's skills, agents, commands, rules, hooks, MCP servers, plugins, and settings into a portable `.tar.gz`. `ccpm import-bundle <file>` restores it on another machine (path-traversal-safe). Credentials are excluded by default — re-authenticate with `ccpm auth refresh` after restoring, or pass `--include-credentials` for a trusted same-user move.
- `ccpm clone <source> <new-name>` duplicates an existing profile (assets, settings, and auth). Pass `--no-auth` for an assets-only copy. Note: OAuth clones share the source account's tokens, so for a long-lived clone prefer `--no-auth` and a fresh login.
- `ccpm completion bash|zsh|fish|powershell` emits shell completion scripts, including live completion of your profile names for `run`, `use`, `remove`, `rename`, `set-default`, `clone`, and `export`.
- `ccpm prompt` prints the active profile name for embedding in your shell prompt (PS1, starship, powerlevel10k), so a terminal always shows which account it's bound to. Supports `--format` and `--show-default`.
- `ccpm list --json` emits machine-readable JSON for scripting, CI, and status lines.
- `ccpm doctor --fix` prunes dangling shared-asset symlinks (doctor was previously read-only).
- Distribution: the macOS/Linux/Windows builds now ship with cosign-signed checksums.
- FixedSecurity
Concurrency-safe credential handling and hardening
- Credential- and config-mutating commands (`set-default`, `rename`, `remove`, `add`, `clone`) now take a global advisory lock, so running two ccpm commands at once can no longer interleave a stale read with a fresh write and clobber a valid refresh token (a cause of spurious `401` re-logins).
- `config.json`, the shared-asset manifest, and the trust list are now written through the crash-safe atomic-write path, eliminating a window where a crash or concurrent write could corrupt them.
- Profile/vault directories and ccpm-created `~/.claude` directories are now created `0700` (owner-only), so credential files aren't enumerable by other local users on a shared host.
- `ccpm rename` reordered its keychain migration and plugin-metadata rewrite so a mid-rename failure can't leave plugin metadata pointing at a directory that was rolled back.
- Fixed a crash where a malformed or truncated stored API key could panic `ccpm status` / `list` / `auth status`; keys are now masked safely and validated on entry.
- The npm installer now verifies the downloaded binary's SHA-256 against the release checksums and pins the download to the installed package version (no more silently fetching `latest`).