# codex-tool **Repository Path**: Avilia/codex-to ## Basic Information - **Project Name**: codex-tool - **Description**: No description available - **Primary Language**: Unknown - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2026-07-21 - **Last Updated**: 2026-07-21 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Codex Balance Widget A small Windows PowerShell/WinForms tray widget that shows the remaining API balance in the Windows notification area. The widget reads: - `CODEX_HOME\config.toml` for the OpenAI-compatible provider `base_url` - `CODEX_HOME\auth.json` for `OPENAI_API_KEY` It queries: - `/v1/usage` Only the remaining balance number is displayed. Secrets are not copied into this repository. ## Run ```powershell wscript.exe D:\D\codex\balance-widget\launch-balance-widget-watcher.vbs ``` The watcher runs without a console window. It starts the tray widget only while the local Codex desktop app is running, and both the watcher and tray widget are single-instance guarded so repeated launches do not create duplicate icons. The tray widget only refreshes the balance API while the local Codex desktop app is running and a local Codex task appears active, or when Refresh now is clicked manually. When Codex is idle, the tray icon stays black and keeps showing the most recent cached balance number. When Codex exits, the tray widget exits after a short grace period; the watcher remains hidden and waits for the next Codex launch. The tray icon renders a compact integer balance number as a high-contrast rounded rectangle with white text. It is black while idle and deep red while a local Codex task appears active. Activity is checked every 5 seconds; balance refreshes are throttled to 60 seconds. Hover it to see the full two-decimal balance. Right-click it for refresh/open/quit actions. ## Install At Startup ```powershell pwsh -NoProfile -ExecutionPolicy Bypass -File D:\D\codex\balance-widget\install-startup.ps1 ``` The startup entry launches the hidden watcher, not the tray widget directly. ## Uninstall Startup Entry ```powershell pwsh -NoProfile -ExecutionPolicy Bypass -File D:\D\codex\balance-widget\uninstall-startup.ps1 ```