A native Windows system-tray app that shows your OpenAI Codex and Claude usage limits at a glance.
The Windows alternative to CodexBar — same idea (live OpenAI Codex + Claude rate-limit windows in your menu bar), built from scratch for Windows users who want the same experience without WSL, browser-cookie scraping, or admin tricks.
CodexBar for Windows — Inspired by steipete/CodexBar on macOS. This is a Windows-specific Electron implementation, rebuilt from scratch to avoid WSL, browser-cookie scraping, and admin requirements.
- OpenAI Codex — live 5h / 7d window utilization, plan, account email
- Claude — live 5h / 7d / Sonnet / Opus utilization, plan tier, account email
Hover the tray icon, and the panel slides up. No clicks, no extra windows.
Three ways:
winget install gehariharan.TokenWatcher(Available once the winget submission is merged.)
Get it from Microsoft (coming soon — see submission notes)
- Grab
TokenWatcher-Setup-x.y.z.exefrom the Releases page - Run it (Windows SmartScreen will warn — click More info → Run anyway; it's unsigned but open-source)
- Pin the tray icon: click the
^near the clock and drag the TokenWatcher icon onto the taskbar
Click the gear icon ⚙ in the panel header to:
- Toggle Watch OpenAI Codex — disable if you don't use Codex
- Toggle Watch Claude — disable to skip the Edge sign-in flow entirely
Settings live at %APPDATA%\TokenWatcher\settings.json.
TokenWatcher checks for new versions on launch and every 6 hours while running. When a new version is published to GitHub Releases:
- The newer installer is downloaded silently in the background (only changed bytes via
electron-builderblockmap — typically a few MB instead of the full 86 MB) - A teal Update banner appears at the top of the panel showing the new version + a one-line release-note summary (full notes on hover)
- Click the banner or the Restart & install button to apply, or it applies automatically on next launch
No need to re-download from GitHub or run winget upgrade — installed users get every release automatically.
- Codex — reads the OpenAI Codex CLI's OAuth token from
~/.codex/auth.jsonand calls the same private endpoint the CLI uses (chatgpt.com/backend-api/wham/usage). No additional sign-in needed if you already use thecodexCLI. - Claude — a one-time sign-in launches Microsoft Edge against
claude.ai/loginwith a dedicated user-data-dir. After you sign in, TokenWatcher reads thesessionKeycookie via Edge's DevTools Protocol, encrypts it with Windows DPAPI, and stores it locally. Live usage data is then fetched directly fromclaude.ai's usage API.
| Component | Purpose |
|---|---|
| Electron shell | System tray, side-panel BrowserWindow, IPC routing |
| Pure Node Codex provider | Reads ~/.codex/auth.json + HTTPS GET to chatgpt.com |
| Python sidecar Claude provider | Edge CDP login flow + DPAPI session storage + curl_cffi (defeats Cloudflare's TLS fingerprinting) |
claude.ai sits behind Cloudflare with TLS / JA3 fingerprinting. Plain Node fetch (and Python requests) get blocked with "Just a moment…". Python's curl_cffi impersonates Chrome's TLS handshake and gets through cleanly. The sidecar is shipped as a single PyInstaller .exe inside the installer — users never see Python.
- TokenWatcher only ever talks to
chatgpt.comandclaude.ai. No third-party servers, no telemetry. - The Claude sign-in launches Edge with a dedicated profile directory (
~/.tokenwatcher/edge-profile/) — your normal Edge profile is never touched. - The captured
sessionKeycookie is encrypted with Windows DPAPI before being written to disk. Only your Windows user account can decrypt it. - Source code is open and auditable.
- Windows 10 / 11
- Node.js 18+
- Python 3.10+ (for the Claude sidecar; not needed at runtime — only at build time)
- Microsoft Edge (preinstalled on Windows)
git clone git@github.com:gehariharan/Tokenwatcher.git
cd Tokenwatcher
# Install Electron + dev deps
npm install
# Set up the Python venv for the sidecar
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r sidecar\requirements.txt
# Run in dev mode
npm startIn dev mode the app spawns the sidecar via the venv's Python — no need to compile it. To exit, right-click the tray icon → Quit.
# Bundle the Python sidecar into resources/claude_fetch.exe
.\build-sidecar.bat
# Build the NSIS installer (output: dist/TokenWatcher Setup x.y.z.exe)
npm run buildIf you change the source assets/icon-source.png, regenerate the multi-resolution outputs:
.\.venv\Scripts\python.exe scripts\gen-icons.pyPush a tag — the GitHub Actions release workflow builds the sidecar with PyInstaller, builds the NSIS installer, and uploads it to a draft GitHub Release automatically:
git tag v0.1.0
git push origin v0.1.0TokenWatcher/
├── src/
│ ├── main.js # Electron main: tray, panel, IPC
│ ├── preload.js # Context bridge
│ └── renderer/ # Side-panel UI (HTML/CSS/JS)
├── src-node/
│ ├── codex.js # Pure-Node Codex provider
│ ├── claude.js # Sidecar invoker
│ └── settings.js # Settings persistence
├── sidecar/
│ └── claude_fetch.py # Self-contained: Edge CDP + DPAPI + curl_cffi
├── assets/ # Icons (PNG / ICO)
├── scripts/
│ └── gen-icons.py # Regenerate icons from source PNG
└── .github/workflows/
└── release.yml # Tag push → installer release
- steipete/CodexBar — the macOS original
- openai/codex — the Codex CLI itself
- anthropics/claude-code — Claude Code CLI
CodexBar for Windows · CodexBar Windows alternative · Codex usage tracker · Claude usage tracker · OpenAI rate limit monitor · ChatGPT rate limit · Claude rate limit · system tray usage monitor · Windows menu-bar app for Codex · Codex 5h window · Claude 5h window