A macOS menu bar app that tracks Codex CLI usage across multiple OpenAI accounts.
The Codex CLI has two rate limits: a rolling 5-hour window and a weekly window. When you hit either one, requests start failing. If you juggle multiple OpenAI accounts, it's hard to know at a glance which one still has quota left.
Codex Accounts shows the lowest remaining percentage across all your accounts directly in the menu bar. Click the icon to open a popover with a card for each account. Each card has both usage meters with time-to-reset countdowns, credit balance if your plan has one, and the plan type.
The app watches ~/.codex/auth.json. When you run codex auth to switch accounts, it picks up the new account automatically. Tokens refresh in the background before they expire.
- macOS 15 or later
- Codex CLI installed:
npm i -g @openai/codex - At least one account authenticated via
codex auth
- Clone this repo
- Open
CodexAccounts/CodexAccounts.xcodeprojin Xcode 26 or later - In the Signing & Capabilities tab, set your Apple Developer team
- Build and run
No third-party dependencies.
This repo is configured to build and attach a .dmg automatically in two ways:
- Every push to
mainupdates a rolling pre-release tag namedlatestwithCodexAccounts-latest.dmg - Every published GitHub Release uploads a versioned DMG like
CodexAccounts-v1.0.0.dmg
- Push this repo (including
.github/workflows/release-dmg.ymlandscripts/build-dmg.sh) to GitHub. - In GitHub, open Settings → Actions → General and keep workflow permissions set to allow read/write for contents (or leave default and rely on workflow-level
contents: write).
- Push a tag (example:
v1.0.0):
git tag v1.0.0
git push origin v1.0.0- In GitHub, create and publish a Release from that tag.
- The workflow runs on macOS, builds the app, creates
CodexAccounts-v1.0.0.dmg, and uploads it to that Release.
After you push to main, Actions updates the latest pre-release automatically.
Download from:
https://github.com/<your-username>/<your-repo>/releases/tag/latest
Look for CodexAccounts-latest.dmg.
If you have GitHub CLI installed and authenticated, you can publish in one command:
./scripts/publish-release.sh v1.0.0This will:
- Create/push the git tag
- Create/publish the GitHub Release
- Trigger Actions to build+attach the DMG automatically
If you want to attach a locally built DMG immediately (in addition to CI), use:
./scripts/publish-release.sh v1.0.0 --attach-nowYou can also build a DMG locally with:
./scripts/build-dmg.sh v1.0.0Output is written to dist/.
The app detects your current account from ~/.codex/auth.json on launch. To add another, click "Add Account" in the popover, then in a terminal run:
codex logout
codex auth
The app watches the auth file and adds the new account automatically.
The only network requests are to chatgpt.com/backend-api/wham/usage to fetch usage numbers and auth.openai.com/oauth/token to refresh tokens when they expire. No analytics, no telemetry.
Account data (including tokens) is stored locally in ~/Library/Application Support/CodexAccounts/accounts.json. Nothing else leaves your machine.
MIT