Data directory
The data directory is the archive of your usage data. The export chain fills it, the Token Usage Dashboard only reads it.
Layout of the data directory
The Token Usage Dashboard data directory has this layout:
Claude-Code-Usage/
2026-05.json … 2026-09.json daily data per month <- required
projects/YYYY-MM.json daily data per project <- optional
blocks/YYYY-Www.json 5-hour billing blocks
sessions/YYYY-Www.json sessions
rtk/YYYY-MM.json token savings of the proxy
status/<job>.<last|ok>.json outcome of the export runs
bin/ the export scripts
logs/ logs per run
Only the monthly files in the root directory are required. If a subdirectory is missing, the dashboard still starts; the corresponding tab then shows a coverage note instead of empty charts. rtk/ exists only when a working rtk is installed.
The default paths per system are listed under Configuration.
Where the data directory may live
The Token Usage Dashboard data directory must not be in a folder that a sync client or the system guards:
- on macOS not under
~/Documents,~/Desktopor in iCloud Drive. Privacy protection (TCC) applies there, and a background process started by launchd gets no access. The exports then fail with a permission error that looks like a program bug. - nowhere in Dropbox.
- on Windows not in OneDrive.
The default directories are safe, which is why the macOS default lives in ~/Library/Application Support. The installer checks the data and application directories and warns about a risky location.
The kinds of file in the data directory
YYYY-MM.json: daily data (required)
The monthly file YYYY-MM.json is produced with ccusage daily --json --by-agent. It contains a daily field with one entry per day and a totals field with the sums:
{
"daily": [
{
"date": "2026-09-01",
"inputTokens": 4108, "outputTokens": 1711502,
"cacheCreationTokens": 11955005, "cacheReadTokens": 201389214,
"totalTokens": 215059829, "totalCost": 189.86,
"modelsUsed": ["claude-opus-5", "claude-sonnet-5"],
"modelBreakdowns": [
{ "modelName": "claude-opus-5", "cost": 153.42,
"inputTokens": 2830, "outputTokens": 1197729,
"cacheCreationTokens": 6206481, "cacheReadTokens": 147598029 }
],
"agent": "all",
"agents": [ { "agent": "claude", "totalCost": 189.86, "totalTokens": 215059829 } ]
}
],
"totals": { "inputTokens": 0, "outputTokens": 0, "cacheCreationTokens": 0,
"cacheReadTokens": 0, "totalTokens": 0, "totalCost": 0.0 }
}
- Two schema variants: older files name the day key
date, newer onesperiod. The dashboard understands both. agentandagents: the fieldagent(singular) has always been"all"so far and is no use for splitting anything. The fieldagents(plural), present since 09/2026, carries the split between Claude and Codex.totalsis optional, but wanted: withouttotalsthe file sum cannot be cross-checked, and the status area reports that.
projects/YYYY-MM.json
The project files projects/YYYY-MM.json are produced with ccusage claude daily --json -i. They contain a projects object whose keys are the project path with - instead of / (for example -home-devuser-projekte-beta-tool). Each key holds an array of daily rows as above.
Because the source replaces / with -, a hyphen inside a folder name is afterwards indistinguishable from the path separator. The dashboard therefore does not guess the path back; it only strips the common prefix of all keys. That yields a short name.
blocks/YYYY-Www.json
The block files blocks/YYYY-Www.json are produced with ccusage blocks --json. They contain the 5-hour billing windows with start, end, cost, tokens, models, burn rate and projection.
- The token fields under
tokenCountsare named differently from everywhere else (cacheCreationInputTokensinstead ofcacheCreationTokens). - Blocks flagged
isGapare idle time between two windows and count towards no sum. - This is the only source without
totals.
sessions/YYYY-Www.json
The session files sessions/YYYY-Www.json are produced with ccusage claude session --json. They contain, per session, sessionId, projectPath, firstActivity, lastActivity and the usual token and cost fields.
The weekly files do not cover exactly one calendar week. The period filter therefore goes by the timestamp inside the record, not by the file name. The dashboard merges duplicate sessions and blocks from overlapping weekly files; the later file wins.
rtk/YYYY-MM.json
The RTK files rtk/YYYY-MM.json come from rtk gain --all --format json, grouped by month:
{ "days": [ { "date": "2026-09-01", "commands": 214,
"input_tokens": 4200000, "output_tokens": 380000,
"saved_tokens": 3820000, "savings_pct": 91.0,
"total_time_ms": 51000, "avg_time_ms": 238 } ] }
input_tokens is the raw size of the command output before filtering, output_tokens is what rtk passed on, and saved_tokens is the difference by rtk's own reckoning. The three numbers do not add up exactly. These tokens were never billed and cannot be offset against the other sources. That is why the fields keep their names with underscores.
This source reaches further back than projects, blocks and sessions. It has no totals.
status/: outcome of the export runs
The status/ directory holds no usage data but the track record of the export chain. Every export run writes two files per job, described in the following table:
| File | Written | Purpose |
|---|---|---|
<job>.last.json | after every run, also after an abort | the last attempt and its outcome |
<job>.ok.json | only with exit code 0, identical content | the last success |
The job is daily, weekly, monthly or rtk. Two files instead of one, so that a failed run never has to touch the last success.
A status file of the weekly job looks like this, for example:
{ "schema": 1, "job": "weekly",
"startedAt": "2026-10-05T02:30:00Z", "finishedAt": "2026-10-05T02:30:41Z",
"exitCode": 0, "lookbackDays": 14,
"targets": [ { "file": "blocks/2026-W40.json", "result": "ok" },
{ "file": "sessions/2026-W40.json", "result": "ok" } ] }
- Timestamps are UTC in the form
YYYY-MM-DDTHH:MM:SSZ. fileis the path relative to the data directory.resultisok,frozen,abortedorfailed.frozencounts as a success.lookbackDaysis mandatory for theweeklyjob and forbidden for all others. The dashboard reads the threshold for the gap warning from it.
The dashboard reports a status file of the wrong shape and treats it as missing.
bin/ and logs/
In the Token Usage Dashboard data directory, bin/ holds the copies of the export scripts that the jobs call. logs/ holds one log per run, see Export chain.