CodexStatusBar is a native macOS menu bar app for checking Codex usage without opening session files or digging through logs.
The app reads the latest usage snapshots that Codex writes locally under ~/.codex/sessions and shows the current usage windows directly in the menu bar as:
primary - weekly
Examples:
38 - 124 - 1
The first number is the current primary rate-limit window usage percentage. The second number is the current secondary or weekly usage percentage when Codex exposes it.
- Native SwiftUI macOS menu bar app
- Local-only usage reading from
~/.codex/sessions - Compact color-coded menu bar display
- Disabled menu bar label that follows the current macOS light or dark appearance
- Dropdown cards for:
- primary usage window
- weekly or secondary usage window
- reset timing
- current plan label
- Automatic refresh on launch
- Background polling every 4 minutes for up to 60 minutes after activation
- Manual
Reload,Disable, andCheck for Updatesactions - GitHub-release-based updater for installed
.appbundles
CodexStatusBar scans the newest session files in:
~/.codex/sessions
It looks for the most recent token_count event containing rate_limits data, then extracts:
rate_limits.primaryrate_limits.secondaryplan_type
Those values drive the menu bar text and the dropdown breakdown cards.
- macOS 13 or newer
- Xcode or the Swift toolchain
- Codex installed locally
- At least one completed or active Codex session so
~/.codex/sessionsexists
From the project root:
swift run CodexStatusBarBuild the executable:
swift buildRun tests:
swift testBuild the app bundle:
APP_VERSION=0.2.5 ./scripts/build-app.shThis creates:
dist/CodexStatusBar.app
Create the DMG:
VERSION=v0.2.5 ./scripts/create-dmg.shThis creates:
dist/CodexStatusBar-v0.2.5.dmg
If you already built the app bundle:
open dist/CodexStatusBar.appOr drag CodexStatusBar.app into /Applications after building or downloading a release DMG.
The menu bar uses:
X - Y
Where:
X= primary window used percentageY= secondary or weekly window used percentage
The % symbol is intentionally omitted to keep the status item compact.
The dropdown includes:
- plan label from the latest usage snapshot
- one card per available usage window
- percent used
- percent remaining
- reset timing when available
- last refresh time
- app version
- update or parser status messages when relevant
Footer actions:
Reloadrefreshes usage immediatelyCheck for Updateschecks the latest GitHub releaseDisablestops background polling until the menu is opened againQuitexits the app
- CodexUsageProvider.swift Reads and parses Codex session usage snapshots.
- UsageStore.swift Manages refresh state, display values, and update checks.
- MenuContentView.swift Renders the dropdown UI.
- AppDelegate.swift Owns the status item and popover lifecycle.
- AppUpdater.swift Checks GitHub releases and installs newer app bundles when possible.
- The app is only as accurate as the latest Codex session snapshot on disk.
- If no recent
token_countevent has been written yet, the app cannot show usage. - If Codex changes its local JSONL schema, the parser may need to be updated.
- The updater expects GitHub release assets and works best when the app is launched from an installed
.appbundle.
- No browser automation
- No scraping from web pages
- No separate billing API integration
- Local Codex session data is the source of truth
To publish a release manually:
- Build the app bundle.
- Build the DMG.
- Create a GitHub release and attach
dist/CodexStatusBar-vX.Y.Z.dmg.