Claude Code usage analytics, built from your own logs

A one-off report tells you about this month. Analytics tells you where it is heading: which model is driving spend, whether this week is heavier than last, and whether your plan still pays for itself. MyTokenTracker builds that from the usage logs Claude Code already writes.

What the dashboard tracks

Daily spend

Every day by agent and model, with input, output and cache tokens, priced at API list rates.

Trends

This week against last week and this month against last month, so a jump shows up before the month ends.

Cost by model

Which models carried the spend over the last 30 days. Usually the answer to "why was this month expensive".

Plan value receipt

Your Claude plan price against API-equivalent usage for 7, 30 or 90 days, with a card you can share.

Budgets and a weekly email

Set a weekly budget and see spend against it. A Monday summary arrives by email, with an unsubscribe link in every one.

Prices that stay current

Model prices refresh daily. When a price moves, it is logged on the price changes page.

Getting the data in

npx mytokentracker init

Paste the API token from your account at the hidden prompt. The CLI uploads your existing history, then syncs every 30 minutes on macOS and Linux. On Windows, run npx mytokentracker sync whenever you want fresh numbers.

Claude Code deletes local transcripts after 30 days by default (Claude Code docs). Synced daily totals are kept in your account, so trends can reach further back than the logs on disk.

Not only Claude Code

The same dashboard picks up Codex, GitHub Copilot CLI, Antigravity, OpenCode, Amp and other agents found on the machine. Your own apps can report usage through the events API or the Python and Node wrappers.

Frequently asked questions

Where does the usage data come from?

From the usage logs Claude Code and other coding agents already keep on your machine. npx mytokentracker reads them, and after npx mytokentracker init the CLI syncs daily totals per agent and model to your account every 30 minutes on macOS and Linux.

What does the dashboard show?

Spend by day, agent and model at API list prices, this week against last week, this month against last month, cost by model over 30 days, plan cost against API-equivalent cost day by day, and a monthly plan-value receipt.

Can I set a budget?

Yes. Set a weekly budget in Settings and the dashboard shows your spend against it. The weekly email also summarises the week, and every email has an unsubscribe link.

How do I know if model prices changed?

Model prices are refreshed daily, and the price changes page lists every change we detect. Each model page shows its current per-token rates.

Does it upload my prompts or code?

No. The CLI uploads daily token totals and cost per agent and model. Prompts, responses, code, file names and paths never leave your machine.

Can I see usage from more than one machine?

Yes. Run npx mytokentracker init on each machine with the same account token. Each machine syncs separately and the dashboard shows the combined total.

Related