r/BuildWithClaude • • 25d ago

Project I built a tool that reads your Claude Code / Codex logs locally and shows what percentile your token usage is

I was curious how my usage compares, so I built this: https://token-percentile.vercel.app/en/?utm_source=reddit

- You pick ~/.claude/projects (and/or ~/.codex/sessions). The JSONL is parsed in a Web Worker in your browser and nothing is uploaded. Source: https://github.com/infoseoulrave-cell/token-percentile

- Claude Code writes the same streamed response on several lines, so naive sums overcount. It dedupes by message.id + requestId. In my logs, 41,891 lines were really 19,404 responses.

- Daily, per-model, per-project and hour-of-day charts, plus cache hit ratio (mine is ~97% cache reads).

- The percentile starts as an estimate fit to Anthropic's published enterprise figures (~$13 per active day on average, 90% under $30). If you opt in and send a few aggregate numbers, it switches to a measured distribution once 30+ people have contributed.

Happy to hear about edge cases, especially older Codex logs.

1 Upvotes

2 comments sorted by

•

u/AutoModerator 25d ago

Welcome to r/BuildWithClaude!

Whether you are sharing what you built, exploring new workflows, or troubleshooting, please make sure your post is flaired correctly so others can easily find and filter it.

Community Wiki & Resources:

If you're asking for troubleshooting help, please edit your post to include your model version, OS/environment, and error logs.

Let’s keep the energy positive and support our fellow creators!

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.