macOS のメニューバーに Claude Code と Codex の使用率を常時表示する macOS アプリケーション。
ターミナルで claude login / codex login を完了済みのアカウントに対し、Anthropic の OAuth エンドポイントおよび codex app-server の JSON-RPC を経由してレート制限情報を取得する。取得結果はメニューバーに 2 個のドーナツチャートと数値で表示され、クリックでポップオーバーに 5 時間ウィンドウと週次ウィンドウの詳細を展開する。
| 項目 | 値 |
|---|---|
| macOS | 14 Sonoma 以上 |
| Swift | 5.9 以上(Xcode Command Line Tools で可) |
| Claude Code CLI | claude login 済み |
| Codex CLI | codex login 済み |
Claude Code と Codex のいずれかが欠けていても、もう一方は動作する。
このリポジトリを clone した上で、自分のマシンでビルドして使うことを前提とする。
./Scripts/build.sh --installビルド時に Apple Development の署名 identity が見つからない場合は ad-hoc 署名が自動的に使われる。自分でビルドした .app はそのまま起動できる。
インストール後は Finder の「アプリケーション」から TokenChecker を開くか、ターミナルから以下を実行して起動する。
open /Applications/TokenChecker.app事前にターミナルで以下を実行し、両サービスにログインしておく。
claude login
codex loginいずれもブラウザの OAuth フローを経て、Keychain または ~/.codex/auth.json にトークンが保存される。アプリは保存されたトークンを参照するため、ログインは CLI 側で 1 度行えばよい。
クリックで展開するポップオーバーには、5 時間ウィンドウと週次ウィンドウの使用率、リセットまでの残時間、更新間隔(30 秒〜10 分、既定 5 分)、ログイン時の自動起動トグルが含まれる。
- Claude:
/usr/bin/security経由で Keychain (Claude Code-credentials) から OAuth アクセストークンを取得し、https://api.anthropic.com/api/oauth/usageに対してanthropic-beta: oauth-2025-04-20ヘッダー付きで GET する。 - Codex:
codexバイナリを子プロセスとして起動し、行区切り JSON-RPC 経由でaccount/rateLimits/readを呼ぶ。バイナリの場所は Homebrew / nodebrew / nvm / volta / asdf / fnm 等の主要なインストール先を順に探索し、見つからない場合はログインシェル経由でcommand -v codexを解決する。UserDefaultsのcodexPathキーで手動指定も可能 (defaults write com.token-checker.app codexPath /abs/path/codex)。起動コマンドは CLI バージョンに応じて自動的に切り替わる (codex app-server daemon start+codex app-server proxy形式とcodex app-server単体形式の双方をサポート)。
最新のソースを取得して再ビルドする。
git pull
./Scripts/build.sh --install既存のアプリは自動的に上書きされる。設定 (ポーリング間隔、ログイン時の自動起動) は UserDefaults に保存されているため引き継がれる。アプリが既に起動中の場合はメニューバーの「終了」で一度落としてから再度開く。
killall TokenChecker
defaults delete com.token-checker.app 2>/dev/null本ソフトウェアは MIT License で配布される。 なお「Anthropic」「Claude」「Codex」は各社の商標であり、本ソフトウェアは Anthropic および OpenAI の公式プロダクトではなく、両社による承認・推奨を受けたものでもない。
本ソフトウェアは現状有姿 (as-is) で提供されるものであり、動作・安全性・正確性について一切の保証を行わない。本ソフトウェアの利用に起因して発生したいかなる損害 (データ損失、アカウント停止、トークン漏洩、セキュリティインシデント等を含むがこれに限らない) についても、作者は一切の責任を負わない。利用者自身の責任において使用すること。
UI のデザインは s-age/ccmeter(MIT License)を参考にした。MIT ライセンスは LICENSE に同梱している。
A macOS menu bar application that displays Claude Code and Codex usage in real time.
For accounts already authenticated via claude login / codex login, this app retrieves rate-limit information through the Anthropic OAuth endpoint and the codex app-server JSON-RPC. Results are shown as two donut charts with numeric values in the menu bar; clicking opens a popover with detailed 5-hour and weekly window data.
| Item | Value |
|---|---|
| macOS | 14 Sonoma or later |
| Swift | 5.9 or later (Xcode Command Line Tools is sufficient) |
| Claude Code CLI | authenticated via claude login |
| Codex CLI | authenticated via codex login |
If only one of Claude Code or Codex is available, the other still works.
Clone this repository and build on your own machine.
./Scripts/build.sh --installIf no Apple Development signing identity is found, ad-hoc signing is used automatically. A .app you built yourself can be launched directly.
After installation, open TokenChecker from Finder's Applications folder, or run:
open /Applications/TokenChecker.appFirst, log in to both services from the terminal:
claude login
codex loginEach uses a browser-based OAuth flow that saves a token to Keychain or ~/.codex/auth.json. The app reads the saved tokens, so you only need to log in once via the CLI.
The popover (opened by clicking the menu bar item) shows 5-hour and weekly window utilization, reset countdowns, a refresh-interval picker (30 seconds to 10 minutes, default 5 minutes), and a launch-at-login toggle.
- Claude: retrieves the OAuth access token from Keychain (
Claude Code-credentials) via/usr/bin/security, then issues a GET request tohttps://api.anthropic.com/api/oauth/usagewith theanthropic-beta: oauth-2025-04-20header. - Codex: spawns the
codexbinary as a subprocess and callsaccount/rateLimits/readvia line-delimited JSON-RPC. The binary is discovered by probing common install locations (Homebrew, nodebrew, nvm, volta, asdf, fnm, ...) and falling back tocommand -v codexvia the user's login shell. A manual override is available via theUserDefaultscodexPathkey (defaults write com.token-checker.app codexPath /abs/path/codex). The launch command adapts to the installed CLI version automatically and supports bothcodex app-server daemon start+codex app-server proxy(v0.133+) and the single-argcodex app-serverform (v0.130 and earlier).
Pull the latest source and rebuild.
git pull
./Scripts/build.sh --installThe existing app is overwritten in place. Settings (polling interval, launch-at-login) persist via UserDefaults. If the app is already running, quit it from the menu bar item first, then relaunch.
killall TokenChecker
defaults delete com.token-checker.app 2>/dev/nullDistributed under the MIT License.
"Anthropic", "Claude", and "Codex" are trademarks of their respective owners. This software is not an official product of Anthropic or OpenAI, and is not endorsed or approved by either company.
This software is provided "as is", without warranty of any kind regarding operation, safety, or accuracy. The author assumes no responsibility for any damages (including but not limited to data loss, account suspension, token leakage, or security incidents) arising from use of this software. Use at your own risk.
The UI design references s-age/ccmeter (MIT License). The full MIT license text is included in LICENSE.