Monitor your Claude API usage from the Windows system tray and desktop. Two components: a system tray app (C#/.NET) and a desktop companion (Tauri/React) — a deformable blob that lives on your screen and changes color based on usage.
System tray icon showing current usage percentage with popup details.
- Three icon styles (cycle via right-click menu): circle outline, rectangle fill bar, outside-in fill
- Left-click popup with per-section breakdowns (Current session, All models, Sonnet only, etc.)
- Per-section progress bars, reset times, and last-updated timestamp
- Auto-refreshes every 60 seconds
- Single-instance guard
A soft-body deformable blob that floats on your desktop as a transparent overlay. It walks along window edges, jiggles, and can be dragged around like jelly.
- Soft-body physics — 14-node spring-mass pressure blob with Verlet integration. Squishy, bouncy, and deformable.
- Jelly drag — grab the blob and it deforms elastically around your cursor. Release and it snaps back with wobble.
- Window awareness — detects visible windows via Win32 API (DWM extended frame bounds, DWMWA_CLOAKED filtering). The blob walks along window edges and collides with them.
- GlazeWM compatible — correctly filters windows on inactive workspaces using DWMWA_CLOAKED.
- Usage coloring — blob color shifts from green → yellow → orange → red based on usage percentage. Inner color = current session, outer rim = weekly usage.
- Click-through — transparent overlay that passes mouse events through except when hovering the blob itself.
- Speech bubble — click the blob to see a usage breakdown popup.
- Windows 10/11
- Claude Code CLI — run
claude authto set up OAuth credentials
dotnet run --project ClaudeUsageTray -c ReleaseThe tray icon appears in the notification area (click the ^ arrow if hidden).
- Hover — tooltip with plan name, usage %, and reset time
- Left-click — popup with detailed per-section usage breakdown
- Right-click → Refresh — manually trigger a usage fetch
- Right-click → Icon: ... — cycle between icon styles (Circle, Rectangle, Fill)
- Right-click → Exit — close the app
cd companion
bun install # or npm install
bunx tauri dev # dev mode with hot-reloadTo build a release:
cd companion
bunx tauri buildThe built executable will be in companion/src-tauri/target/release/.
Publish the tray app as a self-contained exe:
dotnet publish ClaudeUsageTray -c Release -r win-x64 --self-contained -o publishCreate a startup shortcut (PowerShell):
$exePath = Resolve-Path ".\publish\ClaudeUsageTray.exe"
$ws = New-Object -ComObject WScript.Shell
$s = $ws.CreateShortcut("$env:APPDATA\Microsoft\Windows\Start Menu\Programs\Startup\ClaudeUsageTray.lnk")
$s.TargetPath = "$exePath"
$s.WorkingDirectory = Split-Path "$exePath"
$s.Save()To remove from startup, delete the shortcut from %APPDATA%\Microsoft\Windows\Start Menu\Programs\Startup\.
Both components read OAuth credentials from ~/.claude/.credentials.json (created by claude auth) and call the Anthropic usage API.
- Tray App — displays results as a tray icon with popup details. Auto-refreshes every 60 seconds.
- Companion — renders a soft-body blob on a transparent fullscreen overlay using Canvas 2D. The blob's color reflects usage levels. Physics runs at ~60fps with spring-mass constraints, pressure simulation, and gravity. Window positions are polled via Win32
EnumWindows+DwmGetWindowAttributefor accurate collision boundaries.
If your credentials expire, the tray will show "Error" and the companion blob will show stale data. Run claude auth to refresh your OAuth credentials.
companion/
├── src/ # React + TypeScript frontend
│ ├── App.tsx # Main component, animation loop, mouse handlers
│ ├── canvas/
│ │ ├── physics.ts # Verlet soft-body simulation (springs, pressure, walls)
│ │ ├── renderer.ts # Canvas 2D drawing (triangulated mesh, usage gradients)
│ │ └── hitTest.ts # Point-in-polygon for click detection
│ └── hooks/
│ ├── useUsage.ts # Polls usage API
│ ├── useActiveWindow.ts # Polls visible window rects via Tauri command
│ └── useClickThrough.ts # Manages WS_EX_TRANSPARENT toggle
├── src-tauri/ # Rust backend (Tauri 2)
│ └── src/
│ ├── lib.rs # App setup, window flags (WS_EX_TOOLWINDOW, transparent)
│ └── commands/
│ ├── usage.rs # OAuth token refresh + usage API proxy
│ ├── windows.rs # Win32 EnumWindows, DWM bounds, virtual desktop filtering
│ ├── cursor.rs # Raw cursor position for click-through
│ └── hittest.rs # Server-side hit test (unused, kept for reference)