Skip to main content

Claude Code usage dashboard across multiple devices

Project description

claude-multi-usage (cmu)

CLI dashboard for Claude Code usage tracking across multiple devices.

Parses local ~/.claude data and displays usage stats in your terminal — sessions, tokens, projects, models, and more. Supports multi-device sync via a central server.

Install

pipx install claude-multi-usage

Requires pipx. Install with brew install pipx (macOS) or pip install pipx.

Usage

cmu                    # Full dashboard
cmu today              # Today's usage
cmu projects           # Usage by project
cmu models             # Usage by model
cmu cost               # Monthly cost breakdown
cmu dashboard -d 30    # Last 30 days
cmu dashboard --all    # All devices (via sync server)

claude-multi-usage also works as a command alias.

Multi-Device Sync

Collect usage data from multiple machines into a central server.

Server Setup

Choose one of the following:

Docker (recommended)

docker run -d -p 8000:8000 -v cmu-data:/data ghcr.io/hunknownn/claude-multi-usage:latest

Kubernetes

kubectl apply -f deploy/k8s/

pip

pip install claude-multi-usage[server]
cmu server start --host 0.0.0.0 --port 8000

Client Setup

# Set server URL (once)
cmu config --server https://your-server.com

# Sync usage data
cmu sync

# View all devices' usage
cmu dashboard --all

Auto Sync

Add to ~/.zshrc to sync automatically when using Claude:

cc() {
    cmu sync --quiet &>/dev/null &
    command claude "$@"
    cmu sync --quiet &>/dev/null &
}

Dashboard Preview

── Claude Usage Dashboard  ──  my-macbook.local  ──  2026-03-07 ──

╭──────────── Summary ────────────╮  ╭────────── Model Usage ──────────╮
│  Hostname       my-macbook      │  │  Model           Output  Cache  │
│  Total Sessions 132             │  │  claude-opus-4-6  780K   519M   │
│  Total Messages 35,330          │  │  claude-sonnet    867K   424M   │
│  Output Tokens  1.6M            │  ╰─────────────────────────────────╯
│  Estimated Cost $1,548         │
╰─────────────────────────────────╯

╭──────────────── Daily Tokens (last 14 days) ─────────────────╮
│  02-23  ████░░░░░░░░░░░░░░░░   60.3K  (1233 msgs, 9 sess)   │
│  02-24  █░░░░░░░░░░░░░░░░░░░   24.8K  (909 msgs, 4 sess)    │
│  03-03  ███████░░░░░░░░░░░░░   96.6K  (633 msgs, 4 sess)    │
╰──────────────────────────────────────────────────────────────╯

╭──────────────── Hourly Sessions (all time) ──────────────────╮
│  00 01 02 .. 09 10 .. 16 17 18 19 20 21 22 23               │
│  ▒▒ ░░ ░░    ░░ ▒▒    ▓▓ ▒▒ ░░ ▒▒ ▓▓ ▓▓ ██ ▓▓               │
╰──────────────────────────────────────────────────────────────╯

╭──────────────── Top Projects ────────────────────────────────╮
│  1. apr-backend-assignment   45 sessions   2026-02-10       │
│  2. wemade-assignment        23 sessions   2026-03-04       │
│  3. url-jarvis               17 sessions   2026-03-07       │
╰──────────────────────────────────────────────────────────────╯

Cost Estimation

Calculates estimated API costs using LiteLLM's pricing DB (2,600+ models). Pricing is auto-fetched and cached locally for 24 hours.

  • Supports tiered pricing (200K+ token extended context)
  • Subagent (haiku) usage included
  • Deduplicates streaming message blocks
  • Falls back to last cached pricing when offline
╭──────────── Cost Breakdown (by month) ────────────╮
│  Month    Model                   Cost             │
│  2026-02  claude-opus-4-6      $236.27             │
│           claude-sonnet-4-5     $50.66             │
│           subtotal             $286.93             │
│                                                    │
│  2026-03  claude-opus-4-6       $30.21             │
│           subtotal              $30.21             │
│                                                    │
│  Total                         $317.14             │
╰────────────────────────────────────────────────────╯

How It Works

Reads local Claude Code data from ~/.claude/:

  • stats-cache.json — daily activity, model tokens, hourly counts
  • projects/**/*.jsonl — session files per project (including subagents)

No API keys required. Local data stays local unless you opt in to sync.

Roadmap

  • Multi-device sync via central server (#2)
  • Accurate cost estimation with incremental caching (#5)
  • Web dashboard (#3)
  • Homebrew support

License

MIT

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

claude_multi_usage-0.5.0.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

claude_multi_usage-0.5.0-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file claude_multi_usage-0.5.0.tar.gz.

File metadata

  • Download URL: claude_multi_usage-0.5.0.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for claude_multi_usage-0.5.0.tar.gz
Algorithm Hash digest
SHA256 e93c89b5cf37a5f4e0c8f43adcc2cfadb168745eb75dd877f79256f199def52d
MD5 1d57c51666daa75589a9ed762915b606
BLAKE2b-256 551b7b34c28778f65923884bf84db498d094ff72187fe65f8f7cbd9b509b85b3

See more details on using hashes here.

File details

Details for the file claude_multi_usage-0.5.0-py3-none-any.whl.

File metadata

File hashes

Hashes for claude_multi_usage-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 cb83d1928d03e7b8b861355ff118035d33746145c7c12f74a4bb902bf876f7ee
MD5 c701894960a14432cc59ca95474c3674
BLAKE2b-256 c0f25b227ffd154dfc50de0f63180fcd270b967e5411d924810908ec30b5d38a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page