Skip to content
ccgauge
Stable · 100% local

See how many tokens your AI coding CLIs actually use.

ccgauge is a local-only dashboard for Claude Code and OpenAI Codex CLI. Track tokens, cost, cache savings, and 5h-block usage across every project, model, and session — without sending a single byte off your machine.

bash
npx ccgauge

One command. Opens a dashboard at localhost:3737. No login, no telemetry, no API keys.

Real ccgauge overview dashboard screenshot in dark mode, showing KPI cards, token trend chart, cache hit rate, and active 5-hour block. Real ccgauge overview dashboard screenshot in dark mode, showing KPI cards, token trend chart, cache hit rate, and active 5-hour block.
Claude Code OpenAI Codex CLI 100% local MIT licensed macOS · Linux · Windows English / 中文
Why ccgauge

Six things that make ccgauge worth the 10-second install.

Every feature is built around two ideas: your data stays on your machine, and you get answers in seconds — not after building a spreadsheet.

ccgauge Models page comparing per-model token spend across Claude and Codex side by side. ccgauge Models page comparing per-model token spend across Claude and Codex side by side.

Multi-source analytics

One unified dashboard for Claude Code, OpenAI Codex CLI, or both merged in an All view. Real provider logos, persisted via URL + cookie.

Generated terminal-style report visual with cost and token analytics.

CLI report

No server, no browser — just `ccgauge report`. Colored summary, trend chart, top-N breakdown, JSON output. Pipes cleanly into your scripts.

Read the CLI reference
Generated MCP integration visual with a local server node connected to structured usage tools.

MCP server

Let Claude Desktop / Cursor / Cline query your usage directly. Eight MCP tools cover totals, time series, per-model and per-session breakdowns.

MCP integration guide
Generated analytics visual focused on a 7 by 24 activity heatmap and hover tooltip.

Activity heatmap

7×24 day-of-week × hour-of-day grid with hover tooltips for message counts, tokens, and share-of-total. Find your peak coding hours at a glance.

Generated local privacy visual with a shield, locked files, and a blocked outbound network path.

100% local, zero telemetry

ccgauge reads your existing JSONL session files and never makes outbound calls. Bind to 127.0.0.1 by default. Open source, MIT.

Privacy by design
Generated bilingual and theme-switching visual with dark and light dashboard panels.

Bilingual, themeable

English and 简体中文 throughout the UI and CLI. Dark / light / system themes with no flash on first paint. Cross-platform npm install.

Drill down to a single call

From monthly spend to the exact API call.

Every assistant call is grouped into its real conversation turn. Expand a turn to see each call's tool list, prompt fragment, and cost — search, filter, sort, export.

ccgauge — localhost:3737
ccgauge Usage page screenshot, showing the turn-grouped table with expandable tool-call rows, search box, and CSV export button. ccgauge Usage page screenshot, showing the turn-grouped table with expandable tool-call rows, search box, and CSV export button.
Usage · turn-grouped table with expand · CSV export
How the numbers work

Honest math. No black box.

Token counts come straight from the JSONL your CLI already writes. Cost uses ccgauge's built-in price tables for each model.

See the full methodology
  • Token counts

    Read directly from the assistant records in your CLI's JSONL files. We dedupe identical (messageId, requestId) pairs across sub-agent forks.

  • Cost calculation

    Per-million-token rates per model. Unknown variants fall back to the family-latest rate (e.g. gpt-5.5-foogpt-5.5).

  • Cache savings

    We compute what you would have paid if every cache-hit had been a fresh read at full input rate, and show the delta as "Saved by cache".

  • 5h block tracker

    Wall-clock progress of the active 5-hour conversation window. Not Anthropic's plan-quota counter — that lives server-side and isn't exposed to clients.

MCP-ready

Let your LLM read its own usage.

Add three lines to Claude Desktop's config and ask the model: "how much did I spend on Opus this week broken down by project?" Eight MCP tools answer that and a dozen variations like it.

See all 8 MCP tools
json
{
  "mcpServers": {
    "ccgauge": {
      "command": "npx",
      "args": ["-y", "ccgauge", "mcp"]
    }
  }
}

Install in 10 seconds.

One command — opens a local dashboard, no signup. Stop guessing what Claude Code costs you.