Claude Tips mascot
Claude Tips & Tricks
Claude Code intermediate

Monitor Usage with a Token Dashboard

Set up a web dashboard that tracks your Claude Code token consumption, costs, and burn rate across sessions.

/cost shows current session usage. A dashboard shows trends across all sessions, helping you spot cost spikes and optimize.

ccflare Dashboard

ccflare gives you a web UI for Claude Code usage:

git clone https://github.com/nomizz/ccflare
cd ccflare
docker compose up -d

Open http://localhost:3000 for:

  • Token consumption over time
  • Cost breakdown by session
  • Model usage distribution
  • Burn rate trends

CLI Alternative

CC Usage analyzes your local Claude Code logs:

npx cc-usage --last 7d

Output:

Last 7 days:
  Sessions: 34
  Input tokens: 2.4M
  Output tokens: 680K
  Estimated cost: $47.20
  Avg cost/session: $1.39

Build Your Own

Claude Code stores session data locally. Query it:

# Find your session logs
ls ~/.claude/sessions/

# Each session has token counts in its metadata
cat ~/.claude/sessions/*/metadata.json | jq '{tokens: .tokenUsage, cost: .costUsd}'

When to Monitor

  • After enabling auto-accept (costs can spike)
  • When onboarding new team members to Claude Code
  • Before and after changing models or workflows
  • Monthly, to track your team’s total spend