// the find
stormzhang/token-tracker
Claude Code & Codex 本地 token 追踪 — 状态栏(Codex 业界首创伪 statusline)、GitHub 风格热力图、多模型成本分析。 | Local token tracker for Claude Code & Codex — status line (industry-first Codex faux statusline), GitHub-style heatmap, multi-model cost analysis
A local CLI that parses Claude Code, Codex, and Kimi Code session logs to report token usage, cost, and rate-limit status through a statusline, terminal reports (daily/weekly/monthly), and a live sidebar panel. Aimed at developers juggling multiple AI coding agents who want spend and quota visibility without opening each tool's own dashboard.
Everything is read from local session files (JSONL/SQLite) with zero network calls for tracking, so it works offline and doesn't ship usage data anywhere. The Codex statusline is a real workaround, not a wrapper around an existing feature — Codex has no official statusline API, so it's implemented via a Stop hook that appends a rendered line after each response. Cost calculation accounts for provider-specific pricing quirks that are easy to get wrong: DeepSeek's day/night rates, long-context pricing tiers, and separate cache-read/cache-write pricing for Codex. Test coverage is solid for a solo project — adapters, cost logic, hooks, and the sidebar all have dedicated test files, backed by CI.
Cost numbers outside Claude Code's own official cost field are estimates against a manually maintained price table, so they go quietly stale whenever a provider changes pricing or ships a new model. The sidebar's pane-jump feature depends on AppleScript control of iTerm2/Ghostty or tmux, making that part effectively macOS/tmux-only — Windows and plain-terminal users get the reports but not the interactive jump. Installation is curl-pipe-to-bash rather than a PyPI package, so there's no `pip install`, no version pinning, and no reproducible install path. The README is Chinese-first with English as a separate translated file, which adds friction for English-only contributors trying to tell which doc is authoritative.