Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AgentBar

AgentBar is a small, native macOS menu-bar app for checking Claude and ChatGPT usage windows. It uses SwiftUI, has no third-party runtime dependencies, and shows only the providers selected in its compact settings page.

AgentBar showing example Claude and ChatGPT usage windows
Representative menu view with demo usage data.

Install

Requires macOS 15 or newer and Xcode Command Line Tools. Install or update with:

curl -fsSL https://raw.githubusercontent.com/s4m77/AgentBar/main/install.sh | bash

The installer downloads the source, builds AgentBar locally, installs it to ~/Applications/AgentBar.app, ad-hoc signs it, and opens it. It never asks for administrator access.

If you prefer to inspect the installer first:

curl -fsSL https://raw.githubusercontent.com/s4m77/AgentBar/main/install.sh -o /tmp/agentbar-install.sh
less /tmp/agentbar-install.sh
bash /tmp/agentbar-install.sh

Uninstall the app with:

curl -fsSL https://raw.githubusercontent.com/s4m77/AgentBar/main/install.sh | bash -s -- --uninstall

Uninstalling does not delete Claude credentials from macOS Keychain.

What is implemented

  • One menu-bar item; no Dock icon and no desktop widget.
  • Liquid Glass surfaces on macOS 26, with a material fallback on macOS 15.
  • Independent checkboxes for Claude and ChatGPT.
  • A selectable menu-bar icon: AgentBar, OpenAI, Anthropic, or any emoji.
  • Dynamic usage windows, percentages, and reset countdowns.
  • Claude OAuth 2.0 + PKCE sign-in with tokens stored in macOS Keychain.
  • ChatGPT usage through the locally installed Codex app-server.
  • Automatic refresh every 60 seconds while the menu content is active, plus manual refresh.
  • Light/dark appearance, reduced-transparency fallback, keyboard controls, and VoiceOver labels.

Requirements

  • macOS 15 or newer.
  • Xcode 16 or newer, or another Swift 6 toolchain, to build. Xcode 26 enables the native Liquid Glass treatment.
  • For ChatGPT: the ChatGPT desktop app or Codex CLI installed and signed in with ChatGPT.
  • For Claude: a Claude account with usage-limit data available through Claude Code OAuth.

Build and run

Open Package.swift in Xcode and run the AgentBar executable, or build a local app bundle:

./Scripts/build-app.sh
open dist/AgentBar.app

Run tests with:

swift test

To install a checkout into ~/Applications, you can also run the root install.sh directly.

Privacy and authentication

AgentBar does not read Codex's credential file. It asks the local Codex app-server for account status and rate-limit snapshots, allowing Codex to manage its own ChatGPT credentials and refresh flow.

Claude tokens are saved as a generic password item in the user's macOS Keychain. They are sent only to Claude/Anthropic endpoints when refreshing authentication or usage.

Service stability

The Claude subscription usage endpoint is private and undocumented, as noted by the reference project this app was based on. Anthropic can change it without notice. The implementation is isolated behind UsageProviding so it can be replaced without changing the menu UI.

Codex usage is read through the stable account/read and account/rateLimits/read methods exposed by the locally installed Codex app-server. AgentBar generates no model requests and consumes no ChatGPT usage while checking these values.

License

AgentBar is available under the MIT License.

Acknowledgements

The Claude and Anthropic marks are sourced from Simple Icons 16.21.0 (CC0-1.0). The OpenAI Blossom is sourced from the official OpenAI brand guidelines. Claude, Anthropic, OpenAI, and ChatGPT are trademarks of their respective owners. AgentBar is an independent project and is not endorsed by either company.

Project layout

Sources/AgentBar/
  App/              application entry point
  Core/             provider-neutral models, settings, and state
  Infrastructure/   Keychain and OAuth callback helpers
  Providers/        Claude and Codex integrations
  Resources/        bundled provider brand marks
  UI/               menu panel, cards, settings, and glass styles
Tests/AgentBarTests/ parsing, formatting, and settings tests

About

Native macOS menu-bar app for Claude and ChatGPT/Codex usage limits.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages