About this project
Toki is a local-first macOS menu bar application for tracking token usage, costs, and active work time across AI coding agents. It reads each supported tool's local usage store and presents the data in six focused views: Overview (daily totals), Projects, Models, Sources, Time (work time analysis), and Hourly usage.
Key features include:
- Token breakdown by input, output, cache read/write, reasoning tokens, and estimated cost
- Project and session attribution with expandable lists when logs provide context
- Per-model token totals and cost estimates with proportional token-share bars
- Work time metrics: direct main-agent time, delegated subagent time, wall-clock overlap, and parallel multiplier
- Local security audit scanning for API keys, access tokens, cloud credentials, JWTs, and private keys
- Optional end-to-end encrypted remote sync via a ciphertext-only hub, supporting Linux/Ubuntu agents without exposing raw data
- CSV/JSON exports from the Sources view
Supported agents include Claude Code, Codex, Hermes, Cursor, Gemini CLI, GJC, Factory Droid, Amp, Senpi, Pi, Oh My Pi, Kimchi, OpenCode, OpenClaw, Copilot CLI, Kimi CLI, Kimi Code, Qwen CLI, and Grok CLI. Each agent connects via local file readers with no account login or remote service required.
Toki prioritizes privacy: local usage stays on-device, remote sync uploads only encrypted usage snapshots (not prompts, responses, paths, or audit findings), and unknown-priced models remain visible as unpriced rows rather than being silently omitted. Cost estimates use curated bundled prices first, falling back to LiteLLM's public catalog.
The app is built in Swift 5.9.2 with SwiftUI and Charts, requires macOS 13.0+, and is licensed under MIT. Remote sync components (Agent and Hub) are optional and available for Linux as well.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.