Skip to content

About

A tiny Codex usage percentage monitor for the macOS menu bar.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

CodexBarSimple

English | 简体中文

A tiny macOS menu bar utility that keeps your remaining Codex usage visible at a glance. No window to open, no dashboard to check—just the percentage in the menu bar.

Liquid Glass states in light and dark appearances

One-command install

Requirements: an Apple Silicon Mac running macOS 14 or later, with the Codex CLI installed and signed in.

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/nonbutAworker/CodexBarSimple/main/install.sh)"

The installer:

  • downloads the Apple Silicon package from the latest GitHub Release and verifies its SHA-256 checksum;
  • installs the app to ~/Applications/CodexBarSimple.app;
  • removes quarantine only from this app—it does not disable Gatekeeper system-wide;
  • registers a per-user LaunchAgent and starts the app immediately;
  • requires neither administrator privileges nor an Apple Developer account.

CodexBarSimple does not currently have a Developer ID signature or Apple notarization. macOS may therefore refuse to launch a downloaded .app directly. Use the open-source installer above, or inspect install.sh before running it. The checksum protects against a corrupted download; it is not a substitute for Developer ID publisher verification.

For a manual installation, download the DMG from Releases, mount it, and run this command in Terminal:

/bin/zsh "/Volumes/CodexBarSimple Installer/Install CodexBarSimple.command"

Features

  • Keeps the remaining Codex percentage and a vertical usage bar permanently visible, with no text labels.
  • Uses native, frosted Liquid Glass on macOS 26+, with a system translucent material on earlier versions. Both light and dark styles follow the system appearance automatically, including changes while the app is running, instead of inheriting a wallpaper-dependent menu bar style or drawing an opaque black card.
  • Gives the percentage a glass-inspired gradient and subtle edge highlights, keeping its original font size and semantic red, gold, and green tones. This is a typography treatment, not a second native glass surface.
  • Refreshes immediately at launch and then once every minute.
  • Checks Codex Resets at launch and every 10 minutes. An orange border means a regular quota reset has been explicitly announced and is awaiting execution: use your remaining quota soon.
  • Shows a small TRAE bell beside the percentage for a confirmed upcoming reset. It swings for the first minute, then stays still until the announcement ends. Repeated checks of the same announcement do not restart it.
  • Sends a native macOS notification for a confirmed upcoming reset, once per announcement even across app restarts. Allow notifications when macOS asks; the menu bar continues working if permission is denied. When the announcement supplies a valid scheduled time, the notification includes its full date and 24-hour time in your Mac's local time zone. Missing or invalid times keep the existing time-free reminder.
  • When the normal Codex quota is exhausted, switches to Luna Reserve with a moon icon, gold percentage, and usage bar; normal quota remains the priority whenever it is above 0%.
  • Turns both the number and usage bar red below 10% remaining.
  • When an observed quota jumps from below 100% back to 100%, briefly enlarges the number and turns it green.
  • Ignores left clicks; the right-click menu contains only Quit.
  • Has no Dock icon, settings window, account manager, analytics, or telemetry.

How it works and privacy

CodexBarSimple follows the read-only Codex CLI approach used by CodexBar:

  1. Locate the Codex CLI installed on the Mac.
  2. Start codex -s read-only -a never app-server.
  3. Call account/rateLimits/read over local JSON RPC.
  4. Calculate the remaining percentage from usedPercent; when the normal window is exhausted, use the base_model_inference Luna Reserve window and render it in an NSStatusItem.

CLI discovery supports standalone installations and the CLI bundled with current and legacy ChatGPT/Codex desktop apps, including when the login service has only the standard macOS PATH. Local macOS logs record usage refresh results and failures to help diagnose an unavailable display.

The app does not read or modify ~/.codex/auth.json, access the macOS Keychain, or send usage data to a third party. Authentication and token management remain entirely under the Codex CLI.

The reset reminder independently reads the public https://codex-resets.com/api/v1/status endpoint without cookies, account details, or usage data. It only uses scheduled_reset with status: scheduled and reset_type: regular; forecasts (active_watch), completed resets, and banked reset credits do not trigger it. The border remains orange even if an estimated execution time passes, until the feed clears the pending reset. If the feed cannot be verified, the border returns to normal until a later successful check. Each check bypasses the local HTTP cache so the service's longer cache lifetime cannot delay reminders. Codex Resets is a third-party announcement tracker, not an official OpenAI service.

Notifications are scheduled locally through macOS; no push server or Apple Developer account is required. Only public announcement IDs are saved in the app's local preferences to prevent duplicate notifications. Notification banners and sounds follow your macOS notification and Focus settings. If you previously denied permission, enable System Settings → Notifications → CodexBarSimple → Allow notifications and restart the app to check the current announcement again.

Notification times use the documented scheduled_reset.scheduled_for timestamp, not the announcement's publication time or a forecast. The time available when an announcement is first notified is shown; later schedule edits do not send duplicate notifications.

Uninstall

launchctl bootout "gui/$(id -u)/app.codexbarsimple.CodexBarSimple" 2>/dev/null || true
rm -rf "$HOME/Applications/CodexBarSimple.app"
rm -f "$HOME/Library/LaunchAgents/app.codexbarsimple.CodexBarSimple.plist"

These commands stop and remove only CodexBarSimple and its per-user login service.

Build from source

git clone https://github.com/nonbutAworker/CodexBarSimple.git
cd CodexBarSimple
make check
make package
open CodexBarSimple.app

Development requirements: macOS 14+, Apple Silicon, and Swift 6.2+. The default test suite uses local stubs and does not access a real account. Set CODEXBAR_SIMPLE_LIVE_TESTS=1 only when you explicitly want to test against the currently signed-in Codex account.

Acknowledgements

  • CodexBar for the core approach and selected MIT-licensed code.
  • JetBrains Mono for the menu bar font, licensed under the SIL Open Font License 1.1.
  • The supplied TRAE / Nimbus Core design references for the card's color, typography, spacing, and radius tokens.

See THIRD_PARTY_NOTICES.md for complete notices. CodexBarSimple is an independent community project and is not affiliated with or endorsed by OpenAI or the CodexBar project.

License

MIT

About

A tiny Codex usage percentage monitor for the macOS menu bar.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages