Claude Code Usage Status Line (Update)

Claude Code Usage Status Line

Monitor your Claude Code & Z.ai GLM consumption in real-time
directly in your terminal.
Free, open source, zero configuration.

100% Freefor WindowsLinuxmacOS

claude-code : status line (Claude mode)
Brol | Fable 5 (xhigh) | ⌛ 5% ↻ 4h10 | 📅 15% ↻ 141h | F 3% ↻ 142h | 🧠 20%
claude-code : status line (z.ai / GLM mode)
Brol | GLM-5.1 | 💰 9.88€ | 🧠 20%

New in 1.2.1

Text labels are replaced by colored icons, and they finally display correctly on all three systems.

Icons instead of labels
  • the sliding window of 5 hours
  • 📅 the 7 days, all models combined
  • F the gauge of the current model, here Fable
  • 💰 the balance or remaining credits
  • 💸 the cost of the session, on an account billed to the API
  • 🧠 the context window

Model gauges keep an initial (F, s, o) and not an icon: the label comes from the API and changes with the model, a fixed icon would eventually lie.

Readable on all three OS

On Linux, the old session symbol displayed a square. It wasn't an encoding issue, the output is indeed in UTF-8: the character existed in a Unicode block that monospace fonts simply do not cover.

The selected icons are emoji with default color presentation, so rendered by Segoe UI Emoji, Apple Color Emoji, or Noto Color Emoji depending on the system. On a minimal Linux distribution, install fonts-noto-color-emoji and it's sorted.

Gauge by model and credits

On migrated accounts, Anthropic no longer returns two fixed gauges Sonnet and Opus but a weekly window attached to the current model. The displayed letter thus follows the model, F for Fable.

When the window saturates and the credits take over, the segment 💰 switches to detailed mode and shows the spent, the cap, and the remainder: 💰 €12.56/€14 (left €1.44). Non-migrated accounts retain the old display, with s and o.

Condensed directory

Instead of displaying ~/My Projects/Brol, the statusline now only displays Brol. The full path is rarely useful in a terminal already positioned in the project: the sheet is enough to navigate, and it frees up space for metrics.

A prefix ~ appears before a value (for example ~5%) when the data is outdated, meaning when the cache has expired but the API is in backoff 429 or unavailable.

Status line at the bottom of Claude Code

Status line displayed at the bottom of the Claude Code window

Everything you need, at a glance

A status line. All your usage data for Claude & z.ai.

Auto-detected project

Displays the name of the current directory (leaf of the path). You always know which project you are working on, without cluttering the line with the full path.

Active Model

See which model is being used (Opus, Sonnet, Haiku, or GLM) directly in the status bar. The provider is detected automatically.

Usage Percentages

5-hour, 7-day window, and gauge of the current model (Sonnet and Opus separated on non-migrated accounts), with colored indicators: green, yellow, red.

Countdown

Know exactly when your limits reset. The countdown appears next to each relevant metric.

Context Window

Monitor your context window usage to avoid hitting the limit mid-conversation.

z.ai / GLM Support

Display of your z.ai account balance (💰 9.88$) with automatic conversion to your chosen currency (EUR, GBP, CAD…).

Stale Data Indicator

A prefix ~ before a value indicates that the cache has expired but the API is unavailable (backoff 429). You always know what you are reading.

Smart Cache and Backoff

1-minute cache per provider to ease the APIs. In case of 429, automatic backoff of 5 minutes to avoid hitting the rate limits.

Zero Configuration (Claude)

Run the installer and that's it. Reads your Claude credentials automatically from ~/.claude/.credentials.json (and the Keychain on macOS).

What the Status Line Displays Based on Your Subscription

The Status Line automatically adjusts to your plan and displays the relevant metrics.

Free
⌛ 5 hours + 📅 7 days
Pro
⌛ + 📅 + 💰 credits
Max
⌛ + 📅 + F + 💰 credits
z.ai / GLM
💰 account balance

z.ai Configuration (GLM models)

If you are using Claude Code with a GLM model (glm-5.1, etc.) via z.ai, a small additional configuration is needed to display your balance.

Why a manual step? The z.ai billing endpoint does not accept the public API key (ZAI_API_KEY): it requires a web session JWT instead. And the login endpoint is protected by a captcha TianCaptcha (Aliyun) that blocks any automation (Selenium, Playwright, etc.). Therefore, the only reliable method is to copy the token from your real browser.
Step 1: Retrieve the JWT
  1. Open z.ai/manage-apikey/billing in your usual browser
  2. Log in (and solve the captcha if prompted)
  3. Open DevTools with F12, go to the Network tab
  4. Refresh the page with F5
  5. Click on the request named accountBalance
  6. In Headers, copy the value of Authorization without the prefix Bearer (the token starts with eyJhbGciOiJIUzUxMiJ9)
Step 2: Save the JWT

A companion binary ClaudeUsageStatusline.ZaiRefresh is provided with the installation. It validates the token format and writes it to ~/.claude/.zai-credentials.json.

Windows:

& "$env:LOCALAPPDATA\ClaudeUsageStatusLine\ClaudeUsageStatusline.ZaiRefresh.exe"

Linux / macOS :

~/.local/bin/ClaudeUsageStatusline.ZaiRefresh
Step 3 (optional) : display currency

The balance is returned in USD by default. To display it in EUR (or any other currency), edit appsettings.json next to the executable :

{
  "Zai": {
    "NativeCurrency": "USD",
    "DisplayCurrency": "EUR",
    "ExchangeRateCacheHours": 24
  }
}

Rates are retrieved once a day from a free API and cached locally.

When to refresh the JWT?

The session JWT does not have an explicit expiration date: its lifespan is controlled by the z.ai servers. It will eventually be invalidated after a period of inactivity or an explicit logout.

Signs that it needs to be renewed:

  • The statusline displays z.ai: token missing and prompts you to follow the instructions in the new window
  • The expired data prefix (~💰) persists
  • The logs contain 401 Unauthorized

In both cases, ZaiRefresh opens automatically in a window: you just need to paste a fresh JWT.

Download — Version 1.2.1

Version history
1.2.1 7/30/2026Current
- The segment labels become colored icons: ⌛ for the 5-hour window, 📅 for the 7 days, 💰 for the balance and credits, 💸 for the session cost, 🧠 for the context window - Fix the display on Linux, where the old session symbol appeared as a square: it was in a Unicode block that monospace fonts do not cover - The gauges by model keep their initial ("F", "s", "o"), because the label comes from the API and changes with the model - On a minimal Linux distribution, install the package fonts-noto-color-emoji for the icons to display
1.2.0 4/11/2026
- New weekly gauge per model on migrated accounts: the letter of the current model (for example "F" for Fable) with its percentage and countdown - Display of credits when the subscription window is saturated: amount spent, cap, and remaining balance - Support for the new format returned by the Anthropic usage API, with automatic fallback to the old one for non-migrated accounts - The currency symbol follows the currency returned by the API
1.1.2 7/19/2026
- New display of "Fable" with the letter "F" and consumption for MAX subscriptions - Bugs fixed
Join the conversation

You need an account to comment on this article. Creating one is free and takes under a minute.

  • The XMLTV file, free to download every day
  • Comment on articles and reply to other readers
  • Get an e-mail when an article you follow is updated

No comments yet.

Une erreur s'est produite. Cette application peut ne plus répondre jusqu'à ce qu'elle soit rechargée.Veuillez contacter l'auteur. Reload 🗙