ClaudeBar

作者 tddworks已验证

A macOS menu bar application that monitors AI coding assistant usage quotas. Keep track of your Claude, Codex, Antigravity ,and Gemini usage at a glance.

1,431
Stars
128
Forks
Swift
语言
2026/8/23
添加时间

⚠️ 第三方软件声明

本 Skill 为第三方开源软件,独立托管于 GitHub。SkillTip 仅为信息目录,不控制或维护底层仓库。所显示的安全检查为自动化且范围有限,安装前请自行审查源码。

阅读服务条款

安装

添加到你的 Claude Code skills 目录:

# Add to your Claude Code skills
git clone https://github.com/tddworks/ClaudeBar

快速入门

使用 ClaudeBar 等 Skills 的指南。

安全报告

已验证

上次扫描:—

{
  "status": "PASSED",
  "issues": []
}

README.md

ClaudeBar

Build Tests codecov Latest Release Swift 6.2 Platform Homebrew

A macOS menu bar application that monitors AI coding assistant usage quotas. Keep track of your Claude, Codex, Gemini, GitHub Copilot, Antigravity, Z.ai, Kimi, Kiro, Amp, OpenCode Go, Oh My Pi, Grok, and more at a glance.

Dark Mode
Dark Mode
Light Mode
Light Mode
CLI Theme
CLI Theme
Christmas Theme
Christmas Theme

Sponsors

Some companies support ClaudeBar's open source development through GitHub Sponsors. We'd like to give a special mention to the following sponsors:

testmuai_logo TestMu AI (formerly LambdaTest) is the world's first full-stack agentic AI quality engineering platform, trusted by 18,000+ enterprises.

Editorial independence: Sponsorship does not influence which providers ClaudeBar supports, how they are ordered in the app, or how their quota data is reported.

Features

  • Multi-Provider Support - Monitor Claude, Codex, Gemini, GitHub Copilot, Antigravity, Z.ai, Kimi, Kiro, Amp, OpenCode Go, Oh My Pi, and Grok quotas in one place
  • Provider Enable/Disable - Toggle individual providers on/off from Settings to customize your monitoring
  • Real-Time Quota Tracking - View Session, Weekly, and Model-specific usage percentages
  • Multiple Themes - Light, Dark, CLI, Christmas, and imported terminal themes (.itermcolors)
  • Automatic Adaptation - System theme follows your macOS appearance; Christmas auto-enables during the holiday season
  • Visual Status Indicators - Color-coded progress bars (green/yellow/red) show quota health
  • System Notifications - Get alerted when quota status changes to warning or critical
  • Auto-Refresh - Automatically updates quotas at configurable intervals
  • Keyboard Shortcuts - Quick access with ⌘D (Dashboard) and ⌘R (Refresh)

Quota Status Thresholds

RemainingStatusColor
> 50%HealthyGreen
20-50%WarningYellow
< 20%CriticalRed
0%DepletedGray

Requirements

  • macOS 15+
  • Swift 6.2+
  • CLI tools installed for providers you want to monitor:
    • Claude CLI (claude)
    • Codex CLI (codex)
    • Gemini CLI (gemini)
    • GitHub Copilot - Configure credentials in Settings
    • Antigravity - Auto-detected when running locally
    • Z.ai - Configure Claude Code with GLM Coding Plan endpoint
    • Kimi (kimi) - CLI mode (recommended) or API mode (see below)
    • Kiro (kiro-cli) - Requires kiro-cli installation (see below)
    • Amp (amp) - Auto-detected when CLI is installed
    • OpenCode Go (opencode) - Tracks OpenCode Go usage windows (5hr/$12, weekly/$30, monthly/$60) via local SQLite DB
    • Oh My Pi (omp) - Aggregates account usage via omp usage --json, showing rate-limit windows and, where reported, capped USD money cards or uncapped spend notes
    • Grok Build (grok) - Tracks xAI credit usage (weekly window + per-product Grok Build / Imagine / Voice limits) using the CLI's local OAuth credentials

Kimi Setup

Kimi supports two probe modes, configurable in Settings > Kimi Configuration:

CLI Mode (Recommended) - Launches the interactive kimi CLI and sends /usage to fetch quota data. Requires kimi CLI installed (uv tool install kimi-cli). No Full Disk Access needed.

API Mode - Calls the Kimi API directly using browser cookie authentication. Requires Full Disk Access for ClaudeBar to read the kimi-auth browser cookie:

  1. Open System Settings > Privacy & Security > Full Disk Access
  2. Toggle ClaudeBar on (or click + and add it)
  3. Restart ClaudeBar

You can also set the KIMI_AUTH_TOKEN environment variable to bypass cookie reading in API mode.

Kiro Setup

Kiro monitors AWS Kiro (formerly CodeWhisperer) usage through the kiro-cli command-line tool.

Installation: uv tool install kiro-cli or pip install kiro-cli

Authentication: Run kiro-cli and follow the login prompts.

Kiro IDE Users: If you use Kiro IDE, simply install kiro-cli. Both share the same authentication, so no additional login is required.

Installation

Homebrew

Install via Homebrew.

brew install --cask claudebar

Download (Recommended)

Download the latest release from GitHub Releases:

  • DMG: Open and drag ClaudeBar.app to Applications
  • ZIP: Unzip and move ClaudeBar.app to Applications

Both are code-signed and notarized for Gatekeeper.

Build from Source

git clone https://github.com/tddworks/ClaudeBar.git
cd ClaudeBar

# Install Tuist (if not installed)
brew install tuist

# Install dependencies and build
tuist install
tuist build ClaudeBar -C Release

Usage

After building, open the generated Xcode workspace and run the app:

tuist generate
open ClaudeBar.xcworkspace

Then press Cmd+R in Xcode to run. The app will appear in your menu bar. Click to view quota details for each provider.

Development

The project uses Tuist for dependency management and Xcode project generation.

Quick Start

# Install Tuist (if not installed)
brew install tuist

# Install dependencies
tuist install

# Generate Xcode project and open
tuist generate
open ClaudeBar.xcworkspace

Build & Test

# Build the project
tuist build

# Run all tests
tuist test

# Run tests with coverage
tuist test --result-bundle-path TestResults.xcresult -- -enableCodeCoverage YES

# Build release configuration
tuist build ClaudeBar -C Release

SwiftUI Previews

After opening in Xcode, SwiftUI previews will work with Cmd+Option+Return. The project is configured with ENABLE_DEBUG_DYLIB for preview support.

Architecture

Full documentation: docs/ARCHITECTURE.md

ClaudeBar uses a layered architecture with QuotaMonitor as the single source of truth:

LayerPurpose
AppSwiftUI views consuming domain directly (no ViewModel)
DomainRich models, QuotaMonitor, repository protocols
InfrastructureProbes, storage implementations, adapters

Key Design Decisions

  • Single Source of Truth - QuotaMonitor owns all provider state
  • Repository Pattern - Settings and credentials abstracted behind injectable protocols
  • Protocol-Based DI - @Mockable protocols enable testability
  • Chicago School TDD - Tests verify state changes, not method calls
  • No ViewModel/AppState - Views consume domain directly

Import Terminal Theme

Match ClaudeBar's appearance to your terminal. Import any .itermcolors file:

  1. Open Settings (gear icon)
  2. Click Import .itermcolors
  3. Select your file (export from iTerm2: Preferences > Profiles > Colors > Color Presets > Export)

450+ pre-made schemes available at iTerm2-Color-Schemes.

Imported themes are saved in ~/.claudebar/themes/ and persist across restarts.

Contributing

Adding a New AI Provider

Use the add-provider skill to guide you through adding new providers with TDD:

Tell Claude Code: "I want to add a new provider for [ProviderName]"

The skill guides you through: Parsing Tests → Probe Tests → Implementation → Registration.

See .claude/skills/add-provider/SKILL.md for details and AntigravityUsageProbe as a reference implementation.

Dependencies

  • Sparkle - Auto-update framework
  • Mockable - Protocol mocking for tests
  • Tuist - Xcode project generation (for SwiftUI previews)

Releasing

Releases are automated via GitHub Actions. Push a version tag to create a new release.

For detailed setup instructions, see docs/release/RELEASE_SETUP.md.

Release Workflow

The workflow uses Tuist to generate the Xcode project:

Tag v1.0.0 → Update Info.plist → tuist generate → xcodebuild → Sign & Notarize → GitHub Release

Version is set in Sources/App/Info.plist and flows through to Sparkle auto-updates.

Quick Start

  1. Configure GitHub Secrets (see full guide):

    SecretDescription
    APPLE_CERTIFICATE_P12Developer ID certificate (base64)
    APPLE_CERTIFICATE_PASSWORDPassword for .p12
    APP_STORE_CONNECT_API_KEY_P8API key (base64)
    APP_STORE_CONNECT_KEY_IDKey ID
    APP_STORE_CONNECT_ISSUER_IDIssuer ID
  2. Verify your certificate:

    ./scripts/verify-p12.sh /path/to/certificate.p12
    
  3. Create a release:

    git tag v1.0.0
    git push origin v1.0.0
    

The workflow will automatically build, sign, notarize, and publish to GitHub Releases.

Contributors

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

To credit someone, comment on any issue or pull request:

@all-contributors please add @username for code, doc

License

MIT

常见问题

What is ClaudeBar?

ClaudeBar is an open-source ai agents skill for AI coding assistants such as Claude Code, Codex CLI, and ChatGPT, built by tddworks. A macOS menu bar application that monitors AI coding assistant usage quotas. Keep track of your Claude, Codex, Antigravity ,and Gemini usage at a glance. It has 1,431 GitHub stars.

Is ClaudeBar safe to use?

Yes. ClaudeBar passed SkillsLLM's automated security scan — a dependency vulnerability audit plus prompt-injection heuristics — with no high-severity issues. You can read the full report in the Security Report section on this page.

How do I install ClaudeBar?

Clone the repository with "git clone https://github.com/tddworks/ClaudeBar" and add it to your Claude Code skills directory (see the Installation section above).

What programming language is ClaudeBar written in?

ClaudeBar is primarily written in Swift. It is open-source under tddworks on GitHub, so you can review or fork the full source.

Are there alternatives to ClaudeBar?

Yes. SkillsLLM lists many other AI Agents skills you can browse and compare side by side. Open the AI Agents category from the badge at the top of this page, or use the Related Skills and comparison links further down to weigh ClaudeBar against similar tools.

评论 (0)

暂无评论,成为第一个分享想法的人!

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情

claude-code

by anthropics

Claude Code is an agentic coding tool that lives in your terminal, understands your codebase, and helps you code faster by executing routine tasks, explaining complex code, and handling git workflows - all through natural language commands.

120,03119,897Shell
AI 智能体
查看详情

开发者还喜欢

基于喜欢此 Skill 的开发者投票和收藏

ECC

by affaan-m

10

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

242,21936,702JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情
15

An agentic skills framework & software development methodology that works.

234,96620,863Shell
AI 智能体ai-agentsbrainstorming
查看详情

hermes-agent

by NousResearch

10

The agent that grows with you

234,43747,175Python
AI 智能体ai-agentsagent-orchestration
查看详情

n8n

by n8n-io

12

Fair-code workflow automation platform with native AI capabilities. Combine visual building with custom code, self-host or cloud, 400+ integrations.

201,88160,308TypeScript
MCP 服务器apisai-tools
查看详情

The agent harness performance optimization system. Skills, instincts, memory, security, and research-first development for Claude Code, Codex, Opencode, Cursor and beyond.

185,94028,768JavaScript
AI 智能体ai-agentsanthropicclaude-code
查看详情

cc-switch

by farion1231

3

A cross-platform desktop All-in-One assistant for Claude Code, Codex, OpenCode, OpenClaw, Grok Build & Hermes Agent. Only official website: ccswitch.io

128,8688,826Rust
AI 智能体claude-codeai-tools
查看详情