Every AI coding limit, in your menu bar.
Tiny macOS 14+ menu bar app that keeps AI coding-provider limits visible and shows when each window resets. Codex, OpenAI, Claude, Cursor, Gemini, Copilot, Grok, GroqCloud, ElevenLabs, Deepgram, z.ai, MiniMax, Kiro, Vertex AI, Augment, OpenRouter, LLM Proxy, Codebuff, Command Code, AWS Bedrock, and many newer coding providers. One status item per provider, or Merge Icons mode with a provider switcher. No Dock icon, minimal UI, dynamic bar icons.
- Plan around resets. Per-provider session, weekly, and monthly windows with countdowns to the next reset — stop guessing whether to start that long task.
- Credits, spend, and cost scans. Credit balances, Admin API spend dashboards, provider billing summaries, and local cost scans where the source exposes enough detail.
- Live status. Provider status polling surfaces incident badges in the menu and an indicator overlay on the bar icon.
- Privacy-first. Reuses existing provider sessions — OAuth, device flow, API keys, browser cookies, local files — so no passwords are stored.
这个 fork 的目标很直接:让中文用户打开应用后能直接看懂、直接配置、直接排查,不需要在英文设置项、英文错误提示、provider 名称和不同 API 来源之间来回猜。
- 同时使用多款 AI 编程工具,希望在菜单栏里快速看额度、余额、窗口重置时间和服务状态。
- 主要使用中文或亚洲区域常见 AI 服务,例如月之暗面 Kimi、千问、豆包、Trae、小米 Mimo、智谱 z.ai、MiniMax、阶跃星辰、阿里云百炼。
- 想使用中文界面、中文错误提示和更贴近国内服务命名习惯的 provider 名称。
- 希望通过 GitHub Actions 获取本 fork 的 macOS App 和 Linux CLI 构建产物,而不是安装上游原版。
- 菜单栏、Overview、Provider 设置页、按钮、状态、错误提示、CLI 输出中的用户可见文案已中文化。
- 国内 AI provider 使用中文名称,例如千问、豆包、阶跃星辰、小米 Mimo、智谱 z.ai、月之暗面 Kimi、阿里云百炼。
- 保留必要技术词和品牌名,例如
API key、Cookie、Token、OAuth、Codex、Claude、Cursor、OpenRouter。
在上游 Codex、Claude、Cursor、Gemini、Copilot、Kiro、Vertex AI、Augment、Amp、JetBrains AI、OpenRouter、Perplexity、Abacus AI 等 provider 的基础上,本 fork 额外补充或强化了这些中文用户更常见的服务:
- 月之暗面 Kimi:读取 weekly quota 和 5 小时窗口。
- 月之暗面 Kimi K2:读取 API credit 用量。
- 千问:面向阿里云百炼/千问相关额度入口。
- 阿里云百炼 Coding Plan:独立于千问 provider 的 Coding Plan 数据源。
- 豆包:火山方舟/豆包相关订阅和额度入口。
- Trae:Trae 账号用量入口。
- 小米 Mimo:读取小米 Mimo token plan 和余额,支持 API key、浏览器 Cookie 或手动 Cookie。
- 智谱 z.ai:支持 z.ai/BigModel 相关 quota 和 MCP window。
- MiniMax:MiniMax Coding Plan 用量读取。
- 阶跃星辰、Zenmux、AigoCode:补充国内/亚洲开发者常见平台入口。
- Overview 会尽量显示所有已启用、可选择的 API/provider。
- 支持合并图标模式,多个 provider 可以合并到同一个菜单栏入口。
- 支持手动刷新以及 1 分钟、2 分钟、5 分钟、15 分钟等刷新节奏。
- Provider 刷新策略有 CI 覆盖,避免后台刷新、实时显示和 Overview 逻辑回退。
- macOS App 通过 GitHub Actions 打包为 zip artifact,并更新 continuous pre-release。
- Linux CLI 通过 GitHub Actions 构建 x64 和 arm64。
- CI 会运行 lint、实时刷新策略测试、Swift Test 和 Linux CLI smoke test。
- macOS 14 Sonoma 或更新版本。
- Linux 仅支持 CLI,不支持菜单栏 App。
优先使用 Leo fork 的构建产物:
- Releases: https://github.com/LeoLin990405/CodexBar/releases
- Actions artifacts: https://github.com/LeoLin990405/CodexBar/actions
如果你运行:
brew install --cask steipete/tap/codexbarHomebrew formula (Linux today):
brew install steipete/tap/codexbarOr download release tarballs from GitHub Releases:
- macOS:
CodexBarCLI-v<tag>-macos-arm64.tar.gz,CodexBarCLI-v<tag>-macos-x86_64.tar.gz - Linux:
CodexBarCLI-v<tag>-linux-aarch64.tar.gz,CodexBarCLI-v<tag>-linux-x86_64.tar.gz
- Open Settings → Providers and enable what you use.
- Install/sign in to the provider sources you rely on: CLIs, browser sessions, OAuth/device flow, API keys, local app files, or provider apps depending on the provider.
- Optional: Settings → Providers → Codex → OpenAI cookies (Automatic or Manual) to add dashboard extras.
Provider toggles and API keys live in ~/.codexbar/config.json. You can script the same provider list that Settings → Providers uses:
codexbar config providers
codexbar config enable --provider grok
codexbar config disable --provider cursorFor API-key providers, store a key without opening Settings:
printf '%s' "$ELEVENLABS_API_KEY" | codexbar config set-api-key --provider elevenlabs --stdinset-api-key trims the piped value, stores it with restrictive config-file permissions, and enables the provider by default. Use --no-enable to only save the key, or --api-key <key> for one-off local scripts where shell history is not a concern.
See CLI configuration for the full flow.
- Codex — OAuth API or local Codex CLI, plus optional OpenAI web dashboard extras.
- OpenAI — Admin API key usage/cost graphs with legacy credit-balance fallback.
- Claude — OAuth API, browser cookies, or CLI PTY fallback; session and weekly usage where available.
- Cursor — Browser session cookies for plan + usage + billing resets.
- OpenCode — Browser cookies for workspace subscription usage.
- OpenCode Go — Browser cookies for Go usage windows.
- Alibaba Coding Plan — Web cookies or API key for coding-plan quotas.
- Gemini — OAuth-backed quota API using Gemini CLI credentials (no browser cookies).
- Antigravity — Local language server probe (experimental); no external auth.
- Droid — Browser cookies + WorkOS token flows for Factory usage + billing.
- Copilot — GitHub device flow + Copilot internal usage API.
- z.ai — API token for quota + MCP windows.
- Manus — Browser
session_idauth for credit balance, monthly credits, and daily refresh tracking. - MiniMax — API token, cookie header, or browser cookies for coding-plan usage.
- Kimi — Auth token (JWT from
kimi-authcookie) for weekly quota + 5‑hour rate limit. - Kimi K2 (unofficial) — Legacy API key flow for credit-based usage totals.
- Kilo — API token with CLI-auth fallback for Kilo Pass usage.
- Kiro — CLI-based usage; monthly credits + bonus credits.
- Vertex AI — Google Cloud gcloud OAuth with token cost tracking from local Claude logs.
- Augment — Augment CLI or browser cookies for credits tracking and usage monitoring.
- Amp — Browser cookie-based authentication with Amp Free usage tracking.
- Ollama — Browser cookies for Ollama Cloud usage windows.
- JetBrains AI — Local XML-based quota from JetBrains IDE configuration; monthly credits tracking.
- Warp — API token for GraphQL request limits and monthly credits.
- ElevenLabs — API key for character credits and voice slot usage.
- OpenRouter — API token for credit-based usage tracking across multiple AI providers.
- Windsurf — Browser localStorage session import or local SQLite cache for plan usage.
- Perplexity — Account usage credits from Perplexity usage data.
- Xiaomi MiMo — Browser cookies for balance and token-plan usage.
- Doubao — API key for Volcengine Ark request-limit probes.
- Abacus AI — Browser cookie auth for ChatLLM/RouteLLM compute credit tracking.
- Mistral — Browser cookies for monthly spend tracking.
- DeepSeek — API key for credit balance tracking (paid vs. granted breakdown).
- Moonshot / Kimi API — API key for Moonshot/Kimi API account balance tracking.
- Venice — API key for DIEM or USD balance tracking.
- Codebuff — API token (or
~/.config/manicode/credentials.json) for credit balance + weekly rate limit. - Crof — API key for dollar credit balance and request quota tracking.
- Command Code — Browser cookies for monthly USD credits from Command Code billing.
- StepFun — Username + password login for Step Plan rate limits (5‑hour + weekly windows) and subscription plan name.
- AWS Bedrock — AWS credentials for Cost Explorer usage and monthly budget tracking.
- Grok — Grok CLI billing RPC plus grok.com browser-session fallback.
- GroqCloud — API key for Enterprise Prometheus request/token/cache-hit metrics.
- LLM Proxy — API key + base URL for aggregate proxy quota stats and provider breakdowns.
- Deepgram — API key usage summaries across speech, agent, token, and TTS metrics.
- Open to new providers: provider authoring guide.
The menu bar icon is a tiny usage meter. Bar meaning is provider-specific, and errors/stale data can dim the icon or show an incident indicator.
- Multi-provider menu bar with per-provider toggles (Settings → Providers).
- Provider-specific usage meters with reset countdowns.
- Optional Codex web dashboard enrichments (code review remaining, usage breakdown, credits history).
- Inline spend and usage charts for API-backed providers such as OpenAI, Claude Admin API, OpenRouter, z.ai, MiniMax, Mistral, and AWS Bedrock.
- Configurable cost-usage scans for Codex + Claude, plus reused chart UI for supported provider histories.
- Provider status polling with incident badges in the menu and icon overlay.
- Merge Icons mode to combine providers into one status item + switcher.
- Display controls for provider icons, labels, bars, reset-time style, and highest-usage auto-selection.
- Refresh cadence presets (manual, 1m, 2m, 5m, 15m).
- Bundled CLI (
codexbar) for scripts and CI (includingcodexbar cost --provider codex,claude, orbothfor local cost usage); macOS and Linux CLI builds available. - WidgetKit widgets for supported providers.
- Optional session quota notifications and weekly-reset confetti.
- Privacy-first: on-device parsing by default; browser cookies are opt-in and reused (no passwords stored).
Wondering if CodexBar scans your disk? It doesn’t crawl your filesystem; it reads a small set of known locations (browser cookies/local storage, provider config files, local JSONL logs) when the related features are enabled. Provider tokens and token-account settings live in ~/.codexbar/config.json with restrictive file permissions. See the discussion and audit notes in issue #12.
- Full Disk Access (optional): only required to read Safari cookies/local storage for web-based providers. If you don’t grant it, use another supported browser, manual cookies/API keys, OAuth, or CLI/local sources where that provider supports them.
- Keychain access (prompted by macOS):
- Chromium cookie import needs the browser “Safe Storage” key to decrypt cookies.
- Claude OAuth bootstrap may read the Claude CLI Keychain item when CodexBar has no usable cached credentials.
- CodexBar may use Keychain for browser cookie decryption, cached cookie headers, and OAuth/device-flow credentials where those sources require it.
- How do I prevent those keychain alerts?
- Open Keychain Access.app → login keychain → search the prompted item (for Claude OAuth, usually “Claude Code-credentials”).
- Open the item → Access Control → add
CodexBar.appunder “Always allow access by these applications”. - Prefer adding just CodexBar (avoid “Allow all applications” unless you want it wide open).
- Relaunch CodexBar after saving.
- Reference screenshot:

- How to do the same for the browser?
- Find the browser’s “Safe Storage” key (e.g., “Chrome Safe Storage”, “Brave Safe Storage”, “Microsoft Edge Safe Storage”).
- Open the item → Access Control → add
CodexBar.appunder “Always allow access by these applications”. - This removes the prompt when CodexBar decrypts cookies for that browser.
- Last resort — stop all Keychain reads entirely: if "Always Allow" doesn't stick (e.g., macOS resets the ACL after a Chromium update or a
partition_idreset), open CodexBar → Settings → Advanced → Keychain access and enable Disable Keychain access. CodexBar will no longer touch the Keychain. Browser-cookie-based providers will be skipped, but Claude/Codex OAuth via the CLI still works (it reads~/.codex/~/.claudeconfig files, not the Keychain).
- Files & Folders prompts (folder/volume access): CodexBar launches provider CLIs and local probes for some providers. If those helpers read a project directory or external drive, macOS may ask CodexBar for that folder/volume (e.g., Desktop or an external volume). This is driven by the helper’s working directory, not background disk scanning.
- What we do not request in the background: no Screen Recording or Accessibility permissions; user-triggered helper actions may ask macOS for Automation permission to open Terminal. No passwords are stored (browser cookies are reused when you opt in).
- Providers overview: docs/providers.md
- Provider authoring: docs/provider.md
- Issue labeling guide: docs/ISSUE_LABELING.md
- UI & icon notes: docs/ui.md
- CLI reference: docs/cli.md
- Configuration: docs/configuration.md
- CLI configuration: docs/cli-configuration.md
- Widgets: docs/widgets.md
- Architecture: docs/architecture.md
- Refresh loop: docs/refresh-loop.md
- Status polling: docs/status.md
- Sparkle updates: docs/sparkle.md
- Packaging: docs/packaging.md
- Development: docs/DEVELOPMENT.md
- Release checklist: docs/RELEASING.md
- Changelog: CHANGELOG.md
- Clone the repo and open it in Xcode or run the scripts directly.
- Launch once, then toggle providers in Settings → Providers.
- Install/sign in to provider sources you rely on (CLIs, browser cookies, OAuth/device flow, API keys, or local app/config files).
- Optional: set OpenAI cookies (Automatic or Manual) for Codex dashboard extras.
Requires macOS 14+ and Swift 6.2+.
./Scripts/package_app.sh # builds CodexBar.app in-place
CODEXBAR_SIGNING=adhoc ./Scripts/package_app.sh # ad-hoc signing (no Apple Developer account)
open CodexBar.app./Scripts/compile_and_run.sh
./Scripts/compile_and_run.sh --test # also run swift test before packaging/relaunching
make check # SwiftFormat + SwiftLint
make docs-list # list docs with frontmatter summariesCLI install:
# after installing CodexBar.app in /Applications
./bin/install-codexbar-cli.sh./Scripts/lint.sh lint
./Scripts/lint.sh format
swift test --no-parallel- codexbar-waybar — Waybar custom module + GTK4 popover for Hyprland / Sway / other Wayland compositors, built on top of the bundled Linux CLI.
- Codexbar GNOME — GNOME Shell extension that brings CodexBar usage into the desktop panel.
Inspired by ccusage (MIT), specifically the cost usage tracking.
本 fork 使用这些 workflow:
CI:lint、实时刷新策略测试、Swift Test、Linux CLI 构建和 smoke test。Release macOS App:构建并打包 macOS App,上传 artifact,更新 continuous pre-release。Build App/Release CLI:用于补充打包和 CLI 发布流程。Monitor Upstream Changes:用于跟踪上游变更。
- Provider 总览:docs/providers.md
- Provider 开发指南:docs/provider.md
- 配置说明:docs/configuration.md
- CLI 参考:docs/cli.md
- 架构说明:docs/architecture.md
- 刷新循环:docs/refresh-loop.md
- 状态轮询:docs/status.md
- UI 和图标:docs/ui.md
- Widget:docs/widgets.md
- 打包发布:docs/RELEASING.md
- Fork 快速开始:docs/FORK_QUICK_START.md
- 上游同步策略:docs/UPSTREAM_STRATEGY.md
原始项目由 Peter Steinberger 创建并维护:https://github.com/steipete/CodexBar。
这个 fork 会尽量保留上游架构、隐私边界和核心行为,同时在中文 UI、中文用户常用 provider、GitHub Actions 构建和本地使用体验上继续调整。适合所有用户的 bug fix 可以回馈上游;中文汉化、中文 provider 命名和 fork 专属配置会优先留在本 fork。
MIT。原始项目版权归 Peter Steinberger 及贡献者所有;本 fork 的新增改动由对应贡献者保留署名。

