OpenTokenMonitor is a lightweight, local-first desktop widget for tracking AI CLI usage across Claude, Codex, and Gemini. It helps developers monitor activity, usage trends, and costs in real time through a clean desktop interface, with optional live API data and a privacy-first local setup.
Rust
22
73 commits
updated Oct 7, 2026
Live usage limits, exact per-project costs, and time-to-limit alerts for Claude Code, Codex, and Antigravity — read from your own machine, never a SaaS dashboard.
Download · What it does · Features · How it works · Privacy · FAQ
30 seconds of v0.4.1 on macOS, running on real usage.
You run more than one coding agent. Each has its own quota window, its own reset timer and its own pricing page, and none of them tells you you're about to hit the wall until you do. OpenToken Monitor watches all of them from your menu bar.
Here is what the demo above walks through:
When the window is closed, the app keeps working in the background: the rings stay current and alerts fire before a window fills or a budget overruns.
claude, codex or Antigravity as usual; OpenToken Monitor finds their logs and credentials on its own.
📊 Live limits
|
⏱️ Time-to-limit forecast
|
💸 Exact costs
|
🔔 Alerts that respect you
|
🧭 Compare
|
📤 Export
|
flowchart TB
subgraph SRC["💻 Your machine"]
direction LR
CL["~/.claude/projects<br/>session logs"]
CX["~/.codex/sessions"]
AG["Antigravity logs"]
end
subgraph LIVE["🌐 Live limits (optional)"]
direction LR
AN["Anthropic usage API<br/>(your CLI's OAuth token)"]
OA["ChatGPT / Codex usage"]
LS["Antigravity language server<br/>(127.0.0.1)"]
end
subgraph CORE["🦀 Rust core"]
direction TB
TRG["Poll scheduler<br/>+ file watchers"]
SCN["Incremental log scanners"]
PRV["Provider adapters"]
AGG["Aggregator"]
DB[("SQLite<br/>snapshots · history · costs")]
FC["Limit forecast"]
SES["Session & project usage"]
HOOK["Post-refresh hook"]
ALR["Alert engine"]
end
subgraph UI["⚛️ React UI"]
direction LR
STO["Zustand stores"]
VIEWS["Overview · Detail · Projects<br/>Compare · Widget · Settings"]
end
subgraph DESK["🖥️ Desktop"]
direction LR
BAR["Menu-bar ring badges"]
NOTE["Notifications"]
end
SRC --> SCN --> PRV
LIVE --> PRV
TRG --> AGG
PRV --> AGG --> DB
DB --> FC
SCN --> SES
AGG --> HOOK
HOOK --> BAR
HOOK --> ALR --> NOTE
FC --> ALR
DB -- "Tauri commands" --> STO
SES -- "Tauri commands" --> STO
HOOK -- "usage-updated event" --> STO
STO --> VIEWS
pricing.rs.Full module map and data flow → ARCHITECTURE.md
| Provider | Live limits | Local history | Windows |
|---|---|---|---|
| Claude Code | Anthropic usage API via the Claude CLI's OAuth token | ~/.claude/projects/**/*.jsonl | 5-hour, 7-day, Opus weekly, extra credits |
| Codex | ChatGPT usage via the Codex CLI's credentials (bearer → cookie → codex RPC) | ~/.codex/sessions/**/*.jsonl | Session, weekly |
| Antigravity | Local Antigravity language server on 127.0.0.1 | Antigravity log directory | 5-hour, daily request cap |
When a live fetch fails, the last good snapshot stays on screen marked stale, and the provider falls back to local logs.
Each provider's logo sits inside its usage rings — outer ring: primary window (Claude 5-hour), inner ring: secondary window (Claude 7-day). Click a ring to open that provider.
![]() Overview every provider at a glance | ![]() Provider detail windows, resets, forecast, cost | ![]() Compare spend share and burn side by side |
![]() Sessions exact cost per CLI session | ![]() Settings theme, refresh, alerts, budgets, menu bar | ![]() Widget mode always-on-top gauges |
![]() Projects spend by working directory across Claude and Codex | ![]() Menu-bar badges logo + usage rings | |
Grab the installer for your OS from GitHub Releases:
Then just sign in to the CLIs you already use (claude, codex, Antigravity). OpenToken Monitor finds their logs and credentials on its own — there is nothing to configure.
The macOS builds are not notarized by Apple yet, so the first launch is blocked with "cannot verify the developer" (or "is damaged" on newer macOS). Either open System Settings → Privacy & Security and click Open Anyway, or run:
xattr -dr com.apple.quarantine /Applications/OpenTokenMonitor.app
You only need to do this once per install.
If SmartScreen shows "Windows protected your PC", click More info → Run anyway. This appears while a new signing certificate builds download reputation with Microsoft. The installer is per-user and does not ask for administrator rights.
Prerequisites: Node.js 18+, Rust stable, and the Tauri 2 dependencies for your OS.
git clone https://github.com/Hitheshkaranth/OpenTokenMonitor.git
cd OpenTokenMonitor
npm install
npm run tauri dev # run with hot reload
npm run tauri build # production build for this platform
npm run tauri:build:win # Windows NSIS installer
npm run tauri:build:mac # macOS app bundle + installer
| Action | How |
|---|---|
| Open a provider | Click its ring in the menu bar, or press 1 / 2 / 3 |
| Projects & sessions | 4 |
| Back to overview | Esc |
| Refresh everything | ⌘/Ctrl + R |
| Settings | ⌘/Ctrl + , |
| Show / hide, refresh, quit | Right-click the menu-bar item |
Menu-bar modes (Settings → Menu bar): Usage % shows the ring badges, Today's cost adds today's spend beside them, Off keeps the plain app icon.
claude and codex already keep them; requests go straight from your machine to the provider.api.anthropic.com, chatgpt.com and auth.openai.com (plus GitHub Releases if you enable the updater). Antigravity is read from a server on 127.0.0.1. The webview's Content Security Policy enforces the same list.usage.db from the app-data folder (%APPDATA%\com.opentokenmonitor.desktop\ on Windows, ~/Library/Application Support/com.opentokenmonitor.desktop/ on macOS).They are API list-price equivalents: what the same tokens would cost on the pay-as-you-go API, including cache discounts and cache-write surcharges. On a Pro/Max/Plus subscription you pay a flat fee, so treat the number as the value you're getting. Rates live in one file, pricing.rs, with a review date at the top.
Claude Code deletes session logs older than 30 days by default. Daily totals are kept in OpenToken Monitor's own database, but older spend can no longer be split by project. The Projects header says so when your period is longer than 30 days.
macOS hides the left-most status items when the menu bar is full — on MacBooks, behind the notch. Hold ⌘ and drag the OpenToken Monitor item further right, or remove a few other items.
A least-squares fit of the window's utilization over the last 30 minutes of the current reset cycle (at least 3 samples spanning 5 minutes). The pill only appears when the projected time to 100 % is shorter than the time to reset.
Yes — dashboard, widget, alerts and exports all work. On Windows each provider gets its own ring badge in the taskbar, next to the clock and battery; the app moves them out of the hidden-icons flyout on first launch (if you hide one yourself, that choice is kept). Tray titles are a macOS feature, so Today's cost in the tray is macOS-only.
| Family | Tier | Input / output per 1M tokens |
|---|---|---|
| Claude | Fable / Mythos 5.x | $10.00 / $50.00 |
| Claude | Opus 4.5 · 4.6 · 4.7 · 4.8 · 5 | $5.00 / $25.00 |
| Claude | Opus 4 · 4.1 (legacy) | $15.00 / $75.00 |
| Claude | Sonnet 5 | $2.00 / $10.00 |
| Claude | Sonnet 4 · 4.5 · 4.6 | $3.00 / $15.00 |
| Claude | Haiku 4.5 | $1.00 / $5.00 |
| OpenAI | GPT-6 | $10.00 / $50.00 |
| OpenAI | GPT-5.5 · 5.5 Pro | $5.00 / $30.00 · $30.00 / $180.00 |
| OpenAI | GPT-5.2 · 5.3-codex | $1.75 / $14.00 |
| OpenAI | GPT-5 · 5.1 | $1.25 / $10.00 |
| OpenAI | GPT-5 mini / nano | $0.25 / $2.00 · $0.05 / $0.40 |
| OpenAI | o3 / o4-mini | $2.00 / $8.00 · $1.10 / $4.40 |
| Antigravity | 3.x Pro | $2.00 / $12.00 |
| Antigravity | 3.6–3.8 Flash | $0.75 / $3.75 |
| Antigravity | 2.5 Pro / Flash / Flash-Lite | $1.25 / $10.00 · $0.30 / $2.50 · $0.10 / $0.40 |
Antigravity's 3.6–3.8 Flash input rate is promotional and doubles on 2027-01-01.
Rust — Tauri 2 · Tokio · Reqwest (rustls) · Rusqlite (bundled SQLite) · Notify · image TypeScript — React 19 · Zustand · Recharts · Framer Motion · Lucide · Vite 7
Have an idea? Open an issue.
UsageProvider trait in src-tauri/src/providers/<name>/ and register it in registry.rs.src-tauri/src/pricing.rs and bump the review date at the top.cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings -A unused-mut
cargo test --manifest-path src-tauri/Cargo.toml
npm run build
Released under the MIT License.
Built for developers who use more than one AI agent. OpenToken Monitor is not affiliated with Anthropic, OpenAI, or Google.
107 followers · starred Mar 2026
OpenTokenMonitor is a lightweight, local-first desktop widget for tracking AI CLI usage across Claude, Codex, and Gemini. It helps developers monitor activity, usage trends, and costs in real time through a clean desktop interface, with optional live API data and a privacy-first local setup.
Rust
22
73 commits
updated Oct 7, 2026
Live usage limits, exact per-project costs, and time-to-limit alerts for Claude Code, Codex, and Antigravity — read from your own machine, never a SaaS dashboard.
Download · What it does · Features · How it works · Privacy · FAQ
30 seconds of v0.4.1 on macOS, running on real usage.
You run more than one coding agent. Each has its own quota window, its own reset timer and its own pricing page, and none of them tells you you're about to hit the wall until you do. OpenToken Monitor watches all of them from your menu bar.
Here is what the demo above walks through:
When the window is closed, the app keeps working in the background: the rings stay current and alerts fire before a window fills or a budget overruns.
claude, codex or Antigravity as usual; OpenToken Monitor finds their logs and credentials on its own.
📊 Live limits
|
⏱️ Time-to-limit forecast
|
💸 Exact costs
|
🔔 Alerts that respect you
|
🧭 Compare
|
📤 Export
|
flowchart TB
subgraph SRC["💻 Your machine"]
direction LR
CL["~/.claude/projects<br/>session logs"]
CX["~/.codex/sessions"]
AG["Antigravity logs"]
end
subgraph LIVE["🌐 Live limits (optional)"]
direction LR
AN["Anthropic usage API<br/>(your CLI's OAuth token)"]
OA["ChatGPT / Codex usage"]
LS["Antigravity language server<br/>(127.0.0.1)"]
end
subgraph CORE["🦀 Rust core"]
direction TB
TRG["Poll scheduler<br/>+ file watchers"]
SCN["Incremental log scanners"]
PRV["Provider adapters"]
AGG["Aggregator"]
DB[("SQLite<br/>snapshots · history · costs")]
FC["Limit forecast"]
SES["Session & project usage"]
HOOK["Post-refresh hook"]
ALR["Alert engine"]
end
subgraph UI["⚛️ React UI"]
direction LR
STO["Zustand stores"]
VIEWS["Overview · Detail · Projects<br/>Compare · Widget · Settings"]
end
subgraph DESK["🖥️ Desktop"]
direction LR
BAR["Menu-bar ring badges"]
NOTE["Notifications"]
end
SRC --> SCN --> PRV
LIVE --> PRV
TRG --> AGG
PRV --> AGG --> DB
DB --> FC
SCN --> SES
AGG --> HOOK
HOOK --> BAR
HOOK --> ALR --> NOTE
FC --> ALR
DB -- "Tauri commands" --> STO
SES -- "Tauri commands" --> STO
HOOK -- "usage-updated event" --> STO
STO --> VIEWS
pricing.rs.Full module map and data flow → ARCHITECTURE.md
| Provider | Live limits | Local history | Windows |
|---|---|---|---|
| Claude Code | Anthropic usage API via the Claude CLI's OAuth token | ~/.claude/projects/**/*.jsonl | 5-hour, 7-day, Opus weekly, extra credits |
| Codex | ChatGPT usage via the Codex CLI's credentials (bearer → cookie → codex RPC) | ~/.codex/sessions/**/*.jsonl | Session, weekly |
| Antigravity | Local Antigravity language server on 127.0.0.1 | Antigravity log directory | 5-hour, daily request cap |
When a live fetch fails, the last good snapshot stays on screen marked stale, and the provider falls back to local logs.
Each provider's logo sits inside its usage rings — outer ring: primary window (Claude 5-hour), inner ring: secondary window (Claude 7-day). Click a ring to open that provider.
![]() Overview every provider at a glance | ![]() Provider detail windows, resets, forecast, cost | ![]() Compare spend share and burn side by side |
![]() Sessions exact cost per CLI session | ![]() Settings theme, refresh, alerts, budgets, menu bar | ![]() Widget mode always-on-top gauges |
![]() Projects spend by working directory across Claude and Codex | ![]() Menu-bar badges logo + usage rings | |
Grab the installer for your OS from GitHub Releases:
Then just sign in to the CLIs you already use (claude, codex, Antigravity). OpenToken Monitor finds their logs and credentials on its own — there is nothing to configure.
The macOS builds are not notarized by Apple yet, so the first launch is blocked with "cannot verify the developer" (or "is damaged" on newer macOS). Either open System Settings → Privacy & Security and click Open Anyway, or run:
xattr -dr com.apple.quarantine /Applications/OpenTokenMonitor.app
You only need to do this once per install.
If SmartScreen shows "Windows protected your PC", click More info → Run anyway. This appears while a new signing certificate builds download reputation with Microsoft. The installer is per-user and does not ask for administrator rights.
Prerequisites: Node.js 18+, Rust stable, and the Tauri 2 dependencies for your OS.
git clone https://github.com/Hitheshkaranth/OpenTokenMonitor.git
cd OpenTokenMonitor
npm install
npm run tauri dev # run with hot reload
npm run tauri build # production build for this platform
npm run tauri:build:win # Windows NSIS installer
npm run tauri:build:mac # macOS app bundle + installer
| Action | How |
|---|---|
| Open a provider | Click its ring in the menu bar, or press 1 / 2 / 3 |
| Projects & sessions | 4 |
| Back to overview | Esc |
| Refresh everything | ⌘/Ctrl + R |
| Settings | ⌘/Ctrl + , |
| Show / hide, refresh, quit | Right-click the menu-bar item |
Menu-bar modes (Settings → Menu bar): Usage % shows the ring badges, Today's cost adds today's spend beside them, Off keeps the plain app icon.
claude and codex already keep them; requests go straight from your machine to the provider.api.anthropic.com, chatgpt.com and auth.openai.com (plus GitHub Releases if you enable the updater). Antigravity is read from a server on 127.0.0.1. The webview's Content Security Policy enforces the same list.usage.db from the app-data folder (%APPDATA%\com.opentokenmonitor.desktop\ on Windows, ~/Library/Application Support/com.opentokenmonitor.desktop/ on macOS).They are API list-price equivalents: what the same tokens would cost on the pay-as-you-go API, including cache discounts and cache-write surcharges. On a Pro/Max/Plus subscription you pay a flat fee, so treat the number as the value you're getting. Rates live in one file, pricing.rs, with a review date at the top.
Claude Code deletes session logs older than 30 days by default. Daily totals are kept in OpenToken Monitor's own database, but older spend can no longer be split by project. The Projects header says so when your period is longer than 30 days.
macOS hides the left-most status items when the menu bar is full — on MacBooks, behind the notch. Hold ⌘ and drag the OpenToken Monitor item further right, or remove a few other items.
A least-squares fit of the window's utilization over the last 30 minutes of the current reset cycle (at least 3 samples spanning 5 minutes). The pill only appears when the projected time to 100 % is shorter than the time to reset.
Yes — dashboard, widget, alerts and exports all work. On Windows each provider gets its own ring badge in the taskbar, next to the clock and battery; the app moves them out of the hidden-icons flyout on first launch (if you hide one yourself, that choice is kept). Tray titles are a macOS feature, so Today's cost in the tray is macOS-only.
| Family | Tier | Input / output per 1M tokens |
|---|---|---|
| Claude | Fable / Mythos 5.x | $10.00 / $50.00 |
| Claude | Opus 4.5 · 4.6 · 4.7 · 4.8 · 5 | $5.00 / $25.00 |
| Claude | Opus 4 · 4.1 (legacy) | $15.00 / $75.00 |
| Claude | Sonnet 5 | $2.00 / $10.00 |
| Claude | Sonnet 4 · 4.5 · 4.6 | $3.00 / $15.00 |
| Claude | Haiku 4.5 | $1.00 / $5.00 |
| OpenAI | GPT-6 | $10.00 / $50.00 |
| OpenAI | GPT-5.5 · 5.5 Pro | $5.00 / $30.00 · $30.00 / $180.00 |
| OpenAI | GPT-5.2 · 5.3-codex | $1.75 / $14.00 |
| OpenAI | GPT-5 · 5.1 | $1.25 / $10.00 |
| OpenAI | GPT-5 mini / nano | $0.25 / $2.00 · $0.05 / $0.40 |
| OpenAI | o3 / o4-mini | $2.00 / $8.00 · $1.10 / $4.40 |
| Antigravity | 3.x Pro | $2.00 / $12.00 |
| Antigravity | 3.6–3.8 Flash | $0.75 / $3.75 |
| Antigravity | 2.5 Pro / Flash / Flash-Lite | $1.25 / $10.00 · $0.30 / $2.50 · $0.10 / $0.40 |
Antigravity's 3.6–3.8 Flash input rate is promotional and doubles on 2027-01-01.
Rust — Tauri 2 · Tokio · Reqwest (rustls) · Rusqlite (bundled SQLite) · Notify · image TypeScript — React 19 · Zustand · Recharts · Framer Motion · Lucide · Vite 7
Have an idea? Open an issue.
UsageProvider trait in src-tauri/src/providers/<name>/ and register it in registry.rs.src-tauri/src/pricing.rs and bump the review date at the top.cargo fmt --manifest-path src-tauri/Cargo.toml --all -- --check
cargo clippy --manifest-path src-tauri/Cargo.toml --all-targets -- -D warnings -A unused-mut
cargo test --manifest-path src-tauri/Cargo.toml
npm run build
Released under the MIT License.
Built for developers who use more than one AI agent. OpenToken Monitor is not affiliated with Anthropic, OpenAI, or Google.
107 followers · starred Mar 2026