Javis603/token-monitor
Local-first desktop widget for tracking token usage, costs, limits, and session activity across 47+ AI coding tools—including Claude Code, Codex, Cursor, OpenCode, OpenClaw, and more—with multi-device sync.
Summary: Token Monitor is a desktop widget that watches the local logs and databases of 46+ AI coding tools — Claude Code, Codex, Cursor, GitHub Copilot, and many others — to surface live token usage, cache-hit statistics, and provider-specific account limits (e.g., Codex session caps or third-party API balances) in one unified interface.
Key features:
- Live token tracking and a real-time 'burn rate' readout (tok/s, tok/min)
- Deep per-session breakdowns (tokens per prompt, tools used) and per-tool/model cache-hit vs. miss statistics
- Provider-specific rate-limit and billing detection (29+ providers) plus multi-account support, including one-click switching of the active Codex account
- A usage dashboard with yearly activity heatmaps, streaks, and per-tool/model trend charts (bar and K-line views)
- Local archival of usage so data survives even if tools prune their own transcripts
- Multi-device synchronization: devices send usage summaries to a hub (Server-Sent Events) or sync via iCloud Drive for near-real-time updates
- Export to CSV/JSON, WSL usage detection, and currency display options (USD, TWD, HKD, CNY)
How it works:
Each device watches its own local filesystem artifacts (e.g., ~/.claude/projects/, ~/.codex/, VS Code globalStorage, SQLite DBs) to extract token counts, sessions, and models. For account limits, it leverages API keys, cookies, or custom balance endpoints (e.g., OpenRouter API key, Alibaba Cloud console cookie). It parses this raw data into metrics locally, then relays summary updates to a hub. Per-session details are read on-demand from local transcripts and are never synced.
Notable details:
- Supports custom scan paths and environment-variable overrides for locating tool data (e.g.,
$CODEX_HOME,$XDG_DATA_HOME) - Requires no server for single-device use, but offers a self-hosted sync backend for multi-device setups
- Works on Windows 10+, macOS 12+, and Linux (x64), and is MIT-licensed
Related
- Project
- Project
- Project
- Project
- Project