Claude Code status line

Claude Code Statusline

Claude Code statusline with rate limit display

56 stars 3 forksStatus lines Source

Install

Install
brew install jq

Found in the project README. Check it for setup steps after installing.

From source
git clone https://github.com/loadbalance-sudachi-kun/claude-code-statusline.git

From the README

Claude Code Statusline

Claude Code のステータスラインに、モデル情報・コンテキスト使用率・セッションコストをリアルタイム表示するシェルスクリプトです。

このスクリプトは すてぃお(@suthio) さんの記事を参考に作成しました。詳しい仕組みや背景の解説はこちらをご覧ください:
Claude Codeのステータスラインに使用率を出す

2つのバージョン

statusline-command.sh(推奨)

Claude Code が stdin で提供するデータのみを使用します。外部 API 呼び出しやキーチェーンアクセスは一切行いません。

statusline-command-with-usage.sh

5時間 / 7日間のレートリミット使用率をリアルタイム表示します。リセット時刻も併記されるため、いつ制限が解除されるかが一目でわかります。
⚠️ 利用規約に関する注意
このスクリプトは macOS キーチェーンから OAuth トークンを取得し、Anthropic API に直接リクエスト(Haiku probe)を送信してレートリミット情報を取得します。
Anthropic Consumer Terms of Service §3(7) では以下のように規定されています:
> *"You may not [...] access the Services through automated means (e.g., scripts) using credentials other than API Keys."*
Claude Code のキーチェーンから取得した OAuth トークンをスクリプトから使用することは、この条項に抵触する可能性があります。利用は自己責任でお願いします。

表示内容

1行目:セッション情報

2行目(推奨版):コンテキストウィンドウ詳細

使用率をプログレスバー(▰▱ × 10セグメント)で表示し、使用トークン数 / 総トークン数を併記します。

2行目(Usage 版):5時間レートリミット

5時間ウィンドウの使用率をプログレスバーで表示します。リセット時刻を Asia/Tokyo タイムゾーンで併記します。

3行目(推奨版):セッションコスト

セッションの累計 API 費用を $X.XX 形式で表示します。

3行目(Usage 版):7日間レートリミット

7日間ウィンドウの使用率を同様のプログレスバーで表示します。

カラーリング

使用率に応じて自動的に色が変わります:

インストール

1. リポジトリをクローン

2. スクリプトを配置

推奨版(ToS 準拠):

Usage 版(レートリミット表示、ToS リスクあり):

3. settings.json を設定

~/.claude/settings.json に以下を追加してください:

既に settings.json がある場合は、"statusLine" キーだけをマージしてください。

4. Claude Code を再起動

設定を反映するため、Claude Code のセッションを再起動してください。

動作要件

共通

Usage 版のみ(追加要件)

jq が未インストールの場合:

アーキテクチャ

データソース

stdin(Claude Code が自動提供)

Claude Code はステータスラインコマンドの stdin に以下の JSON を渡します:

推奨版はこの stdin のみを使用します。

Haiku プローブ(Usage 版のみ)

Usage 版は追加で Anthropic API のレスポンスヘッダーからレートリミット情報を取得します。Haiku に max_tokens: 1 の最小リクエストを送信し、以下のヘッダーを読み取ります:
なぜ /api/oauth/usage を使わないのか?
Anthropic は /api/oauth/usage という REST エンドポイントも提供していますが、アカウントのレートリミットに達している状態ではこのエンドポイント自体が 429…
Read the full README on GitHub

How status lines work

  • A status line is a command Claude Code runs to draw the bar under the prompt. It gets the session as JSON on stdin (model, folder, cost, context) and prints one or more lines.
  • Point the statusLine setting in ~/.claude/settings.json at it: { "statusLine": { "type": "command", "command": "<the command from the README>" } }.
  • Or run /statusline inside Claude Code and describe what you want.
Claude Code docs

Details

Language
Shell
License
MIT
Last updated
8 March 2026

FAQ

What is Claude Code Statusline?

Claude Code statusline with rate limit display It is a status line for Claude Code, from loadbalance-sudachi-kun/claude-code-statusline on GitHub.

How do I install Claude Code Statusline?

Run brew install jq, then follow the setup in the README.

Is Claude Code Statusline popular?

loadbalance-sudachi-kun/claude-code-statusline has 56 GitHub stars and 3 forks. It was last updated on 8 March 2026.

More status lines

Browse the most popular Claude Code mods, all status lines, or the skills and MCP server directories.