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

What it solves

Token Tracker provides a unified way to monitor and analyze token consumption and costs across multiple local AI agents, specifically Claude Code, Codex, and Kimi Code. It solves the problem of fragmented usage data by aggregating costs, quotas, and session details into a single dashboard, preventing "bill shock" and helping users track their quota limits in real-time.

How it works

The tool reads local session logs (JSONL and SQLite files) from the agents' configuration directories in a read-only manner. It integrates directly into the agents' interfaces via official StatusLine APIs (for Claude Code and Kimi Code) or a custom "pseudo-statusline" hook (for Codex) to display real-time metrics. It also includes a CLI for generating reports and a sidebar utility that uses local FIFOs and terminal automation (AppleScript for iTerm2/Ghostty) to provide a live overview of active sessions.

Who it’s for

Developers and power users who use multiple AI coding agents (Claude Code, Codex, Kimi Code) and need to track their token usage, financial costs, and remaining API/subscription quotas without manually checking multiple platforms.

Highlights

  • Unified Tracking: Aggregates data from Claude Code, Codex, and Kimi Code into one place.
  • Real-time Status Bars: Injects live token, cost, and quota metrics directly into the agent's terminal interface.
  • Multi-dimensional Reporting: Generates daily heatmaps, weekly, and monthly reports with cost and token analysis.
  • Interactive Sidebar: A resident panel showing all active sessions, status lights, and "next step" suggestions with one-click jumping to specific terminal panes.
  • Zero Configuration: Automatically detects installed agents and reads local data without requiring API keys or cloud uploads.
  • Privacy-First: All data is stored and processed locally.

Related

  • Project
  • Project
  • Project
  • Project
  • Project