DEV Community

Henry Godnick
Henry Godnick

Posted on

How I Track LLM Token Costs in Real Time From My Menu Bar

Last month I spent $340 on Claude API calls. I only realized when the invoice hit. Sound familiar?

The problem isn't the spending. It's the zero visibility while you work. You fire off prompts, switch between models, debug for an hour, and by the time you check the dashboard the damage is done.

The Fix

I started using TokenBar, a macOS menu bar app that shows your token usage and cost in real time as you work. Think of it like a gas gauge for your AI spend.

What it shows:

  • Live token count per session
  • Cost per model (Opus, Sonnet, Haiku, GPT-4, etc.)
  • Which conversation is burning the most
  • Running daily/weekly totals

What changed for me:

  1. Caught runaway loops. A debugging session was burning $15 in 20 minutes. I saw the counter climbing and killed it. Without the counter I would have let it run for another hour.

  2. Switched models intentionally. When you can see Opus costing 10x more per prompt than Haiku, you start asking "does this task actually need Opus?" The answer is usually no. I moved ~60% of my prompts to cheaper models with identical results.

  3. Cut monthly spend by 40%. Just from being aware. No code changes, no workflow changes. Just visibility.

The Details

  • Price: $10 one-time (not a subscription)
  • Platform: macOS menu bar
  • Providers: Works across Claude, OpenAI, OpenRouter, and more

tokenbar.site

When You Don't Need This

  • If you're on a fixed subscription (Cursor Pro, Claude Max) and don't care about per-token costs
  • If you only use AI occasionally
  • If you already have monitoring set up through your API dashboard

But if you're on pay-per-token plans and building every day, having the cost visible while you work changes your behavior in ways a monthly invoice never will.


Built by a solo dev. $10, no subscription, no telemetry. If you've found other ways to track AI costs, I'd love to hear about them in the comments.

Top comments (0)