An always-on-top desktop widget that shows your AI coding usage for Claude, Codex, and Antigravity — at a glance.
AICycle Widget is a tiny, compact, always-on-top panel that unifies usage monitoring across Claude, OpenAI Codex, and Google Antigravity. Each provider can be toggled on/off, every window shows how much you've used plus how long until it refreshes, and clicking a card opens a detail view with plan info and extra usage.
Inspired by OpenTokenMonitor and claude-usage-widget, rebuilt from scratch in Electron (Node only — no Rust toolchain required).
- 📊 Three providers, one widget — Claude, Codex, Antigravity, each independently toggleable.
- 🟢 Usage at a glance — each window (5H / 7D / credits) shows the used % with a matching bar.
- ⏱️ Time-to-refresh first — how much time is left is shown prominently, with the exact reset clock alongside.
- 🔍 Detail view — click any card for plan tier, extra usage / overage ($), credits, and account details.
- 🌐 Auto language — UI follows your OS language (English / Korean); compact labels stay short (
5H,7D). - 🪶 Compact & always-on-top — auto-sizes to its content; lives in the corner without taking over your screen.
- ⚙️ Settings screen — always-on-top, launch-at-startup, 24-hour time, refresh interval, plus refresh / Claude logout / quit (open via the gear icon or the tray).
| Compact | Detail | Settings |
|---|---|---|
![]() |
![]() |
![]() |
Each window shows the used % with a bar, the time until refresh, and the exact reset clock. Click a card for plan tier and extra usage; open the gear (⚙) for settings.
All data is read locally / from the official services you're already signed into — nothing is sent anywhere.
| Provider | Source | Notes |
|---|---|---|
| Claude | claude.ai usage API via a one-time in-app login (sessionKey, persisted as a cookie) |
Shows 5H / 7D % + reset and extra usage (overage / prepaid). Not logged in → just a login button. |
| Codex | chatgpt.com/backend-api/codex/usage using the token in ~/.codex/auth.json |
Fetched through a hidden Chromium window (passes Cloudflare). Shows 5H / weekly % + reset, plan, credits. Falls back to local token counts from ~/.codex/logs_2.sqlite. |
| Antigravity | The Antigravity IDE's local Language Server (loopback, no extra auth) | Live only while the IDE is open; shows prompt/flow credit usage + reset and full plan details. When closed, the last fetched value is cached and shown. |
- Node.js 18+ (build/dev). The runtime bundles Electron 35 (Node 22) for built-in
node:sqlite. - Windows, macOS, and Linux. (Antigravity discovery uses
lsofon macOS/Linux — present by default on macOS, and on most Linux distros.)
npm install
npm run dev # launch the widget (development)
npm run build # production bundle
npm run package # Windows installer (nsis) via electron-builderOn first run, click "Log in to Claude (once)" to connect Claude. Codex works automatically if you're signed into the Codex CLI. For Antigravity, keep the IDE open.
src/
main/ Electron main: window, tray, polling, settings, i18n
collectors/ claude · claude-web · codex · codex-web · antigravity · types
preload/ contextBridge IPC
renderer/ React UI (Widget, DetailView, WindowBar, toggles)
shared/ i18n (shared by main + renderer)
- The Claude OAuth usage endpoint (
api.anthropic.com/oauth/usage) is heavily rate-limited and is not used; the widget uses theclaude.aiweb session instead. - Reading the session straight out of Chrome's encrypted cookie store is intentionally not implemented.
- Antigravity has no live data while its IDE is closed (cached value is shown instead).
- OpenTokenMonitor — multi-provider monitoring approach
- claude-usage-widget — claude.ai session usage approach
MIT

