Claude Code Usage Status Line

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 | Opus-4.6 | ⟗ 5% ↻ 4h10 | Σ 15% ↻ 141h | s 3% ↻ 142h | o 62% ↻ 142h | Ctx: 20%
claude-code — status line (z.ai / GLM mode)
Brol | GLM-5.1 | Bal: 9.88€ | Ctx: 20%

New compact format (v1.0.5)

More info, less space. The status line now only displays the name of the current folder (the leaf of the path) and replaces textual labels with compact Unicode icons.

Icons instead of labels
  • — Session (sliding window of 5 hours)
  • Σ — All models combined (7 days)
  • s — Sonnet only (Claude Max)
  • o — Opus only (Claude Max)
  • Ctx — Current context window
Condensed directory

Instead of displaying ~/My Projects/Brol, the status line now only shows Brol. The full path is rarely useful in a terminal already positioned in the project — the leaf is enough to locate yourself, and frees up space for metrics.

A prefix ~ appears before a value (e.g., ~5%) when the data is stale — the cache has expired but the API is in backoff 429 or unavailable.

Status line at the bottom of Claude Code

 

Everything you need, at a glance

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

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 automatically detected.

Usage percentages

Session, all models, Sonnet and Opus separated 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

New: display your z.ai account balance (Bal: 9.88$) with automatic conversion to your currency of choice (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 & Backoff

1-minute cache per provider to spare the APIs. In case of 429, automatic backoff of 5 minutes to avoid blowing 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 according to your subscription

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

Free
⟗ Session + Σ All
Pro
⟗ + Σ + Extra (€)
Max
⟗ + Σ + s + o + Extra (€)
z.ai / GLM
Bal: 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 little extra configuration is needed to display your balance.

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 Authorizationwithout 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
    }
  }

The 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 Bal: error
  • The prefix ~Bal: (stale data) persists
  • The logs contain 401 Unauthorized

Just restart ZaiRefresh and paste a fresh JWT.

Téléchargement — Version 1.0.5

Nouveautés de cette version
- Support multi-provider z.ai (GLM) : affichage du solde du compte z.ai avec conversion de devise automatique (USD→EUR, etc.) - Outil ZaiRefresh : binaire compagnon qui guide l'utilisateur pour rafraîchir son JWT de session z.ai depuis le navigateur (onglet Network des DevTools) - Boucle infinie 429 sur l'API Claude cassée : les valeurs Retry-After < 30s sont désormais ignorées (évite que le statusline se suicide silencieusement contre le rate limit) - Caches séparés par provider (usage-claude.json / usage-zai.json) : fini les 0% partout quand z.ai écrasait les données Claude - Indicateur de données obsolètes (~) quand le cache est expiré mais l'API refuse (429/backoff) - Crash ContextService sur propriétés JSON nulles corrigé (Claude Code envoie parfois current_usage: null)

Aucun commentaire pour le moment.

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