TokenMeter is a local-first macOS app for viewing Codex and Claude Code token usage from local log files.
By default, it does not send prompts, code, messages, or token records to any server. GitHub network calls are used only for update checks and update downloads. If Sync Folder is enabled, TokenMeter writes sanitized usage records to the folder the user chooses.
- Main macOS dashboard app with Dock and Cmd+Tab support.
- Dashboard sections: All, Codex, Claude Code.
- Time ranges: 30 minutes, 1/3/6/8/12/24 hours, today, yesterday, 7 days, 30 days, 3/6/12 months, and all history.
- Token views: 1/5/10/20/30 minutes, hourly, daily, weekly, and monthly.
- Breakdowns by app, token kind, model, project, and session.
- Local parsing for:
~/.codex/sessions/**/*.jsonl~/.codex/archived_sessions/*.jsonl~/.claude/projects/**/*.jsonl
- Optional Sync Folder support for combining multiple Macs through iCloud Drive, Dropbox, Syncthing, or any folder that syncs between devices.
- GitHub Release update check, one-click update install, and relaunch.
- Simple dark macOS UI with colored usage charts.
TokenMeter can combine usage from multiple Macs without copying the original Codex or Claude Code logs.
- Open TokenMeter on each Mac.
- In
Sync Folder, choose the same synced folder.Use iCloud DrivecreatesiCloud Drive/TokenMeterwhen iCloud Drive is available. - Each Mac writes one sanitized file under
devices/. - Every Mac reads all device files and shows the same
All Devicestotal after the folder finishes syncing.
The sync file contains token counts, timestamps, source, model, device id, and hashed project/session keys. It does not contain prompts, responses, code, raw project paths, or raw log file paths.
The dashboard includes a device filter:
All Devices: merged usage from every device file in the Sync Folder.This Mac: only the current Mac.- Other device names: one synced Mac at a time.
The first time a Sync Folder is selected, TokenMeter runs a full local scan to seed that Mac's ledger. Later refreshes merge newly scanned events into the existing device file.
swift run TokenMeterSelfTest
./scripts/package.shThe packaged app, ZIP, and PKG installer are written to dist/.
open dist/TokenMeter.appThe package script applies free ad-hoc signing, but it does not use a paid Apple Developer certificate. If macOS warns because the app is unsigned, review the source or build it locally before allowing the app to open.
For the normal install flow, download the latest PKG:
https://github.com/kmg0308/token-scope/releases/latest/download/TokenMeter.pkg
Open the installer, then launch TokenMeter from /Applications.
To install from a local build instead:
cp -R dist/TokenMeter.app /Applications/
open /Applications/TokenMeter.app- Open the README on the target Mac.
- Press
Download for macOS. - Open the downloaded PKG. It installs
TokenMeter.appinto/Applications. - Launch
TokenMeter. - Future updates appear inside the app when a newer GitHub Release exists.
The ZIP is still useful for GitHub Release updates inside TokenMeter.
TokenMeter has an update sheet inside the app and a compact update banner on the dashboard.
- Updates use the fixed
kmg0308/token-scopeGitHub Releases source. - TokenMeter checks the latest GitHub Release when the app opens and then every 6 hours while it is running.
- If the latest Release version is newer than the installed app, the dashboard shows an update banner.
- Press
Update Nowto download the Release ZIP, replace the current app, and relaunch. - The app updater uses the Release asset named
TokenMeter.zip. Source ZIP files cannot be installed inside the app.
The workflow at .github/workflows/release.yml builds and publishes release assets whenever main receives a push.
push to main
-> GitHub Actions builds TokenMeter.app
-> creates TokenMeter.zip, TokenMeter.pkg, and versioned copies
-> publishes a GitHub Release
-> installed apps detect the new Release
The workflow uses GitHub's GITHUB_TOKEN and does not require a paid Apple Developer account. On private repositories, GitHub Actions may count against your GitHub plan quota.
For fully automatic app replacement, Sparkle is the standard macOS updater, but it requires release signing setup. This project avoids paid accounts and external services by default.
TokenMeter reads token fields and metadata such as model, project path, session id, and timestamps. It does not store or display prompt or response text.
When Sync Folder is enabled, TokenMeter writes only sanitized usage records to the chosen folder. Raw project paths and session ids are hashed before export. The original ~/.codex and ~/.claude JSONL files stay local.
- macOS 13 or later.
- Swift 6 toolchain for building from source.