/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