Русская версия | Español | 简体中文 | हिन्दी
Compact WinUI 3 desktop app for Windows that tracks Codex/Codex App costs per chat and shows estimated usage costs in near real time.
- Monitors
~/.codex/sessionsand~/.codex/archived_sessions - Pulls pricing data from the official OpenRouter Models API
- Estimates per-conversation and total spend from token usage records
- Refreshes automatically when session files change
- Lets you manually refresh chats and prices from the UI
- Windows 10 version 1809 or newer
- .NET 9 SDK for local builds
- Internet access for OpenRouter pricing sync
Run the published app:
powershell -ExecutionPolicy Bypass -File .\Start-CodexSpendPopout.ps1Force a fresh publish before launch:
powershell -ExecutionPolicy Bypass -File .\Start-CodexSpendPopout.ps1 -BuildBuild the project:
dotnet build .\CodexSpendMonitor\CodexSpendMonitor.csprojPublish a self-contained executable:
dotnet publish .\CodexSpendMonitor\CodexSpendMonitor.csproj -c Release -o .\dist\CodexSpendMonitorFor a runnable local dist/ folder, prefer the launcher script because it also syncs required WinUI generated resources into the publish output:
powershell -ExecutionPolicy Bypass -File .\Start-CodexSpendPopout.ps1 -BuildCodexSpendMonitor/- WinUI 3 application sourceStart-CodexSpendPopout.ps1- convenience launcher for local publish + rundist/- generated publish output, ignored by Gitdumps/and*.log- local diagnostics, ignored by Git
The app reads session .jsonl files and combines:
input_tokenscached_input_tokensoutput_tokensreasoning_output_tokens
with pricing returned by:
If a session model cannot be matched to an OpenRouter price entry, the chat is still shown in the UI but the price is marked as unmatched.
By default the app watches:
~/.codex/sessions~/.codex/archived_sessions
If Codex stores sessions somewhere else on a specific machine, you can override the discovery path with environment variables:
CODEX_HOME- treated as the parent folder that containssessions/andarchived_sessions/CODEX_SESSIONS_DIR- explicit path to the live sessions folderCODEX_ARCHIVED_SESSIONS_DIR- explicit path to the archived sessions folder