Skip to content
antoniocascaisPublic

About

Analytics dashboard for Claude Code sessions. Parses JSONL conversation logs and shows model usage, token stats, and estimated API value. Dark CRT aesthetic.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

lain-code

Analytics dashboard for Claude Code sessions.

Parses JSONL conversation logs from ~/.claude/projects/ and serves a web UI with:

  • Model usage breakdown — doughnut chart showing distribution across Opus, Sonnet, Haiku
  • Token stats — input, output, cache read, cache create per session
  • Cost estimation — estimated API value based on Anthropic pricing (not actual spend)
  • Project filtering — sidebar with search, select/deselect all
  • Date range filtering — presets (today, 7d, 30d) or custom range
  • Sortable sessions table — all metrics per session

CRT aesthetic inspired by Serial Experiments Lain, with dark and light themes.

Dark theme Light theme

Quick start

make build
make serve

Open http://localhost:8000

Requirements

  • Docker + Docker Compose
  • ~/.claude/projects/ directory (created by Claude Code)

Everything runs locally — no telemetry, no session data leaves your machine. The frontend loads Google Fonts and Chart.js from CDN (standard browser requests, no app data sent).

How it works

The app runs in a Docker container with ~/.claude/projects/ mounted read-only at /data. A FastAPI backend scans the JSONL session files (including subagents/ subdirectories) and serves both the API and the static frontend.

Stack

  • Backend: Python / FastAPI
  • Frontend: Vanilla JS, Chart.js (CDN)
  • Container: python:3.12-slim, non-root by default

About

Analytics dashboard for Claude Code sessions. Parses JSONL conversation logs and shows model usage, token stats, and estimated API value. Dark CRT aesthetic.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages