Track Claude Code Token Usage with Open-Source Tool

Just published a new open-source tool to GitHub. Claude Code has no built in way to track how many tokens you are burning across sessions, so I built one. It is a two-file setup. A Python server reads the JSONL session logs Claude Code writes to ~/.claude/projects/ and serves the data to a local browser dashboard. It breaks down input, output, cache write, and cache read tokens per session and calculates estimated cost using current Sonnet 4 rates. The whole thing auto-refreshes every 30 seconds and exports to CSV. No external dependencies, no cloud, nothing leaves your machine. Two features already in the pipeline. First is a configurable token budget alert that warns you in the dashboard when you cross a daily or monthly threshold. Second is an n8n workflow that pulls from the local API and delivers a usage digest by email on whatever schedule you want. #claudecode #aitools #anthropic #ITAutomation #DeveloperTools #opensource

To view or add a comment, sign in

Explore content categories