I built a CLI that shows what your Claude Code usage costs per project, from local logs (free, offline)
retained text
Claude Code keeps every session in \~/.claude/projects, with token counts per request. I wanted to know which of my repos my usage actually went to, so I wrote a small CLI: `npx spendbyteam report` It prices your usage at API list rates (cache reads/writes, fast mode included) and groups it by repo. \``--by=model`\`, \``--by=branch`\`, \``--by=day`\` and \``--by=session`\` also work. It runs offline and sends nothing. Source: [https://github.com/spendbyteam/cli](https://github.com/spendbyteam/cli) (MIT) If you're on Pro/Max, the number is what the same tokens would cost on the API, so it's a decent way to see what your plan is worth to you. My last 30 days: \~$8K at API prices, mostly Opus. Curious what others see. And if a number looks off, tell me. I compared it against Claude Code's own telemetry and it was within 1% for me. \*\*Edit:\*\* added \`--by=session\` after a request in the comments. It shows your most expensive sessions with turns and the input / output / cache split, which is handy on a subscription to see which conversations eat your limits.
document fetched 2026-11-19 00:40 · canonical https://reddit.com/r/ClaudeCode/comments/1xzrt59/i_built_a_cli_that_shows_what_your_claude_code