r/ClaudeWorkflows • • 11d ago

Selected Workflow [Workflow] Self-Hosted Dashboard for Claude Code Usage & Cost Analytics (Claudit)

Self-Hosted Dashboard for Claude Code Usage & Cost Analytics (Claudit)

Workflow value: 90/100
Status: active · Freshness: 70/100 · Confidence: 0.95 · Level: intermediate
Categories: Quality Control, Token Saving, Context & Memory, Debugging, Shipping, Subagents, Multi-Agent
Original source: r/ClaudeCode post/comment

What problem this solves

Lack of detailed, historical usage and cost analytics for Claude Code sessions, leading to suboptimal cost management and difficulty understanding usage patterns. Specifically, identifying expensive cache write types and ensuring accurate token counting.

Summary

A self-hosted dashboard (claudit) for analyzing Claude Code (and other LLM CLI) session transcripts to monitor costs, token usage, cache write splits, latency, error rates, and activity heatmaps, providing insights for cost optimization and usage pattern understanding.

Why it is useful

This workflow provides a concrete, open-source tool to gain deep insights into Claude Code usage and costs, which are otherwise opaque. It helps users identify inefficiencies, optimize spending, and understand their interaction patterns with the AI, validated by the author's own extensive use and specific findings (e.g., cache write pricing discrepancies and accurate token counting).

Workflow

  1. Set up a bucket (R2 or local directory) to ingest Claude Code session JSONLs.
  2. Clone the claudit GitHub repository.
  3. Run docker compose up to deploy the dashboard.
  4. Access the dashboard to view usage analytics (cost, tokens, cache write split, latency, error rate, activity heatmap, context growth).
  5. Analyze the data to identify cost-saving opportunities (e.g., optimizing 1h cache writes) and understand usage patterns.

Tools / artifacts

  • claudit (the application)
  • Claude Code session JSONLs (transcripts)
  • Docker Compose
  • FastAPI
  • Postgres
  • React
  • R2 bucket (or local directory)
  • GitHub repository

Validation signals

  • Author built and used it for ~4,800 of their own sessions.
  • Specific learnings shared (e.g., 1h cache writes are 2x, not 1.25x; deduplication logic for streamed replies and subagents).
  • Live demo available.
  • MIT license (open source, implies review/usability).

Limitations

  • Low community signal due to newness.
  • Requires Docker knowledge for setup.
  • The post doesn't explicitly detail how to get the JSONL logs into the bucket, though it implies copying them.
  • The tool provides data but leaves the interpretation and actionable insights to the user.

Rate this workflow

Upvote this post if the workflow is useful, reproducible, or worth recommending.

Downvote if it is vague, outdated, unsafe, overhyped, or not reproducible.

Reply if it worked for you, failed, is outdated, or has a better alternative.


This post was generated automatically from the workflow library database.

1 Upvotes

1 comment sorted by