Skip to content
All open-source projects
Token Meter app icon

Token Meter

Open source · Apache-2.0

See what your AI coding actually costs.

Token Meter reads your local Claude Code, Codex and Ollama logs and shows what that usage would cost at API prices — then compares it with what you actually pay. Free, open source, and everything stays on your Mac.

Apache-2.0SwiftmacOSSwiftUISwiftDataSwift ChartsWidgetKit

Version 2.0.0 · 1.7 MB · macOS 14.0 or later · Free

Universal — Apple Silicon and Intel

Signed with a Developer ID and notarized by Apple — it opens without a Gatekeeper warning.

Verify this download

Run this in Terminal after the download finishes. It prints OK if the file is byte-for-byte the one we published, and FAILED if it isn't — in which case don't open it.

cd ~/Downloads
echo "37304c3152c413b7721522d5605c9ee831b50c8c495303fa686af070dda888cc  TokenMeter-2.0.0.dmg" | shasum -a 256 -c

SHA-256

37304c3152c413b7721522d5605c9ee831b50c8c495303fa686af070dda888cc

Or build it from source

Token Meter's Overview window on macOS, showing today's estimated tokens and cost, a Plan value panel reading $2,300.69 of usage on a $20.00 plan at 115× return, and a Prompt caching panel with a 99% cache hit rate.

Example

$1,038 of usage on a $20 plan

52× return on what you pay

An illustration, not a promise — your own number depends entirely on how much you use. And it is an estimate of API list prices, not a bill: on a subscription you pay the subscription price.

What it does

Everything in Token Meter.

01

Plan value

Tell it what you pay and it reframes your usage as return on the subscription, instead of a scary invoice.

02

Budget alerts

Set ceilings for the 5-hour block, the day, the week or the billing period. macOS notifications at 50%, 80% and 100% — each fires once per window, so a long session never spams you.

03

Live in the menu bar

Today's tokens, today's estimated cost, block progress or your plan multiple, visible without opening anything.

04

Prompt-cache analysis

In agentic coding, cache reads are usually most of the bill. See your hit rate and what caching is actually doing to the estimate.

05

Per-branch and per-agent costs

Break usage down by git branch, session, subagent and skill — not just by model. It answers “what did this feature cost?”

06

History and charts

Tokens and estimated cost over time, per model and per project, from a local database.

07

Export

CSV or JSON for any period, including per-event estimated cost and attribution.

08

Local models too

Ollama token counts and throughput, tracked separately — models running on your own Mac are free.

Also in the app: a desktop widget, a floating always-on-top readout, launch at login, and per-model pricing you can edit yourself.

Screens

See it running.

Token Meter's menu-bar popover, showing today's tokens and estimated cost, an input/output/cache split, the 5-hour block, this week's tokens, and the current period's plan multiple.
Live in the menu bar
Token Meter's desktop widget, showing today's tokens and estimated cost with an “estimated” badge.
Desktop widget and floating readout
Token Meter's History window, showing a month of token usage as a stacked bar chart by model, summary tiles for total, input, output, cache, messages and estimated cost, and a per-model breakdown.
History and charts

Read this first

It shows estimates, and says so.

Token Meter cannot show your real subscription quota. Anthropic and OpenAI do not publish the 5-hour or weekly limits through any API. Every number is reconstructed from log files already on your Mac and labelled estimated throughout, including the 5-hour block view.

What the cost number actually is

The cost figure is the API list-price equivalent of your tokens — what they would have cost on pay-as-you-go billing. It is not a bill, and it is not money you are owed. On a subscription you pay the subscription price, whatever this number says.

  • Claude Code logs

    ~/.claude/projects/**/*.jsonl

    Estimated

    Parsed on your machine, no network. The logs are known to under-report token counts, sometimes significantly.

  • Codex CLI logs

    ~/.codex/sessions

    Estimated

    Parsed on your machine, no network. Same under-reporting caveat as Claude Code.

  • Ollama (local models)

    127.0.0.1

    Measured

    Real token counts from the local endpoint — and no cost to estimate, because the model runs on your Mac.

Usage from the Claude or ChatGPT web and desktop apps leaves no local trace, so it is invisible to this tool. The 5-hour block is Claude Code only, so Codex usage never inflates it. Billing-grade connectors to the provider usage APIs are planned, not shipped.

Install

Two ways to run it.

Take the notarized build, or build it yourself from source. Both end up in the same place.

01

Download and drag

Open the disk image and drag Token Meter into your Applications folder. That's the whole install — the build is signed with a Developer ID and notarized by Apple, so it opens straight away.

02

Grant Full Disk Access

The CLI logs live under your home folder and macOS gates access to them, so reading them needs Full Disk Access in System Settings → Privacy & Security. The app detects the missing permission and walks you through granting it.

03

Or build from source

Needs macOS 14 and Xcode 16 or later. A source build is signed ad-hoc, which is fine locally — macOS may just re-confirm file access between launches.

git clone https://github.com/unichat-dev/token-meter.git
cd token-meter
make bootstrap
make build

Latest release

TokenMeter-2.0.0.dmg

macOS · Universal — Apple Silicon and Intel

Download for macOS1.7 MB
Version
2.0.0
Size
1.7 MB
Requires
macOS 14.0 or later
Released
Aug 17, 2026

Signed and notarized by Apple

Verify what you downloaded

Run this in Terminal after the download finishes. It prints OK if the file is byte-for-byte the one we published, and FAILED if it isn't — in which case don't open it.

cd ~/Downloads
echo "37304c3152c413b7721522d5605c9ee831b50c8c495303fa686af070dda888cc  TokenMeter-2.0.0.dmg" | shasum -a 256 -c

SHA-256

37304c3152c413b7721522d5605c9ee831b50c8c495303fa686af070dda888cc

The same build is served from both places, so this digest matches either copy.

Direct download from unichat.dev

GitHub is the canonical copy — the link above — so downloads are counted in one place. This mirror is the identical build, for when GitHub isn't reachable.

What's new

New in Token Meter 2.0.0.

Version 2.0 answers a question 1.x couldn't: whether the subscription is worth it.

  • NewPlan value — your usage shown as return on what you pay.
  • NewBudget alerts at 50%, 80% and 100%, delivered as macOS notifications.
  • NewPrompt-cache hit rate, and what caching does to the estimate.
  • NewCost broken down by git branch, session, subagent and skill.
  • NewCSV and JSON export for any period.
  • NewA live readout in the menu bar.
  • NewLaunch at login, and in-app update checks.
  • FixedMore accurate cost — 1-hour cache writes and server-side web search are now billed correctly.
  • ImprovedMuch faster: a warm start on a large log archive went from around 34 seconds to around 2.
  • ImprovedSettings reorganised into a sidebar.

Privacy

Nothing leaves your Mac.

Log parsing is on-device, history lives in a local database, and nothing about your usage is ever transmitted. No account, no telemetry, no analytics.

All of it stays local

Parsing happens on-device and history lives in a local database under ~/Library/Application Support/TokenMeter.

Three network calls, all yours

A daily model-pricing refresh, an update check against GitHub, and your own local Ollama endpoint if you use it. Nothing about your usage travels with any of them.

Why it asks for Full Disk Access

Claude Code and Codex write their logs under your home folder, and macOS gates that whole area behind Full Disk Access. It is the only way to read them — the app reads those log files and nothing else.

No keys, no telemetry

This release holds no API keys at all. When connectors land, keys will live in the macOS Keychain only — never the database, defaults, or logs.

Source

Read it, fork it, ship it.

The whole thing is on GitHub under Apache-2.0. Issues and pull requests are welcome — students on our teams review them alongside everyone else.

github.com/unichat-dev/token-meter

Open the repository

Build with us

Want to build the next one?

Open an issue, send a pull request, or join the studio and ship something of your own — with your name on the commits.