Skip to main content

Claude Code Usage Status Line (Update)


Claude Code Usage Status Line

Monitor your Claude Code, z.ai GLM and DeepSeek usage in real time
directly in your terminal.
Free, open source, zero configuration.

100% Freefor WindowsLinuxmacOS

Six archives: x64 and ARM64 for each of the three systems.

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

New in 1.4.1

DeepSeek joins Claude and z.ai, and session spending finally displays a figure that means something.

One line per Claude account

I switch between two Claude Code accounts with the CLAUDE_CONFIG_DIR variable, and the statusline kept showing me the figures from the first one, whichever account was actually active. It now reads this variable, and its cache and backoff are separated by account.

Deliberate corollary: data whose account is not proven is no longer displayed at all, even when marked as stale. Better for a segment to disappear than for a percentage belonging to someone else to show up.

An invalid token says so

A 401 used to get lost among the generic errors: the line stayed silent without us knowing whether the API was down or the token had expired.

It is now handled separately: the account cache is invalidated and the message is explicit. A simple token rotation no longer blocks anything, the display moves on to the next one.

Third provider: DeepSeek

I route part of my work through DeepSeek, and I wanted the same comfort as with the others: the account balance right in front of me. The line now displays it, in the currency returned by the API, without conversion.

DeepSeek exposes no spending history, only the balance. The line therefore shows a balance, as it does for z.ai. Detecting it took a little more work: my launcher tells Claude Code it is using a Claude model while the traffic goes elsewhere, and the statusline was looking for Anthropic credentials only to end up with a credentials missing even though the key was valid. It now also looks at the API address, inherited from the launcher, to know who it is really talking to.

The pictogram legend
  • ⌛ the rolling 5-hour window
  • 📅 the 7 days, across all models
  • F the current model's gauge, here Fable
  • 💰 the balance or remaining credits
  • 💸 the session spending (actual cost on an API-billed account, balance difference on z.ai and DeepSeek)
  • 🧠 the context window

The per-model gauges keep an initial (F, s, o) and not a pictogram: the label comes from the API and changes with the model, a fixed icon would eventually lie. On a minimal Linux distribution, install fonts-noto-color-emoji and everything displays.

Gauge by model and credits

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

When the window fills up and credits take over, the 💰 segment switches to detailed mode and shows the amount spent, the limit and what is left: 💰 €12.56/€14 (left €1.44). Non-migrated accounts keep the old display, with s and o.

The session cost, for real

The session cost that Claude Code calculates is estimated using the rates of the declared model. On my end, it displayed 💸 $24.64 when the entire account weighed in at $8.13 and the session had cost around $0.26. A factor of 100, meaning nothing usable.

It is now measured against the account's actual balance, recorded at the first prompt and then compared at every refresh. And z.ai benefits from it too: it had not displayed any session cost until now.

The displayed model is the one that is running

Same story on the name side: the line announced Opus 4.7 while the backend was serving DeepSeek. The displayed name now follows the actual provider.

And if no match is declared, nothing breaks: the old name stays displayed, rather than an empty box.

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

One status line. All your Claude, z.ai and DeepSeek usage data.

Auto-detected project

Displays the name of the current directory, the last part 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, GLM or DeepSeek) directly in the status bar. The provider is detected automatically.

Usage percentages

5-hour window, 7 days and current model gauge (Sonnet and Opus separated on accounts that haven't migrated), with colored indicators: green, yellow, red.

Countdown

Know exactly when your limits reset. The ↻ countdown is displayed next to each metric concerned.

Context window

Monitor your context window usage to avoid reaching the limit in the middle of a conversation.

z.ai / GLM and DeepSeek support

Display of your z.ai account balance (💰 9.88$) with automatic conversion to the currency of your choice (EUR, GBP, CAD…). The DeepSeek balance is also displayed, in its native currency and without conversion.

Stale data indicator

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

Smart cache and backoff

1-minute cache per provider to give the APIs a break. In case of a 429, automatic 5-minute backoff to avoid blowing through the rate limits.

Zero configuration (Claude)

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

What the Status Line displays depending on your subscription

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

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

z.ai configuration (GLM models)

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

Why a manual step? z.ai's billing endpoint does not accept the public API key (ZAI_API_KEY): it requires a different web session JWT. And the login endpoint is protected by a TianCaptcha (Aliyun) that blocks all automation (Selenium, Playwright, etc.). The only reliable method is therefore to copy the token from your actual 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 requested)
  3. Open DevTools with F12, go to the Network tab
  4. Refresh the page with F5
  5. Click the request named accountBalance
  6. In Headers, copy the value of Authorizationwithout the Bearer prefix (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 should you refresh the JWT?

The session JWT has no 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 asks you to follow the instructions in the new window
  • The expired data prefix (~💰) persists
  • The logs contain 401 Unauthorized

In both cases, ZaiRefresh opens on its own in a window: all that's left is to paste in a fresh JWT.

DeepSeek configuration (API key)

Simpler than z.ai: an API key is all you need, and there is no captcha in the story.

Create the key

In your DeepSeek account, under API keys, create a key. It starts with sk- and is only displayed once: copy it right away.

Giving it to the statusline

Two possibilities. The DEEPSEEK_API_KEY environment variable, or a small file that the statusline reads by itself:

{"apiKey": "sk-votre-cle"}

To be saved in ~/.claude/.deepseek-credentials.json. Nothing to refresh afterwards: an API key does not expire on its own.

Download — Version 1.4.2

Version history
1.4.2 9/10/2026Current
- Refunding the account during a session no longer freezes the session spend at zero: the new balance becomes the starting point, and spending resumes from there - Session spending applies to the account, not the Claude Code window: two sessions opened with the same key count toward each other, and resuming with --resume starts from the first original prompt (documented in the README and INSTALL) - DeepSeek: the cache is tied to the API key fingerprint; changing the key immediately displays the balance of the correct account instead of showing the old one for a minute - DeepSeek: a rejected key that is then corrected no longer displays “API key invalid” for five minutes; the block is cleared at the next prompt - The old Zai:EnvFilePath configuration key is read again when SecretEnv:EnvFilePath is absent: an appsettings.json manually edited before 1.3.0 retains its secrets source - INSTALL describes replacing the model name using the ANTHROPIC_DEFAULT_*_MODEL variables - Fix: a DeepSeek model name no longer includes the [1m] suffix - Fix: the “key not set” message now cites the variable name configured in appsettings.json instead of a hardcoded name - Fix: provider detection based on the API address also applies when Claude Code has not sent anything through standard input
1.4.1 9/10/2026
- Session spending is now measured against the account’s actual balance: with a provider other than Anthropic, the previous figure could be off by a factor of 100 - The displayed model is now the one actually running, rather than the one declared at launch - z.ai now also displays session spending, which it did not do before - New provider: the status line displays the balance of a DeepSeek account, in addition to Claude and z.ai - The provider is detected even when Claude Code reports a Claude model, eliminating a false “credentials missing” message - Fix: a state file locked by Windows no longer resets session spending to zero
1.2.3 9/9/2026
- The status line now follows the active Claude account: it reads CLAUDE_CONFIG_DIR instead of always targeting ~/.claude - Cache and backoff are now separated by account: one account’s figures no longer appear under another - Data whose account has not been verified is no longer displayed at all, even when marked as stale - An invalid token (401) is distinguished from a network outage, with an explicit message - New Windows ARM64 and Linux ARM64 versions: six platforms instead of four - macOS and Linux: the system keychain is no longer read when CLAUDE_CONFIG_DIR points to a different directory - Fix: a z.ai backoff no longer freezes the Anthropic API - Fix: the credentials file remains readable during an account switch

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 🗙