CodexBar  by steipete

Real-time AI code assistant usage stats on macOS

Created 1 month ago
1,899 stars

Top 22.7% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

CodexBar is a lightweight macOS menu bar application designed for developers to monitor their OpenAI Codex and Claude Code API usage statistics without needing to log into web interfaces. It provides real-time visibility into session and weekly token limits, helping users proactively manage their API consumption and avoid unexpected interruptions. The app targets developers who frequently use these AI coding assistants and value immediate, on-device status updates.

How It Works

The application employs a privacy-conscious, on-device approach. For Codex, it prioritizes local RPC calls to fetch rate limits and credits, falling back to parsing the output of a local codex /status command via a pseudo-terminal (PTY). For Claude Code, it similarly uses a PTY to run claude /usage and claude /status commands, extracting session, weekly, and Sonnet-only weekly usage, along with account details directly from the CLI output. This method eliminates the need for browser interaction or external network calls beyond the CLI itself, ensuring data remains local.

Quick Start & Requirements

  • Installation:
    • Homebrew: brew install --cask steipete/tap/codexbar
    • Direct Download: From GitHub Releases.
  • Prerequisites:
    • macOS 15+
    • Codex CLI (version ≥ 0.55.0) installed and logged in.
    • Claude Code CLI installed and logged in (claude login).
    • At least one prompt must be run via each CLI to populate initial usage data.
  • Links: GitHub Releases: https://github.com/steipete/CodexBar/releases

Highlighted Details

  • Dual Provider Support: Simultaneously displays status items for both Codex and Claude Code, with configurable visibility.
  • Dynamic Iconography: Utilizes minimalist grayscale bars in the menu bar to represent different usage windows (5-hour, weekly) and credits, adapting dynamically based on availability.
  • Privacy Assurance: All usage data parsing occurs locally on the user's machine. The project explicitly addresses privacy concerns in issue #12.
  • Automatic Updates: Features auto-update functionality via the Sparkle framework, defaulting to checking the GitHub Releases appcast.

Maintenance & Community

The project is maintained by Peter Steinberger (steipete). No specific community channels like Discord or Slack are mentioned in the README.

Licensing & Compatibility

  • License: MIT License.
  • Compatibility: Permissive MIT license allows for commercial use and integration into closed-source projects. Requires macOS 15+.

Limitations & Caveats

Initial usage data may appear as "No usage yet." until the respective CLIs have processed at least one prompt. Parsing might be affected by future changes in the CLIs' output schemas, though cached data is preserved. The scripted build process targets arm64; universal binary builds require manual configuration.

Health Check
Last Commit

21 hours ago

Responsiveness

Inactive

Pull Requests (30d)
65
Issues (30d)
84
Star History
1,741 stars in the last 30 days

Explore Similar Projects

Starred by Dan Guido Dan Guido(Cofounder of Trail of Bits), Joe Walnes Joe Walnes(Head of Experimental Projects at Stripe), and
4 more.

opcode by winfunc

1.0%
20k
GUI for Claude Code
Created 6 months ago
Updated 2 months ago
Feedback? Help us improve.