Your AI token usage at a glance.
Download the latest release · All releases · 简体中文
TokPeek turns local AI usage logs into a glanceable macOS menu bar dashboard. See token totals, estimated cost, daily trends, client share, and model rankings without sending session contents to a server.
| Package | Link |
|---|---|
| Latest macOS Universal 2 ZIP — Apple Silicon and Intel | Download from the latest release |
| SHA-256 checksum and release notes | Open the latest release |
| Previous versions | Browse all releases |
Published releases require macOS 14 or later, include native support for Apple Silicon and Intel Macs, and are signed with Developer ID and notarized by Apple.
- Open the latest release
and download the
TokPeek-<version>-macOS-universal.zipasset. - Move
TokPeek.appto the Applications folder. - Open TokPeek and keep its status in the menu bar.
TokPeek checks for signed updates through Sparkle. Updates are never installed without confirmation.
| Native and glanceable | Local by default | Useful breakdowns |
|---|---|---|
A real SwiftUI MenuBarExtra that stays one click away. |
Session discovery, parsing, pricing, and aggregation run on your Mac. | Compare periods, filter by model, and inspect daily, client, and model usage. |
- Two-line menu bar status with estimated cost and token usage
- Alternate menu bar modes for tokens, cost, budget progress, or the app icon
- Today, 7-day, 30-day, 90-day, and all-time reporting
- Model filtering across totals, charts, clients, and rankings
- Token composition, daily usage, client share, and two-column model ranking
- Daily, weekly, or monthly cost and token budgets with month-end forecasting
- Local macOS alerts when budget usage reaches 80% and 100%
- Tooltips for chart values and detailed usage metadata
- Configurable refresh interval and default reporting period
- Optional launch at login through
SMAppService - English and Simplified Chinese localization
- Light and dark appearance, keyboard access, and VoiceOver labels
- Secure in-app updates through Sparkle
SwiftUI menu bar
↓
TokPeekKit models and state
↓
TokPeekBridge (JSON over C ABI)
↓
tokpeek-core-ffi (Rust static library)
↓
tokscale-core
TokPeek currently calls generate_local_graph_report, so Swift does not parse
session files or recalculate usage totals.
- macOS 14 or later
- Xcode 16 or later
- Swift 6
- Current stable Rust toolchain
- Rust targets
aarch64-apple-darwinandx86_64-apple-darwinfor Release
Install both release targets with:
rustup target add aarch64-apple-darwin x86_64-apple-darwinTokPeek includes a shared Xcode project and scheme:
open TokPeek.xcodeprojThe Build Tokscale Core phase invokes Cargo before Swift links the app. Release
builds combine the two Rust archives into a Universal 2 static library. Sparkle
2 is resolved through Swift Package Manager for secure in-app updates.
The checked-in project is generated by scripts/generate-project.rb. Maintainers
with the xcodeproj Ruby gem can regenerate it with:
make projectmake runThe first build takes longer because Cargo compiles Tokscale Core and its dependencies.
Run Rust, Swift Package Manager, and Xcode scheme tests:
make testCreate a hardened, ad-hoc signed application bundle:
make app
open dist/TokPeek.appFor Developer ID signing, supply the identity:
CODE_SIGN_IDENTITY="Developer ID Application: Your Name (TEAMID)" make appThe app target intentionally does not enable App Sandbox because Tokscale Core must discover session files belonging to supported coding tools. Hardened runtime remains enabled for signed builds.
The CI workflow runs the Rust, Swift Package Manager, and Xcode test suites for
pushes to main and pull requests. It also creates and verifies a Universal 2
Release build.
Stable releases are created from semantic version tags:
git tag -a v0.1.0 -m "TokPeek v0.1.0"
git push origin v0.1.0The Release workflow verifies the full test suite, injects the tag version into the app bundle, signs it with Developer ID, submits it for Apple notarization, staples the accepted ticket, and publishes a Universal 2 ZIP, a SHA-256 checksum, and a signed Sparkle appcast to GitHub Releases. Installed builds check that feed daily by default and always ask before installing an update.
Apple and Sparkle signing credentials are supplied only through encrypted GitHub Secrets and are removed from the ephemeral runner after every release. See RELEASING.md for certificate, API key, and secret setup.
The Rust bridge pins Tokscale to commit
45b3b3e4ccf58f9eee4fc4159003f5f884af79b3 (v4.8.1). Upgrades should be
reviewed and tested deliberately because local session formats and report
contracts can change.
TokPeek reads supported AI session data locally through Tokscale Core. The app does not contain analytics or upload session contents.
TokPeek is available under the MIT License. Tokscale Core is also MIT licensed; see THIRD_PARTY_NOTICES.md.
