作者開發 Bumeter 桌面應用程式,追蹤 Claude Code 用量並顯示 Kiro 配額
I built a tray app to see where my Claude Code tokens actually go
作者開發免費開源桌面應用程式 Bumeter,讀取 Claude Code 的本機日誌並整合 Kiro 用量,在系統匣顯示配額,並按對話、回合和技能拆解 Claude Code 用量。
You're deep in a refactor with Claude Code, everything is flowing, and then:
You've hit your limit. Resets at 3:10 PM.
Two hours of nothing. And the worst part isn't the wait — it's that I had no idea what burned the quota. Was it that one giant conversation? The 20 skills I installed "just in case"? A turn that re-read half the repo?
So I built Bumeter: a small desktop app that reads the logs Claude Code and Kiro already write on your machine and answers two questions:
- Where did my tokens go? Per conversation, per turn, per skill.
- How close am I to being blocked? Your 5-hour and 7-day quota (and Kiro's monthly credits), always visible in the system tray.
It's free, open source (GPL-3.0), and nothing is uploaded — it only reads files that are already on your disk.
What it shows
A quota bar in your tray
The tray menu shows one bar per tool. The mascot, Bum 🔥, changes face with your usage — calm, happy, worried, on fire, or asleep — and the highest percentage sits next to it in the top bar.
Claude Code
▰▰▰▰▰▱▱▱▱▱ 🟢 5 hours · 49% · reset 13:10
▰▰▰▰▰▰▰▰▰▱ 🔴 7 days · 90% · reset Oct 16
Kiro
▰▰▰▱▱▱▱▱▱▱ 🟢 Month · 27% · 271/1000 credits · reset Nov 1
You also get a notification when a quota passes your thresholds (70% / 90% by default) or when a single turn costs far more than usual.
Conversations and turns
Every conversation, grouped by day, with a fuel bar showing how much it cost. Filter by project, model, "costly", "large context", "interrupted" or starred, then open a conversation to see every turn: what you asked, which tools ran, and why it was expensive.
Context analysis
For any session: what is filling the context window (your messages, tool output, re-reads…), when it was compacted, and which tool calls were huge.
The hidden cost of skills
This one surprised me. A skill's description sits in the system prompt of every request in every session, whether you use the skill or not. Bumeter shows each skill's always-on cost next to how often you actually used it — and you can disable, resize or remove skills with undo.
How it works
Claude Code writes a JSONL log for every session under ~/.claude/projects/. Each API call records its token usage: input, cache writes, cache reads, output. Bumeter tails those files, de-duplicates the streamed entries, attributes each call to the turn and skill that caused it, and stores the result in a local SQLite database.
The 5-hour / 7-day percentages are trickier: they aren't in the logs. But Claude Code passes them to your status line command as JSON. So Bumeter puts a tiny bum statusline --tee in front of your existing status line command: it saves the numbers and passes the input through untouched, so your status line keeps working. The change to ~/.claude/settings.json is backed up and has an undo button.
Kiro doesn't log tokens at all, so context size is estimated from the per-turn context percentage, and cost is shown in credits. The monthly limit comes from kiro-cli /usage (only when it's installed and you're logged in), or you can type it in.
Each tool is an adapter behind one interface, so adding Codex, Cursor or Gemini CLI is a new adapter plus one line in a registry — the UI already has per-tool tabs.
The stack
- Rust workspace: ingestion engine, SQLite (rusqlite), file watching (notify), a background host with JSON-RPC over a local socket
- Tauri 2 for the window, tray and notifications
-
TypeScript with no framework for the UI (a tiny
h()helper, Vite, Vitest) - A
bumCLI:bum status,bum scan,bum session,bum skills, andbum audit
Numbers I care about
I checked it against my own data (38 MB of logs, ~16,500 lines):
-
Token totals match an independent count 100% (
bum auditrecounts the raw logs separately), with 0 parse errors. - First full scan: ~220 ms. A new log line reaches the app in ~31 ms.
- Analysing my largest session — 224 prompts, 726 API calls — takes 48 ms.
- Idle CPU: ~0%.
What I learned from my own data
97% of my tokens were cache reads. Of ~757M tokens, ~735M were cache reads. A "2 million token conversation" sounds scary, but most of it is the same context being re-read on every request — which is much cheaper than fresh input. Raw token counts can make you panic about the wrong thing.
Long sessions get expensive by themselves. Every request re-reads the whole context, so the same short question costs more at turn 200 than at turn 2. Watching context size per turn makes it obvious when /compact or a fresh session is worth it.
Skills you never use still cost something. Small per request, but paid on every request. Worth pruning.
Try it
- Linux:
.deband AppImage - Windows: installer (
.exe/.msi) - macOS: builds are set up in CI but untested — testers very welcome!
The UI is in English and Vietnamese, with light and dark themes.
What's next
- Limit forecast: "at your current pace you'll hit the 5-hour limit at ~14:20, 50 minutes before it resets" — in the tray, with one notification.
- More tools: Codex CLI, Gemini CLI, Cursor, OpenCode.
-
Context coaching: suggest
/compactor a new session when the context is large and being re-read heavily.
If you use Claude Code or Kiro every day, I'd love to hear what you'd want from a tool like this — and which assistant I should support next. Issues and PRs are welcome. ⭐
來源:DEV Community · dev.to


