Sign inSign up

willluck/claude-tools-dashboard

By willluck

Updated 4 months ago

Live token-savings wallboard for Claude Code tools (RTK, Headroom, jCodeMunch, jDocMunch)

Image
0

1.1K

willluck/claude-tools-dashboard repository overview

Claude Tools Dashboard

CI Release Licence GHCR Docker Hub Pulls Image Size Platforms

Live wallboard for monitoring token savings across your Claude Code toolchain. Tracks RTK, Headroom, jCodeMunch, and jDocMunch in a single-page dashboard with real-time SSE updates.

Dashboard

What it shows

  • RTK -- command-level token savings from the CLI proxy (SQLite)
  • Headroom -- context compression stats from the MCP server (HTTP API)
  • jCodeMunch -- indexed repos and session savings (filesystem + MCP)
  • jDocMunch -- documentation indexing and section retrieval savings (filesystem)
  • jDataMunch -- indexed datasets and session savings (filesystem + MCP)
  • Combined total with sparkline trends and live activity feed
  • Stats ticker -- weekly savings breakdown, daily burn rate, Claude usage percentages (5-hour, weekly, Sonnet), and reset countdown (reads Claude Code credentials directly, no extra tools needed)

Quick start

# Clone and run locally
git clone https://github.com/Will-Luck/claude-tools-dashboard.git
cd claude-tools-dashboard
pip install -r requirements.txt
python app.py
# Open http://localhost:8095
Docker (pre-built)
# Docker Hub
docker run -d --name claude-tools-dashboard \
  -p 8095:8095 \
  -v ~/.local/share/rtk:/root/.local/share/rtk:ro \
  -v ~/.code-index:/root/.code-index:ro \
  -v ~/.doc-index:/root/.doc-index:ro \
  -v ~/.claude/.credentials.json:/root/.claude/.credentials.json:ro \
  --network host \
  willluck/claude-tools-dashboard

# Or from GHCR
docker run -d ... ghcr.io/will-luck/claude-tools-dashboard
Docker (build from source)
docker build -t claude-tools-dashboard .
docker run -d --name claude-tools-dashboard \
  -p 8095:8095 \
  -v ~/.local/share/rtk:/root/.local/share/rtk:ro \
  -v ~/.code-index:/root/.code-index:ro \
  -v ~/.doc-index:/root/.doc-index:ro \
  -v ~/.claude/.credentials.json:/root/.claude/.credentials.json:ro \
  --network host \
  claude-tools-dashboard

Use --network host so the container can reach the Headroom proxy on localhost. Alternatively, set HEADROOM_URL to point at the host IP. The credentials mount is optional -- without it, the usage ticker just shows dashes.

Configuration

All settings via environment variables. Copy .env.example for reference:

VariableDefaultDescription
PORT8095Dashboard listen port
HOST0.0.0.0Bind address. Set 127.0.0.1 to expose only behind a reverse proxy
HEADROOM_URLhttp://127.0.0.1:8787Headroom proxy stats endpoint
RTK_DB_PATH~/.local/share/rtk/history.dbRTK SQLite database
RTK_BINrtkPath to RTK binary
JCODEMUNCH_INDEX_DIR~/.code-indexjCodeMunch index directory
JCODEMUNCH_BINjcodemunch-mcpPath to jCodeMunch binary (version check)
JDOCMUNCH_INDEX_DIR~/.doc-indexjDocMunch index directory
JDOCMUNCH_BINjdocmunch-mcpPath to jDocMunch binary (version check)
JDATAMUNCH_INDEX_DIR~/.data-indexjDataMunch index directory
JDATAMUNCH_BINjdatamunch-mcpPath to jDataMunch binary (version check)
SSE_INTERVAL2Seconds between SSE heartbeat pushes
COLLECTOR_INTERVAL0.25Seconds between background collector ticks
CLAUDE_CREDENTIALS~/.claude/.credentials.jsonClaude Code credentials (for usage API)
WEEKLY_CACHE_DIR~/.cache/claude-tools-dashboardWeekly savings snapshot directory

API

EndpointDescription
GET /Dashboard HTML (self-contained SPA)
GET /healthJSON health check
GET /api/statsCurrent aggregated snapshot as JSON (one-shot, no SSE)
GET /metricsPrometheus text exposition (savings, per-tool health, usage, freshness)
GET /eventsSSE stream (auto-reconnects)

Architecture

Single-file Flask app (app.py) that:

  1. Polls RTK's SQLite database for command history and savings
  2. Queries Headroom's HTTP stats API for compression data
  3. Reads jCodeMunch, jDocMunch, and jDataMunch index files for repo, doc, and dataset metrics
  4. Pushes aggregated state to browsers via SSE, and exposes the same snapshot as JSON (/api/stats) and Prometheus metrics (/metrics)
  5. Serves a self-contained HTML/CSS/JS dashboard (no build step)

The frontend uses vanilla JS with CSS custom properties for theming. Sparkline charts are drawn with inline SVG. No external Python dependencies beyond Flask and python-dotenv.

License

MIT

Tag summary

Content type

Image

Digest

sha256:ce7764dd5

Size

46 MB

Last updated

4 months ago

docker pull willluck/claude-tools-dashboard