QuotaBar is a macOS menu bar app that helps you track Codex quota usage from the menu bar and move selected Codex threads between devices, without juggling multiple terminals, browser sessions, or shared local state.
It is a good fit if you want:
- a status bar app instead of a full desktop window
- multiple Codex accounts under one app
- isolated account storage without touching the default
~/.codex - quick visibility into the current 5-hour and weekly remaining quota
- a simple way to carry selected Codex threads and session state between machines
QuotaBar currently supports:
- multiple Codex accounts for a single provider
- browser-based
codex loginin an isolated temporaryCODEX_HOME - manual
auth.jsonimport - secure auth blob storage in Keychain
- per-account metadata storage in SwiftData
- menu bar monitoring panel
- manual refresh
- background refresh every 30 minutes
- single-session backup export/import for continuing work across devices
The monitoring panel shows:
- account email
- plan tag
- 5-hour remaining quota
- weekly remaining quota
- short reset timestamps
- account health state
QuotaBar keeps account auth isolated from the default ~/.codex , but the backup tools can read your real Codex session data when you explicitly use the backup flow.
Each account is handled like this:
- Login runs in an app-managed isolated
CODEX_HOME - The resulting
auth.jsonis stored in Keychain - Non-sensitive account metadata is stored in SwiftData
- Refresh extracts a bearer token from the stored auth blob
- Usage is fetched from:
https://chatgpt.com/backend-api/wham/usage
QuotaBar maps that response into:
- 5h remaining
- weekly remaining
- reset times
- plan type
The backup flow is separate from account monitoring:
- You choose one or more visible Codex threads to export
- QuotaBar reads the matching thread metadata and rollout files from your real
~/.codex - It writes a compressed backup archive
- On another machine, you choose that archive and remap each project to a local workspace before import
Sensitive data:
- full
auth.jsonper account - stored in macOS Keychain
Non-sensitive data:
- display name
- remote account id
- plan type
- enabled/disabled state
- sync timestamps
- stored in SwiftData
Backup-related data:
- exported archives are written only to the folder you choose
- session import/export reads thread metadata from
~/.codex/state_5.sqlite - session import/export reads and writes rollout files under
~/.codex/sessionsand~/.codex/archived_sessions - backup does not copy account auth, Keychain items, or unrelated sessions
- macOS
- Xcode 16+
- an installed
codexCLI available to the app
Open the project in Xcode:
open QuotaBar.xcodeprojOr build from Terminal:
xcodebuild \
-project QuotaBar.xcodeproj \
-scheme QuotaBar \
-configuration Debug \
CODE_SIGNING_ALLOWED=NO \
CODE_SIGNING_REQUIRED=NO \
buildQuotaBar is intended for Developer ID direct distribution, not Mac App Store distribution.
That means:
- the app stays
unsandboxed - it can continue to access the user-installed
codexCLI - distribution should use
Developer ID Applicationsigning plus notarization
Before releasing:
- keep
ENABLE_APP_SANDBOX = NO - keep
LSUIElement = YES - make sure the release machine has a valid
Developer ID Applicationcertificate
Recommended release flow:
- Archive, sign, notarize, and export
QuotaBar.appmanually from Xcode - Put the exported app at
dist/QuotaBar.app - Run:
scripts/build-dmg.shThe DMG script only packages an existing exported app. It does not archive, sign, or notarize for you.
If the exported app is elsewhere:
scripts/build-dmg.sh --app /path/to/QuotaBar.appQuotaBar includes an in-app backup flow for the common case where you start a Codex thread on one machine and want to continue it on another machine without syncing your entire ~/.codex directory or account state.
This solves:
- moving a single active thread between home and work machines
- exporting only the projects and threads you care about
- remapping imported threads onto a different local checkout path on another device
- avoiding accidental sync of auth files, unrelated sessions, or global Codex config
In-app workflow:
- Open
Settings -> Backup - Set an
Export Folder - Choose
Select Threads To Export - Pick one or more threads grouped by workspace
- Export them into one compressed
.ziparchive - Move that archive to the target machine
- On the target machine, open
Settings -> Backup - Choose the backup
.zip - For each detected project, select the destination local workspace
- Import the backup
Important behavior:
- the export list tries to match the Codex app sidebar, not every row in the SQLite database
- archived threads are excluded
- only threads with a user-facing indexed title are shown
- opening the export dialog refreshes the thread list from
~/.codex - import rewrites each thread's workspace path to the folder you choose for that project
Use this flow when your code is already synced by Git and you only need the Codex conversation/session state.
This repo includes two helper scripts for moving a single Codex session between devices without syncing the entire ~/.codex directory.
Scripts:
/Users/aidan/dev/apps/QuotaBar/scripts/codex_session_export.py/Users/aidan/dev/apps/QuotaBar/scripts/codex_session_import.py
The scripts do not assume a default sync directory. Pass an explicit export directory so the app or your shell scripts can decide whether to use iCloud Drive, a local folder, a mounted volume, or a VPS staging path.
Export the most recently updated session:
./scripts/codex_session_export.py --output-dir "/path/to/session-bundles"Export a specific session id to a custom directory:
./scripts/codex_session_export.py 019cfc28-8892-7840-a6d1-8d614da18358 --output-dir /tmp/codex-bundlesImport a bundle on another machine:
./scripts/codex_session_import.py "/path/to/bundle"If the repo lives at a different path on the target machine, pass --cwd :
./scripts/codex_session_import.py "/path/to/bundle" --cwd /path/to/QuotaBarThese scripts move only the selected session's rollout JSONL and thread metadata. They do not sync auth, global settings, or unrelated sessions. Close Codex before export/import to avoid SQLite WAL state drifting during the copy.
- This is not an official OpenAI product.
- The usage endpoint and auth format are not stable public APIs and may change.
- API-key-only auth is not supported for quota monitoring. A ChatGPT/Codex bearer token is required.
- Direct distribution is the supported release model for this project today.
QuotaBar is built to minimize account cross-contamination:
- it does not reuse the default
~/.codex - each account is stored independently
- refresh uses the account’s own stored auth blob
Current scope is intentionally narrow:
- one provider: Codex
- one menu bar monitor
- multi-account support first
More providers can be added later behind the same account/service model.
MIT. See LICENSE.


