Tokens is a free, open-source menu bar app that shows how many tokens Claude Code and Codex use, what that would cost at API prices, and how much your subscriptions are really worth. It all runs locally.
Sample data. The real popover uses Liquid Glass and SwiftUI Charts.
Tokens reads the logs your agents already write. It's ready the moment it launches and updates about a second after an agent writes.
Tokens and API-equivalent cost for today, 7 days, 30 days or all time. Hourly, daily and weekly charts, a per-agent breakdown, top models and insights.
Monthly totals, a 20-week activity heatmap, and each month's value compared with what your plans cost.
Your subscriptions' value multiple, the day each one breaks even, effective cost per 1M tokens, and live Codex 5-hour and weekly limit gauges.
Terminal, desktop app, SDK or IDE. Each gets its own line in the breakdown.
| Agent | Read from |
|---|---|
| Claude Code terminal, desktop app, Agent SDK | ~/.claude/projectsrespects CLAUDE_CONFIG_DIR |
| Codex desktop app, CLI, IDE extension | ~/.codex/sessions, archived_sessionsrespects CODEX_HOME |
Tokens only keeps token counts, model names and timestamps. It never stores prompt or response text, and it has no network code at all.
network requests, accounts, trackers and dependencies
from an agent writing a log line to the menu bar updating, via FSEvents
Logs are append-only, so after the first scan only new bytes are parsed
Build from source in about a minute. Requires macOS 26+ and Xcode 26+.
git clone https://github.com/Felix-Bergmann-Code/tokens.git
cd tokens
./scripts/build.sh --install # builds, copies to ~/Applications and launches
Pull requests are very welcome. Updating a model price in Pricing.swift takes five minutes and helps everyone. Support for Gemini CLI, Cursor, Aider or OpenCode would be even better.