Claude Token Monitor πŸš€ β€” Real-Time Claude Usage HUD for Your Windows Desktop

Published: (June 6, 2026 at 01:55 PM EDT)
4 min read
Source: Dev.to

Source: Dev.to

Kiell Tampubolon

Claude Token Monitor πŸš€

⚠️ Disclaimer: This is an unofficial community-driven tool and is not affiliated, associated, endorsed by, or in any way officially connected with Anthropic, PBC.

Ever wonder how much of your Claude quota you’ve burned through mid-session? Claude Token Monitor is a local-first desktop utility that gives you a beautiful, always-on-top floating HUD showing your Claude usage in real time β€” covering both Claude.ai Web App quota and Claude Code CLI token consumption.

πŸ”— GitHub Repository: github.com/glatinone/claude-token-monitor-usage

πŸ“Έ What It Looks Like

The HUD uses a sleek glassmorphism design with a circular progress ring that dynamically changes color:

  • 🟒 Green β€” Low usage

  • 🟑 Amber β€” Medium usage

  • πŸ”΄ Red β€” High usage (time to slow down!)

You can drag it anywhere on your screen, collapse it into a tiny title pill with a double-click, and control it via the system tray.

✨ Key Features

Double-Sync Strategy:

Standalone Mode β€” Direct API polling using your saved sessionKey cookie

Browser Extension Sync β€” A companion Chrome Extension pushes live stats the moment you send a message on claude.ai

Always-on-Top Floating HUD β€” Circular progress ring, remaining quota %, and reset timer

Draggable & Position Memory β€” Drag it wherever you want; position is saved on exit

Claude Code CLI Integration β€” Real-time token parsing (Input, Output, Cache Write, Cache Read) with USD cost estimation based on Claude Sonnet pricing

Single-Instance Protection β€” TCP socket lock prevents duplicate processes or tray icon spam

100% Private & Offline-First β€” All data lives in usage_data.json on your machine. The local server binds only to 127.0.0.1

πŸ› οΈ Architecture

Here’s how the pieces fit together:

Web Browser (claude.ai)
  └── Chrome Extension MV3
        └── POST JSON ──────────────────────┐
                                            β–Ό
Terminal / IDE                     Desktop App (Python)
  └── Claude Code CLI               β”œβ”€β”€ Local HTTP Server :9988
        └── Writes logs ──►         β”œβ”€β”€ Log Watcher
              ~/.claude/projects/   β”œβ”€β”€ Direct API Fetcher
              *.jsonl               β”œβ”€β”€ Storage Manager
                                    β”œβ”€β”€ CTk Floating HUD
                                    └── Tray Manager
Enter fullscreen mode


Exit fullscreen mode

Log Watcher β€” Monitors %USERPROFILE%\.claude\projects\*.jsonl for CLI token events

Local HTTP Server (port 9988) β€” Receives pushed JSON payloads from the Chrome Extension

Direct Fetcher β€” Polls the Claude API directly using your sessionKey cookie when the extension isn’t running

πŸš€ Installation & Setup

Prerequisites

  • Python 3.10+

  • Windows OS

    1. Install the Desktop App
git clone https://github.com/glatinone/claude-token-monitor-usage.git
cd claude-token-monitor-usage
pip install -r requirements.txt
python -m app.main
Enter fullscreen mode


Exit fullscreen mode

Windows users can just double-click run.bat to install dependencies and launch in one step.

  1. Standalone Mode (Session Key Setup)

To let the app query your quota directly without the extension:

Press F12 β†’ Application β†’ Cookies β†’ https://claude.ai

  • Copy the value of the sessionKey cookie (starts with sk-ant-sid...)

Right-click the C tray icon β†’ Setup Session Key

  • Paste and click OK β€” the widget syncs automatically!

    1. Chrome Extension (Optional but Recommended)

Open chrome://extensions

Enable Developer Mode

  • Click Load Unpacked β†’ select the extension/ folder

  • Open claude.ai and send a message β€” your quota syncs instantly!

    πŸ”’ Security & Privacy

Zero Cloud Sharing β€” Usage data stays strictly in app/usage_data.json on your local disk

Localhost Lock β€” The API server binds to 127.0.0.1 only; no LAN access

Credential Isolation β€” The Chrome Extension never touches your sessionKey. It’s stored locally in app/config.json (git-ignored)

🀝 Contributing

Contributions are very welcome! Whether it’s Linux/macOS support, UI improvements, or better CLI log parsing:

  • Fork the repo

Create your branch: git checkout -b feature/AmazingFeature

Commit: git commit -m 'Add AmazingFeature'

Push: git push origin feature/AmazingFeature

  • Open a Pull Request

    πŸ“„ License

MIT License β€” free to use, modify, and distribute.

πŸ”— Check out the full project on GitHub: github.com/glatinone/claude-token-monitor-usage

If you find it useful, drop a ⭐ on the repo and share it with fellow Claude power users!

0 views
Back to Blog

Related posts

Read more Β»

Mobile Midsommer Madness

!Cover image for Mobile Midsommer Madnesshttps://media2.dev.to/dynamic/image/width=1000,height=420,fit=cover,gravity=auto,format=auto/https%3A%2F%2Fdev-to-uploa...