A lightweight Tauri desktop app for viewing local Codex token usage, session trends, and rate limit windows in real time.
Current release targets: Windows and macOS.
Codex Token Viewer reads local Codex session logs from ~/.codex/sessions/*.jsonl and turns them into a small desktop dashboard.
It shows:
- Current session token totals
- Last response token usage
- 5-hour and weekly rate-limit windows
- 24-hour and 7-day trend views
- Context window size
- Tray minimize / restore behavior
- Login autostart and edge snapping
- Privacy mode for hiding local log paths
OpenAI's public API usage endpoints are designed for organization billing and API usage, not local Codex desktop session analytics.
This app focuses on local Codex usage reconstruction by reading session log files already available on your machine.
- Tauri v2
- Rust
- Vanilla HTML / CSS / JavaScript
- Node.js 20+
- Rust toolchain with
cargo - Windows: Microsoft Visual Studio C++ Build Tools
- macOS: Xcode Command Line Tools
npm install
npm run devnpm run buildBuilt desktop artifacts are generated under:
src-tauri/target/release/bundle/msisrc-tauri/target/release/bundle/nsissrc-tauri/target/release/bundle/dmgsrc-tauri/target/release/bundle/macos
This repository includes two GitHub Actions workflows:
CI: runs tests and verifies the app builds on pushes and pull requestsRelease: builds Windows and macOS bundles and uploads them to GitHub Releases when you push a version tag likev1.0.0
Example release flow:
git tag v1.0.0
git push origin main
git push origin v1.0.0After the tag is pushed, GitHub Actions will build the Windows and macOS installers and attach them to a new Release.
- Windows release artifacts are generated as
.msiandsetup.exe - macOS release artifacts are generated as
.dmgand.app - macOS signing and notarization are not configured yet, so Gatekeeper warnings may still appear on first launch
The app:
- Resolves the Codex sessions directory
- Recursively scans
.jsonlfiles - Extracts
token_countevents - Builds the latest token snapshot and trend series
- Renders the result in the desktop UI
Default log location:
~/.codex/sessions
You can also override the log directory from the settings panel in the app.
This project reads local session logs from your machine. It does not call the public OpenAI organization usage API to populate the dashboard.
If you plan to share screenshots, use the built-in privacy toggle to hide local file paths.
This project is intended to be a small open source utility for Codex users. Issues, fixes, and UX improvements are welcome.
Please read CONTRIBUTING.md before opening a pull request.



