A native Win32/C++ desktop widget for Windows that shows your Codex usage budget at a glance.
The widget reads usage limits from the current Codex account and displays them in a draggable, resizable desktop panel. It helps you monitor:
5-hour quotaused and remainingWeekly quotaused and remainingExpected usagefor the current point in the cycleActual usageAhead of paceorbehind paceTime until resetLast successful refreshTime until the next automatic refresh
- Native
Win32 + Direct2D + DirectWrite + WinHTTP - No
C#, noWebView - Reads
%USERPROFILE%\.codex\auth.jsonor%CODEX_HOME%\auth.json - Requests
GET https://chatgpt.com/backend-api/wham/usage - Three display modes:
- Standard mode: hero status, four metrics, weekly pace bar, budget marker, footer details, refresh time, and countdown
- Simple mode: compact
5h leftandWeek leftcards with remaining percentages and status text - Taskbar mode: a smaller remaining-quota strip that snaps near the current monitor's taskbar edge and stays docked there
- Desktop overlay widget with drag and resize support
- Dynamic coloring based on current pace
- Launch at startup toggle
- Always-on-top toggle
- Lock-position toggle
- Display mode switch for full, simple, and taskbar layouts
- UI language switch between English and Chinese
- Remote usage API refresh: every
60seconds - Local countdown repaint: every
1second - Bottom-right area shows:
- last successful refresh time
- countdown to the next automatic refresh
- Right-click menu
Refresh now: force refresh immediately
- Drag the widget body to move it
- Drag the right edge, bottom edge, or bottom-right corner to resize it
- Taskbar mode stays docked and does not support dragging or resizing
- Right-click menu:
Refresh nowLaunch at startupAlways on topLock positionDisplay modeLanguageReset widget positionExit
Position and size are stored in:
%APPDATA%\CodexUsageBar\settings.ini
Startup registration uses the current user registry key:
HKCU\Software\Microsoft\Windows\CurrentVersion\Run
build.cmdOutput:
CodexUsageBar.exe
cmake -S . -B build -G "Visual Studio 17 2022" -A x64
cmake --build build --config ReleaseThe repository includes automated build and release workflows.
- Platforms:
x64ARM64
- Triggers:
- push to
main/master pull_requestworkflow_dispatch
- push to
- Trigger:
- push a version tag such as
v0.1.0
- push a version tag such as
- Behavior:
- build
x64andARM64 - create a GitHub Release automatically
- upload:
CodexUsageBar-x64.exeCodexUsageBar-ARM64.exe
- build
git tag v0.1.0
git push origin master
git push origin v0.1.0If the default branch is main, replace master with main.
- It currently relies on the existing
access_tokeninauth.json; automatic refresh viarefresh_tokenis not implemented - If the OpenAI backend response changes, the parser must be updated accordingly
- This is a desktop overlay widget, not the legacy Windows Gadget platform

