Product Introduction
- Definition: CodexBar Lite is a native macOS menu bar application (a lightweight, single-purpose utility) designed to monitor OpenAI Codex usage and rate-limit reset timers in real-time. It operates as a passive tracker, reading from the local Codex CLI session file.
- Core Value Proposition: It exists to provide developers and power users with a zero-friction, privacy-respecting way to monitor their OpenAI Codex API consumption directly from the macOS menu bar. Its primary value is delivering critical usage data at a glance without requiring browser extensions, API key management, or intrusive system permissions.
Main Features
- Native Menu Bar Integration: The app runs as a lightweight process in the macOS system menu bar, displaying Codex usage as a percentage or credits remaining. Clicking the menu bar item reveals a detailed dropdown with primary/secondary usage, reset timers, and last update time. It is built using Swift for optimal macOS integration and performance.
- Session-Based Authentication (No API Key): CodexBar Lite works by reading the existing authentication token from
~/.codex/auth.json, a file created and managed by the officialcodex loginCLI command. It uses this session to make direct, authenticated requests tochatgpt.com's usage endpoint. This eliminates the need for users to manually manage or expose API keys. - Configurable Notifications & Preferences: Users receive native macOS notifications at configurable usage thresholds (80%, 90%, exhaustion, and credit reset). The app includes a preferences pane to set the refresh interval (e.g., every 5 minutes), choose between displaying "percentage used" or "percentage remaining," enable launch at login, and manage automatic updates via the Sparkle framework.
Problems Solved
- Pain Point: Manually checking Codex usage is inefficient. Developers must either run a CLI command (
/status) or open a web browser to navigate to the usage dashboard, interrupting their workflow. There is no proactive warning before hitting rate limits. - Target Audience: The primary audience is software developers, engineers, and technical professionals who use the OpenAI Codex CLI or API extensively in their daily workflow, particularly those on Apple Silicon Macs running macOS Ventura or later. This includes full-stack developers, AI engineers, and DevOps practitioners.
- Use Cases: Essential for developers during intensive coding sessions with Codex to avoid unexpected "credit exhausted" interruptions. It is also critical for team leads or individuals managing tight API budgets, allowing them to monitor consumption passively and plan usage around reset schedules.
Unique Advantages
- Differentiation: Unlike multi-provider trackers like the original CodexBar (which requires browser cookie or Keychain access), CodexBar Lite is single-purpose. This focused scope allows it to operate with dramatically reduced permissions—it never requests Keychain, Full Disk Access, or browser profile permissions, setting a higher privacy standard.
- Key Innovation: Its architecture is based on leveraging the existing official Codex CLI session. This is a novel approach that bypasses the complexity and security concerns of scraping browser cookies or managing API keys. The innovation is in achieving full functionality through minimal, system-native access (
~/.codex/auth.jsonand network requests to OpenAI).
Frequently Asked Questions (FAQ)
- Is CodexBar Lite safe to use? Does it access my browser or passwords? Yes, it is designed with a security-first approach. CodexBar Lite only reads the
~/.codex/auth.jsonsession file and makes network requests tochatgpt.com. It does not access your macOS Keychain, browser cookies, browser profiles, or any other sensitive data. The source code is open for audit on GitHub. - How does CodexBar Lite get my usage data without an API key? It uses the session authentication already established by the official
codex logincommand. The app reads the token from the localauth.jsonfile and uses it to query OpenAI's usage endpoint directly, identical to how the Codex CLI itself operates, eliminating the need for a separate API key. - What happens if I haven't logged into the Codex CLI yet? Upon first launch, if CodexBar Lite detects no valid
auth.jsonfile, it will automatically open the Terminal and execute thecodex logincommand for you. It then monitors for the command's completion and will begin displaying usage once you have successfully authenticated. - Can I use CodexBar Lite on an Intel Mac or an older version of macOS? No. CodexBar Lite is currently compiled exclusively for Apple Silicon (arm64) Macs and requires macOS 13 (Ventura) or later. This allows it to leverage modern macOS frameworks and optimize for the current architecture.
- How do I update or uninstall CodexBar Lite? The app includes a "Check for Updates..." menu item using the Sparkle framework. To uninstall completely, quit the app, drag it from
/Applicationsto Trash, and optionally delete its support files (~/Library/Application Support/CodexBarLite) and preferences (defaults delete dev.vaibhav.codexbar).
