n-hiraha

Claude Codex Usage — Development skill for Claude Code

Development community

Go CLI for Claude Code & Codex usage in tmux: multi-account gauges, rate limits, and reset times.

How to install Claude Codex Usage

This entry records only its repository, not the path inside it, so there is no exact command to give. Open n-hiraha/claude-codex-usage and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

What Claude Codex Usage does

Go CLI for Claude Code & Codex usage in tmux: multi-account gauges, rate limits, and reset times. 単体バイナリで使用量・リセット日時を常時表示。

Alternatives in Development

  • Ccusage — CLI for analyzing Claude Code/Codex usage from local JSONL files 11.8k ★
  • Claude Swap — Switch between multiple Claude Code accounts, with automatic rate-limit rotation, usage dashboard, and paralle 2k ★
  • Codenotch — A macOS app that pins usage limits from Claude Code, Cursor, Codex, and Antigravity to a screen edge 1.3k ★

README

claude-codex-usage — Claude Code / Codex Usage Monitor

tmuxで動かしているClaude Code・Codex・Geminiの状態と、複数アカウントの利用枠を確認できるCLIです。承認待ちの確認、ペインへの移動、ステータスバーへの使用量ゲージ表示に対応しています。

This is a small, standard-library-only Go CLI for monitoring Claude Code, Codex, and Gemini panes in tmux and displaying multi-account usage limits. It runs locally; the provider CLIs (`codex` and `claude`, when usage collection is enabled) remain required.

![claude-codex-usage ステータスバーの表示例](docs/statusbar.svg)

上の画像は各枠を見やすく展開した説明図(サンプル値)です。実際のtmuxではCodexとClaudeをそれぞれ1行にまとめます。ゲージの塗りつぶしが使用済み、背景部分が残りです。`7d`は7日枠を表し、取得できる場合は次回リセット日時(例:`↻9/16 18:00`)も表示します。色だけに頼らず、`使用`(使用済み)を文字でも表示します。

起動

[Releases](https://github.com/n-hiraha/claude-codex-usage/releases/latest)からOS・CPUに合ったファイルをダウンロードして展開すると、実行ファイル1つで使えます。**実行時にGoやNode.jsは不要です。** tmuxと、使用量を取得するCodex・Claude CLIは別途必要です。

環境 ファイル名の末尾
Mac(Apple Silicon) darwin-arm64.tar.gz
Mac(Intel) darwin-amd64.tar.gz
Linux(x86_64) linux-amd64.tar.gz
Linux(ARM64) linux-arm64.tar.gz

展開したフォルダで`./claude-codex-usage usage --demo`を実行すると、ログインなしで表示を試せます。配布ファイルの検証用に`SHA256SUMS`も付属します。macOSの配布バイナリは署名・公証していないため、初回起動時にOSの確認が必要になる場合があります。

以下はソースからビルドする場合の手順です(Go 1.24以上・makeが必要)。

git clone https://github.com/n-hiraha/claude-codex-usage.git
cd claude-codex-usage

make build
MONITOR=./dist/claude-codex-usage

# 画面を試す(tmuxセッション不要)
$MONITOR watch --demo

# 実際のセッションを表示
$MONITOR status
$MONITOR watch
$MONITOR attention
$MONITOR status --json
$MONITOR watch --agent codex --bell
$MONITOR watch --attention

# tmux内で実行。表示されたペインIDを指定
$MONITOR jump %3

`watch`は2秒ごとに更新し、画面に表示されている番号の`1`〜`9`で移動、`q`またはCtrl-Cで終了します。デモ表示では移動しません。パイプやTTYのない環境では一度だけ表示します。`--interval 5`で更新間隔を変更できます。独立したtmuxサーバーには`--socket NAME`(`tmux -L NAME`)を指定します。

`a`で全状態と承認待ち・入力待ちの表示を切り替えます。`--agent claude|codex|gemini`で対象AIを絞れます。番号キーはそのとき画面に表示されている一覧に対応します。

`--bell`は、ライブ表示中に新たな承認待ち、または応答中・ツール実行から入力待ちへの変化を検出したとき、ターミナルベルを鳴らします。起動時の一覧や同じ状態のままの更新では鳴らしません。実際に音が鳴るかはターミナルの設定に