steipete / CodexBar
CodexBar 🎚️ — May your tokens never run out.
CodexBar 🎚️ — 愿你的 Token 永不枯竭。
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, Zed, Vertex AI, Augment, OpenRouter, LiteLLM, 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.
将所有 AI 编程额度限制尽收于菜单栏。这是一款适用于 macOS 14+ 的轻量级菜单栏应用,可实时显示 AI 编程服务商的额度限制,并提示重置时间。支持 Codex、OpenAI、Claude、Cursor、Gemini、Copilot、Grok、GroqCloud、ElevenLabs、Deepgram、z.ai、MiniMax、Kiro、Zed、Vertex AI、Augment、OpenRouter、LiteLLM、LLM Proxy、Codebuff、Command Code、AWS Bedrock 以及许多新兴的编程服务商。支持为每个服务商显示一个状态项,或使用“合并图标”模式配合服务商切换器。无 Dock 图标,界面极简,菜单栏图标动态显示。
Why 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.
为什么要关注重置时间?通过针对每个服务商的会话、周度及月度窗口,提供距离下次重置的倒计时——无需再猜测是否该开始一项长任务。支持额度、支出及成本扫描。包括额度余额、管理 API 支出仪表板、服务商账单摘要,以及在数据源提供足够细节时的本地成本扫描。实时状态监控。通过轮询服务商状态,在菜单中显示故障徽章,并在菜单栏图标上叠加指示器。隐私至上。复用现有的服务商会话(如 OAuth、设备流、API 密钥、浏览器 Cookie、本地文件),因此不会存储任何密码。
Install
安装
Requirements: macOS 14+ (Sonoma)
GitHub Releases Download: https://github.com/steipete/CodexBar/releases
Homebrew: brew install --cask codexbar
要求:macOS 14+ (Sonoma)
GitHub 发布页下载:https://github.com/steipete/CodexBar/releases
Homebrew:brew install --cask codexbar
CLI
命令行工具 (CLI)
Tarballs (macOS/Linux)
Homebrew formula (Linux today): brew install steipete/tap/codexbar
Arch Linux AUR package: yay -S codexbar-cli
Or download release tarballs from GitHub Releases:
macOS: CodexBarCLI-v<tag>-macos-arm64.tar.gz, CodexBarCLI-v<tag>-macos-x86_64.tar.gz
Linux (glibc): CodexBarCLI-v<tag>-linux-aarch64.tar.gz, CodexBarCLI-v<tag>-linux-x86_64.tar.gz
Linux (static musl): CodexBarCLI-v<tag>-linux-musl-aarch64.tar.gz, CodexBarCLI-v<tag>-linux-musl-x86_64.tar.gz
Tarball 压缩包 (macOS/Linux)
Homebrew 公式 (Linux):brew install steipete/tap/codexbar
Arch Linux AUR 包:yay -S codexbar-cli
或从 GitHub Releases 下载发布包:
macOS:CodexBarCLI-v<tag>-macos-arm64.tar.gz, CodexBarCLI-v<tag>-macos-x86_64.tar.gz
Linux (glibc):CodexBarCLI-v<tag>-linux-aarch64.tar.gz, CodexBarCLI-v<tag>-linux-x86_64.tar.gz
Linux (静态 musl):CodexBarCLI-v<tag>-linux-musl-aarch64.tar.gz, CodexBarCLI-v<tag>-linux-musl-x86_64.tar.gz
First run
首次运行
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.
打开“设置 (Settings) → 服务商 (Providers)”并启用你使用的服务。根据服务商的不同,安装并登录你所依赖的源:CLI、浏览器会话、OAuth/设备流、API 密钥、本地应用文件或服务商客户端。可选:在“设置 → 服务商 → Codex → OpenAI cookies”(自动或手动)中添加仪表板额外功能。
Set API keys from the CLI: Provider toggles and API keys live in the resolved CodexBar config file. New installs use ~/.config/codexbar/config.json; existing ~/.codexbar/config.json installs still load from the legacy path. You can script the same provider list that Settings → Providers uses:
codexbar config providers
codexbar config enable --provider grok
codexbar config disable --provider cursor
通过 CLI 设置 API 密钥:服务商开关和 API 密钥存储在解析后的 CodexBar 配置文件中。新安装使用 ~/.config/codexbar/config.json;现有的 ~/.codexbar/config.json 安装仍会从旧路径加载。你可以通过脚本管理与“设置 → 服务商”中相同的列表:
codexbar config providers
codexbar config enable --provider grok
codexbar config disable --provider cursor
For API-key providers, store a key without opening Settings:
printf '%s' "$ELEVENLABS_API_KEY" | codexbar config set-api-key --provider elevenlabs --stdin
set-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.
对于使用 API 密钥的服务商,无需打开设置即可存储密钥:
printf '%s' "$ELEVENLABS_API_KEY" | codexbar config set-api-key --provider elevenlabs --stdin
set-api-key 会修剪管道输入的值,以受限的配置文件权限存储它,并默认启用该服务商。使用 --no-enable 仅保存密钥,或使用 --api-key <key> 处理无需担心 Shell 历史记录的本地一次性脚本。查看 CLI 配置以获取完整流程。
Providers (Partial List)
服务商(部分列表)
-
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.
-
Gemini: OAuth-backed quota API using Gemini CLI credentials.
-
Copilot: GitHub device flow + Copilot internal usage API.
-
DeepSeek: API key for credit balance tracking (paid vs. granted breakdown).
-
(…and many more supported providers)
-
Codex: OAuth API 或本地 Codex CLI,外加可选的 OpenAI Web 仪表板扩展。
-
OpenAI: 管理 API 密钥的使用/成本图表,支持旧版额度余额回退。
-
Claude: OAuth API、浏览器 Cookie 或 CLI PTY 回退;支持会话和周度使用情况(如可用)。
-
Cursor: 用于计划、使用情况和账单重置的浏览器会话 Cookie。
-
Gemini: 使用 Gemini CLI 凭据的 OAuth 配额 API。
-
Copilot: GitHub 设备流 + Copilot 内部使用 API。
-
DeepSeek: 用于额度余额跟踪的 API 密钥(区分付费与赠送额度)。
-
(……以及更多支持的服务商)