Token Consumer Dashboard
Token Consumer is a VS Code extension that opens a webview dashboard for universal AI agent token consumption.
It starts with tabs for:
- Copilot
- Claude Code
- Codex
- Antigravity
- Other AI
- All Agents
Run It
- Open this folder in VS Code.
- Press
F5 to launch an Extension Development Host.
- Run
Token Consumer: Open Dashboard from the command palette.
No bundler or compile step is required. The extension entrypoint is extension.js, and the dashboard files are dashboard.js and dashboard.css.
After installing the VSIX, Token Consumer also appears in the left Activity Bar. Click the Token Consumer icon to open the sidebar dashboard.
Add Real Token Events
Token Consumer reads normalized JSONL events from .token-eater-events.jsonl in the workspace root.
Token Consumer does not claim local transcript logs are official provider totals.
To add verified data, write provider-confirmed events to .token-eater-events.jsonl.
The extension checks installed claude and codex CLIs for version/login status and whether they expose a usage/statistics command. Claude Code usage is synced from the same local ~/.claude/stats-cache.json data used by /stats. Codex usage is estimated from local session logs because the Codex CLI does not currently expose an equivalent stats command.
To sync usage:
- Open the dashboard.
- Click
Sync Usage.
The importer reads token metadata from:
~/.claude/stats-cache.json for Claude Code /stats totals
~/.codex/sessions/**/*.jsonl for estimated Codex final per-session local-log totals. Cached input is stored separately and excluded from dashboard totals by default.
Claude Code imports are labeled verified because they match /stats. Codex imports are labeled estimated because they are inferred from local session counters, not from a provider dashboard. Codex rows preserve raw and cached input metadata so repeated cached context does not look like fresh prompt input.
Copilot and Antigravity tabs are ready, but their adapters need a stable provider-verified usage export/log path before they can show verified token counts.
Each line should look like this:
{"agent":"codex","model":"gpt-5-codex","timestamp":"2026-06-10T10:15:00.000Z","inputTokens":4200,"outputTokens":900,"costUsd":0.0143,"source":"Provider Verified Export","sourceKind":"verified","language":"JavaScript","requests":1,"accepted":1}
Supported agent names are normalized into copilot, claude-code, codex, antigravity, and other-ai.
Until the file has events, the dashboard shows an empty verified-data state. Generated demo data is disabled by default.
Event Schema
agent: Agent/provider name or id.
model: Model name.
timestamp: ISO date string.
inputTokens: Prompt/context tokens.
outputTokens: Generated tokens.
totalTokens: Optional. If omitted, input and output are added.
cachedInputTokens: Optional cached prompt/context tokens.
rawInputTokens: Optional provider-reported input before cached-token exclusion.
costUsd: Optional cost in USD.
source: Human-readable source label.
sourceKind: verified, estimated, heuristic, sample, or demo.
language: Optional language/category label.
requests: Optional request count.
accepted: Optional accepted suggestion/edit count.
Next Adapter Work
Real provider adapters can be added by writing normalized events into .token-eater-events.jsonl. Good next adapters:
- A verified Codex stats source if the CLI exposes one later
- Copilot provider export/import support
- Antigravity provider export/import support
- Generic JSON/CSV importer for other AI tools