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
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
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.
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.
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
- Open z.ai/manage-apikey/billing in your usual browser
- Log in (and solve the captcha if prompted)
- Open DevTools with F12, go to the Network tab
- Refresh the page with F5
- Click on the request named
accountBalance - In Headers, copy the value of
Authorizationwithout the prefixBearer(the token starts witheyJhbGciOiJIUzUxMiJ9)
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.ZaiRefreshStep 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 missingand 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.

Join the conversation
You need an account to comment on this article. Creating one is free and takes under a minute.
No comments yet.