Skip to main content

Token Usage Dashboard

The Token Usage Dashboard evaluates the usage data of Claude Code and Codex: cost, tokens, models, projects, sessions, 5-hour billing blocks and the token savings of the rtk proxy. It runs locally on your machine only, sends nothing anywhere and needs nothing beyond Python 3.11. It runs on Windows, Linux and macOS.

The Token Usage Dashboard on the Uebersicht tab: the data directory and the “Daten neu laden” button at the top, below them the tabs, the green plausibility check line, the filter bar with period, measure and models, eight KPI cards, a projection note and the chart of cumulative monthly cost.

The user interface is available in German and English. On your first visit the language follows your browser; a selection in the header is remembered. Numbers and dates follow the selected language, while costs always stay in US dollars.

What the Token Usage Dashboard does​

The following table lists the features of the Token Usage Dashboard and the page that describes each one in detail:

FeatureIn shortPage
Five tabsOverview, Projects, Sessions, Blocks, RTKUsing the dashboard
FiltersPeriod, cost or tokens, model selection; applies to all tabsUsing the dashboard
MetricsMedian, $ / 1M tokens, context reload factor, projection and moreMetrics
Plausibility checkSums are cross-checked, broken files are reportedChecks and messages
Export monitoringThe header shows whether the nightly exports runChecks and messages
InstallerSets up the dashboard, the data directory and scheduled exportsInstallation
Export chainFills the data directory every night using ccusage and rtkExport chain
JSON APIEvery metric is also available as JSONAPI

What the Token Usage Dashboard does not do​

The Token Usage Dashboard only reads files. It collects no data, starts no exports and never writes into the data directory. It reads the JSON files lying there and computes metrics from them.

The files are created by a separate export chain that queries ccusage and rtk. The separation is deliberate: a reader cannot break anything, and a failed export shows up as a gap in the numbers instead of a half-written file.

Building blocks of the Token Usage Dashboard​

The following diagram shows how the Token Usage Dashboard reads the files from the data directory, checks them and serves them to the browser through the HTTP server:

data directory
YYYY-MM.json projects/ blocks/ sessions/ rtk/ status/
|
v
read monthly files read extra sources check, normalize
| |
v v
overview metrics metrics per source
\ /
---> HTTP server <--- JSON API on 127.0.0.1
|
v
browser tabs, filters, charts

The following table summarizes the technical decisions behind the Token Usage Dashboard:

PointDecision
LanguagePython 3.11 or newer
Dependenciesstandard library only, no pip, no venv
Startpython3 app.py or the installer's start script
Serverbinds to 127.0.0.1, port 8000
InterfaceHTML, CSS and JavaScript without a build step
ChartsChart.js 4.4.1 is bundled, no network access needed

Three Token Usage Dashboard rules that explain everything else​

These three rules determine how the Token Usage Dashboard handles data:

  1. The dashboard only reads files. It never calls ccusage or rtk itself.
  2. Missing days are gaps, not zeros. Means run over days with data only, and time series break on missing days.
  3. Broken data is reported, never silently skipped. Every rejected file and every sum that does not add up shows in the status area.

On top of that, the Token Usage Dashboard shows no invented numbers. Where a quantity cannot be derived cleanly, it is left out. Estimates such as the projection for the current month are visibly marked as estimates.

For you alone

The server has no authentication. Anyone who can reach it sees everything, including project paths and with them the names of customers and ventures. Keep it on 127.0.0.1 and do not put it on an open network, not even behind a tunnel or reverse proxy without access control of its own. More under Configuration.

Source code and license of the Token Usage Dashboard​

The source code of the Token Usage Dashboard is on GitHub: Flexible-Universe/Token-Usage-Dashboard. The project is licensed under the AGPL-3.0, see Contributing and license.

Token Usage Dashboard topics​

These pages describe the Token Usage Dashboard in detail: