ClaudeMods
☰
JA
● 0 人がオンライン ・閲覧 0 回
スポンサー作品を投稿
GitHub リポジトリ · 投稿者 shelltime

shelltime-statusline

Claude Code の ShellTime ステータスライン。Git、モデル、セッションと日次コスト、クォータ、エージェント時間、コンテキストをターミナルとデスクトップアプリに表示します。

shelltime@shelltime

shelltime/claude-code-mods/tree/main/plugins/shelltime-statusline

翻訳済み

この mod について

shelltime-statusline

ShellTime のステータスラインを Claude Code の mod として表示します。プロンプトの上にあるバンドに ShellTime ステータスラインを描画します。ターミナルと Claude デスクトップアプリの Code タブで動作します。後者では settings.json の statusLine コマンドが描画されません。

ターミナルでは shelltime cc statusline と同じ 1 行を Claude Code のテーマカラーで表示するため、/theme に従います:

🌿 main* | 🤖 Opus 5.5 | 💰 $1.23 | 📊 $12.50 | 🚦 5h:23% 7d:45% | ⏱️ 1h5m | 📈 42%

デスクトップアプリでは、境界線やパディングのない平らな 1 行を、ライトテーマとダークテーマの両方で読める色調で表示します。クォータとコンテキストの各パーセントの横には細いバーを表示します。コンポーザーのフッターにすでに表示されるため、デスクトップではモデルを省きます。

🌿 main*   💰 $1.23   📊 $12.50   🚦 5h ━━── 23%  7d ━━━─ 45%   ⏱️ 1h5m   📈 ━━── 42%

| セグメント | 表示内容 | 色 | リンク | | --- | --- | --- | --- | | 🌿 | Git ブランチ。ツリーが dirty のときは * | 緑。リポジトリ外では灰色の - | | | 🤖 | モデル(ターミナルのみ) | | | | 💰 | このセッションのコスト | シアン | shelltime.xyz のセッション | | 📊 | 今日の Claude Code のコスト | 黄色(デスクトップではアンバー)。データがない場合は灰色の - | coding agent のページ | | 🚦 | 使用済みの 5 時間・7 日クォータ | 緑、50% から黄色、80% から赤。デスクトップでは各バケットに個別のバーと色 | claude.ai の使用量 | | ⏱️ | 今日の AI エージェント時間 | マゼンタ。データがない場合は灰色の - | プロフィール | | 📈 | 使用済みのコンテキストウィンドウ。デスクトップではバー付き | 緑、50% から黄色、80% から赤 | |

インストール

claude plugin marketplace add shelltime/claude-code-mods
claude plugin install shelltime-statusline@shelltime

同じマシンのデスクトップセッションは、同じインストール済みプラグインを読み込みます。

設定

この mod に設定項目はありません。CLI と同じ順序で、ShellTime CLI 自身の設定ファイル ~/.shelltime/config.yaml(または .yml / .toml。config.local.* を上書きマージ)を読み取ります。shelltime init を 1 回実行すると、mod がトークンを取得します。ファイルの変更は次の更新で反映されます。

shelltime バイナリやそのデーモンは必要ありません。トークンがなくても Git、モデル、セッションコスト、クォータ、コンテキストを表示します。日次コストとエージェント時間は - になり、ShellTime には何も送信しません。

数値の出どころ

| | shelltime cc statusline | この mod | | --- | --- | --- | | git | デーモンが git を実行 | 同じ git コマンド(GIT_OPTIONAL_LOCKS=0)を実行 | | モデル、セッションコスト、コンテキスト | Claude Code のステータスライン JSON | 同じ値を Claude Code から直接取得 | | クォータ | デーモンが Keychain の OAuth トークンで Anthropic の使用量 API を呼び出す | Claude Code が直前の API レスポンスからすでに読んだレート制限。Keychain にアクセスせず、どの OS でも動作 | | 日次コスト、エージェント時間 | デーモンが ShellTime API に問い合わせる | 同じ GraphQL クエリを最大 15 s ごとに実行 | | セッション → プロジェクトの対応 | ShellTime API に送信 | 同じリクエストをセッションとディレクトリごとに 1 回 |

ネイティブのステータスラインと同様に、会話が変わると更新します。プロンプト送信時、各ツール呼び出し後、ターン終了時です。セッションがアイドル中はポーリングしません。

ターミナル

~/.claude/settings.json に shelltime cc statusline を実行する statusLine もある場合、ターミナルには両方の行が表示されます。両方を残すことも、一方を削除することもできます。

インストール

まず作者の README で marketplace とプラグイン名を確認してください。コマンドはリポジトリの構成によって変わる場合があります。

claude plugin marketplace add shelltime/claude-code-mods
claude plugin install shelltime-statusline
原文 / README

shelltime-statusline

The ShellTime statusline as a Claude Code mod. It draws the ShellTime statusline in a band above the prompt. It runs in the terminal and in the Code tab of the Claude desktop app, where the statusLine command from settings.json is not drawn.

In the terminal it is the same line as shelltime cc statusline, in Claude Code's theme colors, so it follows /theme:

🌿 main* | 🤖 Opus 5.5 | 💰 $1.23 | 📊 $12.50 | 🚦 5h:23% 7d:45% | ⏱️ 1h5m | 📈 42%

In the desktop app it is one flat row, with no borders or padding, in tones that read on the light and the dark theme. Quota and context get a thin bar beside each percentage. The model is left out there, since the composer's footer already shows it.

🌿 main*   💰 $1.23   📊 $12.50   🚦 5h ━━── 23%  7d ━━━─ 45%   ⏱️ 1h5m   📈 ━━── 42%

| Segment | Shows | Color | Link | | --- | --- | --- | --- | | 🌿 | Git branch, with * when the tree is dirty | green, gray - outside a repo | | | 🤖 | Model (terminal only) | | | | 💰 | This session's cost | cyan | the session on shelltime.xyz | | 📊 | Today's Claude Code cost | yellow (amber on desktop), gray - with none | your coding agent page | | 🚦 | 5-hour and 7-day quota used | green, yellow from 50%, red from 80%; on desktop each bucket has its own bar and color | claude.ai usage | | ⏱️ | Today's AI agent time | magenta, gray - with none | your profile | | 📈 | Context window used, with a bar on desktop | green, yellow from 50%, red from 80% | |

Install

claude plugin marketplace add shelltime/claude-code-mods
claude plugin install shelltime-statusline@shelltime

Desktop sessions on the same machine load the same installed plugins.

Configuration

There is nothing to configure in the mod. It reads the ShellTime CLI's own config file, ~/.shelltime/config.yaml (or .yml / .toml, with config.local.* merged over it), in the same order the CLI does. Run shelltime init once and the mod picks up your token. Changes to the file are picked up on the next refresh.

The mod doesn't need the shelltime binary or its daemon. Without a token it still shows git, model, session cost, quota and context. Daily cost and agent time show -, and nothing is sent to ShellTime.

Where the numbers come from

| | shelltime cc statusline | this mod | | --- | --- | --- | | git | the daemon runs git | runs the same git commands (GIT_OPTIONAL_LOCKS=0) | | model, session cost, context | Claude Code's statusline JSON | the same figures, from Claude Code directly | | quota | the daemon calls Anthropic's usage API with the OAuth token from the Keychain | the rate limits Claude Code already read from its last API response. No Keychain access, works on any OS | | daily cost, agent time | the daemon queries ShellTime's API | the same GraphQL query, at most once every 15 s | | session → project mapping | sent to ShellTime's API | the same request, once per session and directory |

Like the native statusline, it refreshes as the conversation changes: when you send a prompt, after each tool call, and when a turn ends. It doesn't poll while the session is idle.

Terminal

If ~/.claude/settings.json also has a statusLine running shelltime cc statusline, the terminal shows both lines. Keep both, or remove one.

関連作品