thedrain - See what Claude actually did for you today

by•
See what Claude actually did for you today — tokens, API-equivalent cost, commits and lines, measured against the Linux kernel and Doom. Local, zero tokens, zero network. - Azamatfg/thedrain

Add a comment

Replies

Best
Maker
šŸ“Œ

Hi Product Hunt šŸ‘‹

I build platforms with Claude Code every day. Last week I shipped 13 services and around 101,000 lines of Go in four days — and I had no idea what that actually cost. Claude Code shows you a session number, never a day, and it never connects tokens to what got built.

So I wrote thedrain. It reads the transcripts already on your disk and answers three questions at once:

• what the model did — 878,206,201 tokens, 5,598 calls, 35% of the output was thinking

• what it would cost — $648.37 at API rates, priced per model with cache writes and reads billed correctly

• what came out of it — 45 commits and 14,858 lines across four repositories

Zero tokens. Zero network calls. It reads the JSONL files Claude Code already writes to ~/.claude and adds up numbers. Asking a model how much you spent would be like calling the bank to read your own statement.

Two things surprised me the first time I ran it.

First: 98% of that token volume was cache reads, billed at a tenth of the input rate. Caching saved $3,877 that day. If your cache-read share is low, that is a real finding — something in your prompt prefix is changing between requests and silently invalidating it.

Second: if you are on a subscription, you did not pay that $648. thedrain says so on every run and shows what the day was worth against Pro, Max 5x and Max 20x. That day was 3.2 months of Max 20x, delivered in one.

And because a number alone is not motivating, it compares your output to code you already have a feel for. The first Linux kernel was 10,239 lines. A normal day with an agent now passes what Torvalds released in 1991. The legends list lives in legends.json — send a pull request with the one you want to race. That is the roadmap.

brew install Azamatfg/tap/thedrain

Curious what your numbers look like. Post them.