Local dashboard to visualize Claude Code token usage, costs, and activity from ~/.claude data.
507
Your Claude Code usage, beautifully visualized โ right on your machine.
Track every token, every cost, every project. Fully offline. No API key. No cloud. Just your data.
๐ GitHubโ ยท ๐ณ Docker Hubโ

| Feature | Details | |
|---|---|---|
| ๐๏ธ | Per-project breakdown | Input / Output / Cache Write / Cache Read tokens |
| ๐ฐ | Cost estimation | API-equivalent cost across Opus, Sonnet & Haiku |
| ๐ | Period filters | 12H ยท 1D ยท 7D ยท 15D ยท 30D ยท 3M ยท All-time |
| โก | Cache hit rate | See exactly how much you save via prompt caching |
| ๐ | Activity charts | Daily & hourly views with cost-per-day toggle |
| ๐ง | Conversation depth | Avg message depth per project |
| ๐ท๏ธ | Model mix badges | Opus / Sonnet / Haiku usage per project |
| ๐ | Project search | Instantly filter across all your projects |
| ๐ฅ | CSV export | Download your full usage data |
| ๐ | Auto-refresh | Live updates every 30 seconds |
docker run -d \
--name ccusage \
-p 9001:9001 \
-v ~/.claude:/claude-data:ro \
-e CLAUDE_DATA_DIR=/claude-data \
vikas9dev/ccusage:latest
docker run -d `
--name ccusage `
-p 9001:9001 `
-v "$env:USERPROFILE\.claude:/claude-data:ro" `
-e CLAUDE_DATA_DIR=/claude-data `
vikas9dev/ccusage:latest
docker run -d ^
--name ccusage ^
-p 9001:9001 ^
-v "%USERPROFILE%\.claude:/claude-data:ro" ^
-e CLAUDE_DATA_DIR=/claude-data ^
vikas9dev/ccusage:latest
Then open ๐ http://localhost:9001โ
Create a docker-compose.yml anywhere and run docker compose up -d:
services:
ccusage:
image: vikas9dev/ccusage:latest
ports:
- "9001:9001"
volumes:
- "${CLAUDE_DATA_DIR:-~/.claude}:/claude-data:ro"
environment:
- CLAUDE_DATA_DIR=/claude-data
restart: unless-stopped
๐ก Windows users: replace
~/.claudewithC:\Users\<YourName>\.claudein the volumes line, or setCLAUDE_DATA_DIRas an environment variable before running.
docker stop ccusage && docker rm ccusage # ๐ stop & remove
git clone https://github.com/vikas9dev/ccusage
cd ccusage
cd frontend && npm install && cd ..
bash start.sh # ๐ starts backend + frontend
| Service | URL |
|---|---|
| ๐ง Backend API | http://localhost:9001โ |
| ๐จ Frontend UI | http://localhost:5173โ |
bash stop.sh # ๐ stop both
bash restart.sh # ๐ restart both
Copy and edit .env (optional โ defaults work out of the box):
BACKEND_PORT=9001
FRONTEND_PORT=5173
CLAUDE_DATA_DIR=~/.claude
# ๐จ Build
docker build -t ccusage .
# โถ๏ธ Run locally
docker run -d \
--name ccusage \
-p 9001:9001 \
-v ~/.claude:/claude-data:ro \
-e CLAUDE_DATA_DIR=/claude-data \
ccusage
docker login
docker tag ccusage vikas9dev/ccusage:latest
docker tag ccusage vikas9dev/ccusage:1.0.0
docker push vikas9dev/ccusage:latest
docker push vikas9dev/ccusage:1.0.0
# One-time setup
docker buildx create --use --name multiarch
# Build & push amd64 + arm64 simultaneously
docker buildx build \
--platform linux/amd64,linux/arm64 \
-t vikas9dev/ccusage:latest \
-t vikas9dev/ccusage:1.0.0 \
--push .
ccusage reads three local files written by Claude Code โ nothing leaves your machine:
| ๐ File | What it provides |
|---|---|
~/.claude/history.jsonl | Per-message project + session timestamps |
~/.claude/projects/<dir>/*.jsonl | Token usage per session (deduplicated by message ID) |
~/.claude/stats-cache.json | All-time global aggregates (sessions, messages, model totals) |
๐ก Cost shown is API equivalent cost โ what your usage would cost on pay-per-token billing. If you're on a flat subscription, your actual charge is your monthly plan fee.
| Model | Input | Output | Cache Write | Cache Read |
|---|---|---|---|---|
| ๐ฃ Claude Opus 4 | $15/M | $75/M | $18.75/M | $1.50/M |
| ๐ต Claude Sonnet 4.6 | $3/M | $15/M | $3.75/M | $0.30/M |
| ๐ข Claude Haiku 4.5 | $0.80/M | $4/M | $1.00/M | $0.08/M |
Prices per million tokens. Source: Anthropic pricingโ
| Variable | Default | Description |
|---|---|---|
CLAUDE_DATA_DIR | ~/.claude | ๐ Path to your Claude Code data directory |
BACKEND_PORT | 9001 | ๐ Port for the backend API and frontend |
FRONTEND_PORT | 5173 | ๐จ Frontend dev server port (local dev only) |
MIT ยฉ vikas9devโ
Content type
Image
Digest
sha256:cf6d4063aโฆ
Size
43.5 MB
Last updated
5 months ago
docker pull vikas9dev/ccusage