Real-time per-prompt token and cost tracker for Claude Code, built to make LLM spend visible inside the terminal while the work is still running.
Key Engineering
Built an asynchronous Python CLI that parses terminal event streams in real time to calculate live token usage and per-prompt cost, without scraping external transcripts or adding latency to the session. Developed test-first: every parser branch and pricing rule was specified as a failing test before it was written.
Outcome & Impact
Surfaces the running cost of a session as it happens, so an expensive agent run can be stopped mid-flight instead of discovered on the invoice. Open source, with a 293-test suite guarding the parsing and pricing paths.