English | 中文
Stable release:
1.2.01.2.0 update:
- Adds third-party Provider mode for ChatGPT logins, so Codex can stay signed in with the normal ChatGPT account while requests use a saved API account.
- Adds a menu action that changes between Switch to Third-party Provider... and Switch Back to Normal Account based on the current mode.
- Lets you choose the third-party Provider from saved API accounts, then writes the required
base_urland API key intoconfig.tomlsafely.- Protects Provider-mode entry and exit with restore points, rollout provider synchronization, local thread repair, and rollback-safe session history handling.
Codex Quota Viewer is a native macOS menu bar app for people who use Codex and want everything in one place: current quota, saved accounts, safe account switching, and local session management.
You click one menu bar icon and get the jobs that usually require digging
through ~/.codex, editing config files, or opening a terminal. The packaged
app also includes the Session Manager, so end users do not need a separate
CodexMM checkout or a manual Node setup.
- Check the current Codex account and see remaining
5hand1wquota at a glance. - Save multiple ChatGPT and API accounts in a local vault owned by the app.
- Add ChatGPT accounts with the bundled sign-in flow.
- Add OpenAI-compatible API accounts with API key, base URL, and automatic model detection when available.
- Switch between accounts safely with backup, rollback, and local thread repair.
- Open a built-in local Session Manager from the menu bar and manage sessions in the browser.
- Browse active, archived, and trashed sessions, search them, restore them, and batch-operate on them.
- Keep the whole app and the Session Manager in sync with one language setting:
Follow System,English, or中文. - Choose menu bar display style, refresh cadence, and launch-at-login behavior in Settings.
This app is for you if any of these sound familiar:
- You want to know whether your current Codex account still has quota left.
- You switch between multiple Codex identities and do not want to hand-edit
auth.jsonandconfig.toml. - You want to rescue, browse, archive, or repair local Codex sessions without using terminal commands.
- You want a packaged
.app, not a pile of scripts.
- Download the latest DMG from the Releases page.
- Drag
CodexQuotaViewer.appinto/Applications. - Open it. If macOS warns you the app came from the internet, allow it manually.
- Click the new menu bar icon.
- Let the app read your current Codex login from
~/.codex/auth.json. - Open Settings... -> Accounts if you want to add more accounts.
- Use Maintenance -> Open Session Manager if you want to manage old or current sessions.
- Use Switch Safely when you want to activate another saved account.
The menu bar stays focused on the thing you usually want first: "How much quota do I have left right now?"
- Standard Codex logins show
5hand1wwindows. - Weekly-only plans are shown correctly as weekly-only.
- You can switch the menu bar between a compact meter and a text summary.
- You can refresh manually or let the app refresh on a schedule.
- Stale data is marked, so you can tell when the numbers may be out of date.
Codex Quota Viewer has its own local vault for saved accounts.
- Save multiple ChatGPT accounts.
- Save multiple API accounts.
- Rename, activate, forget, and review saved accounts from Settings... -> Accounts.
- Open the vault folder directly from Settings if you need to inspect local files.
- Keep the top menu compact while still showing all saved accounts under All Accounts.
- Older compatible local account data can be imported one time when available.
- The menu can still prioritize the most useful accounts first, while the full grouped list remains available under All Accounts.
This is one of the core features of the app.
When you use Switch Safely, the app can:
- close Codex first
- create a restore point
- apply the target
auth.json - merge and write the target
config.toml - rewrite rollout
model_providermetadata when needed - repair local official thread state
- reopen Codex after the switch
If something looks wrong, you can use Maintenance -> Rollback Last Change to restore the most recent switch backup.
Restore points live here:
~/Library/Application Support/CodexQuotaViewer/SwitchBackups/
Open Maintenance -> Open Session Manager and the app launches a local web
console on 127.0.0.1:4318.
You can use it to:
- browse sessions grouped by project folder
- filter by
Active,Archived, andTrash - search by title, path, and excerpts
- inspect summary cards, timestamps, line counts, event counts, and tool calls
- read the full session timeline
- restore a session to a Codex-visible place
- choose
Resume onlyorRebind cwdwhen restoring - archive, trash, restore, and purge sessions
- batch-select multiple sessions and operate on them together
- repair official local thread metadata when the local state drifts
The Session Manager is bundled inside the app. End users do not need to install CodexMM or Node separately.
The Maintenance section gives you the actions you are most likely to need when things drift:
- Refresh All
- Open Session Manager
- Repair Now
- Rollback Last Change
The native app UI and the bundled Session Manager share the same language setting.
Follow SystemEnglish中文
You only change it once in Settings... -> General -> Language.
The current version includes these practical controls:
- refresh interval
- launch at login
- menu bar display style
- language
- account management
- Open the app.
- Look at the menu bar summary or open the menu.
- If the data looks stale, click Refresh All.
- Open Settings... -> Accounts.
- Choose Sign in with ChatGPT or Add API Account.
- Save the account.
- Select it from the menu when you want to use it.
- Pick the target account from the top account rows or All Accounts.
- Click Switch Safely.
- Let the app finish backup, config update, repair, and relaunch.
- Use Rollback Last Change if you want to undo the switch.
- Open Maintenance -> Open Session Manager.
- Find the project and session.
- Choose
Resume onlyif you just want Codex to recognize the session again. - Choose
Rebind cwdif you want the session to point to a different project folder.
This app is designed for local desktop use.
- The app reads local Codex files that already exist on your machine.
- If you add an API account, the API credential is stored locally in the app's own account vault.
- The Session Manager serves only on
127.0.0.1. - Session files stay on your machine.
Common local paths used by the app:
~/.codex/auth.json~/.codex/config.toml~/.codex/sessions/**/*.jsonl~/.codex/archived_sessions/**/*.jsonl~/Library/Application Support/CodexQuotaViewer/Accounts/**/*~/Library/Application Support/CodexQuotaViewer/SwitchBackups/**/*
The screenshots in this repository are privacy-safe examples.
- macOS 13 or later
- A local Codex installation:
Codex.appin/Applications, or acodexexecutable available inPATH - A signed-in Codex profile in
~/.codex/auth.json
If you want the full packaged app:
./scripts/build-app.shOutput:
dist/CodexQuotaViewer.app
If you only want the native executable:
swift build -c release --product CodexQuotaViewerIf you want the project verification suite:
./scripts/verify-all.shMake sure either Codex.app exists in /Applications or codex is available
in your shell PATH.
Your local Codex login is missing, expired, or invalid. Sign in again and make
sure ~/.codex/auth.json is present.
The local Codex runtime did not return quota data in time. Try Refresh All again. If it keeps failing, confirm Codex itself is working on this machine.
Rebuild the packaged app:
./scripts/build-app.shThen open the packaged app under dist/, not only the raw Swift executable.
Another process is already using port 4318. If it is an existing session
manager instance, the app can reuse it. If it is unrelated, stop that process
and try again.
The app bundle contains:
- the native Swift menu bar app
- the bundled Session Manager app files
- a private Node runtime used by the bundled Session Manager
That means the packaged .app is the product you distribute. End users do not
need a second checkout of the web session manager.
Thank you to the LinuxDo community for your support.