jverhoeks/claudecounter

5 stars ยท Last commit 2026-08-24

๐Ÿ’ธ Real-time TUI for watching your Claude Code spend โ€” fast Go binary, ccusage-compatible math, per-project + subagent breakdown

README preview

# ๐Ÿ’ธ claudecounter

> Two tiny, fast tools that watch your Claude Code spend in real time.

Both apps tail `~/.claude/projects/**/*.jsonl` (recursively, including
subagent transcripts) via OS-native file events, dedupe by
`messageId:requestId`, and apply the same LiteLLM pricing table that
[ccusage](https://github.com/ryoppippi/ccusage) uses. Same JSONL in โ†’
same dollars out, to the cent. Codex spend is counted the same way โ€” priced
from that same LiteLLM table โ€” if `~/.codex/sessions` exists. Grok spend is
counted too, if `~/.grok/sessions` exists โ€” but its dollars come straight
from the figure xAI reports per turn, not from a pricing table (see
[Multiple sources & grouping](#-multiple-sources--grouping-tui-key-v--popover-segmented-control)).

| | [Go TUI](./tui) | [Mac menu bar](./macapp) |
|---|---|---|
| **Surface** | Full-screen terminal dashboard | macOS menu bar item + popover |
| **Best for** | Power users, SSH sessions, scripting | "Glance and go" โ€” always-on indicator |
| **Languages** | Go (single static binary) | Swift / SwiftUI (`.app` bundle) |
| **Platforms** | macOS ยท Linux ยท Windows | macOS 13+ on Apple Silicon |

View full repository on GitHub โ†’