ccstatusline
The highly customizable status bar of the Claude Code CLI supports features such as powerline and themes.
Introduction
_ _ _ _
___ ___ ___| |_ __ _| |_ _ _ ___| (_)_ __ ___
/ __/ __/ __| __/ _` | __| | | / __| | | '_ \ / _ \
| (_| (__\__ \ || (_| | |_| |_| \__ \ | | | | | __/
\___\___|___/\__\__,_|\__|\__,_|___/_|_|_| |_|\___|
🎨 A highly customizable status line formatter for Claude Code CLI *Display model info, git branch, token usage, and other metrics in your terminal*
📚 Table of Contents
- Recent Updates
- Features
- Localizations
- Quick Start
- Windows Support
- Usage
- Development
- Contributing
- License
- Related Projects
🚀 Quick Start
No installation needed! Use directly with npx or bunx:
# Run the configuration TUI with npm
npx -y ccstatusline@latest
# Or use bunx, Bun's alternative to npx
bunx -y ccstatusline@latest
Startup time can vary with the package runner (npx or bunx), its cache, and your platform. If repeated status line launches are slow, consider the Pinned global install option described below to run ccstatusline directly.
Both commands launch the same TUI. During the initial setup flow, choose Pinned global install if you want Claude Code to stay on the ccstatusline version you are running instead of following @latest; the TUI will install that version globally with npm or Bun and write the pinned ccstatusline command to Claude Code settings. After a pinned install, you can run ccstatusline directly to launch the TUI in the future.
Configure ccstatusline
The interactive configuration tool provides a terminal UI where you can:
- Configure multiple separate status lines
- Add/remove/reorder status line widgets
- Customize colors for each widget
- Configure Claude Code status line refresh interval when supported
- Edit custom text widgets
- Export JSON backups and preview imported configs before replacing or merging settings
- Install/uninstall to Claude Code settings
- Preview your status line in real-time
💡 Tip: Your settings are automatically saved to ~/.config/ccstatusline/settings.json
🔧 Custom Claude Config: If your Claude Code configuration is in a non-standard location, set theCLAUDE_CONFIG_DIRenvironment variable: ``bash # Linux/macOS export CLAUDE_CONFIG_DIR=/custom/path/to/.claude``
🌐 HTTPS proxy: Usage, Claude Status and update-check requests honor uppercaseHTTPS_PROXY, with exclusions from bothNO_PROXYandno_proxy. See proxy settings for host, domain, and port matching.
🪟 Windows Support: PowerShell examples, installation notes, fonts, troubleshooting, WSL, and Windows Terminal configuration are in docs/WINDOWS.md.
🫥 Status line empty in one folder? Claude Code only runs the status line command in trusted workspaces, and nested git repositories stopped inheriting trust in Claude Code 2.1.232. See Status line empty in one folder.
🧩 Skills alwaysnonewith a wrapper script? Skills needs Claude Code hooks, which are only added when the status line command containsccstatusline. See Skills always shows none.
Claude Code settings.json format
When you install from the TUI, ccstatusline writes a statusLine command object to your Claude Code settings:
{
"statusLine": {
"type": "command",
"command": "npx -y ccstatusline@latest",
"padding": 0,
"refreshInterval": 10
}
}
refreshInterval defaults to 10 seconds on fresh installs when Claude Code supports it (>=2.1.97). Reinstalling preserves an existing value even if the version check fails. The TUI can set it to 1-60 seconds, or remove it by leaving the input empty.
Other supported command values are:
bunx -y ccstatusline@latestccstatusline(for self-managed/global installs)
The status line command runs once per repaint, so what it costs to invoke is paid over and over. Under Bun that cost depends on the specifier: bunx re-resolves the latest dist-tag against the registry on every run, because a dist-tag is not cacheable. Measured on Windows with a warm cache, median of five runs of --version, which exits before rendering:
| command | median |
|---|---|
bunx -y ccstatusline@latest | 633 ms |
bunx -y [email protected] | 202 ms |
bunx -y ccstatusline | 207 ms |
Dropping @latest is worth about 430 ms per repaint there. npm does not behave this way: npx -y ccstatusline@latest and npx -y [email protected] measured 1082 ms and 1135 ms, so pinning buys nothing under npx. A Pinned global install, which writes "command": "ccstatusline", avoids the resolution entirely on both.
For pinned installs, launch the TUI with npx -y ccstatusline@latest or bunx -y ccstatusline@latest, then choose Pinned global install. The TUI pins the active version by installing it globally and writing "command": "ccstatusline" to settings.json; afterward, you can run ccstatusline directly to open the TUI.
🆕 Recent Updates
v2.2.33 - v2.2.34 - Cache insights, daily spend, and flexible displays
Includes all 47 merged PRs and the package-size badge fix since the v2.2.33 tag.
- 💳 Extra Usage Today - Track daily extra usage across sessions and devices using a saved UTC-day baseline; without an earlier baseline, tracking starts at the first reading of the day (or zero on the first of the month).
- 📊 Prompt cache insights - New Cache Misses, Last Cache Miss, Cache Miss Tokens, and Cache If Cold widgets show Claude Code's reported cache statistics and miss causes.
- 🔮 Weekly limit forecasts - New Weekly Limit Timer and Weekly Fable Limit Timer estimate time to the weekly limit; 5-hour forecasts now disappear when the block reaches its limit.
- 🔄 Usage in idle sessions - After three minutes without a response, usage widgets can use newer API readings to reflect activity from other sessions and devices when the status line refreshes.
- 🎨 More display choices - Pick 256-color values from a live grid, add brackets and per-level colors to Thinking Effort, and use a thin line display in Context Bar.
- ⏱️ Time and speed controls - Speed widgets support rolling windows up to an hour, and Cache Timer offers labeled or compact countdowns such as
4m 52sand4m52s. - 📐 Simpler terminal width - Use Claude Code's
COLUMNSafterCCSTATUSLINE_WIDTH, with full width minus five columns for truncation and alignment; the old width modes are removed. - 🔗 Directory and Git links - Open directories in Zed, preserve plain-HTTP remote links, and resolve PRs and tracking remotes correctly when refs share a name.
- ⌨️ Reliable editing and rendering - Preserve emoji in editors and abbreviated paths, keep Nerd Font icons aligned in Ghostty and kitty, retain adjacent separators, and fix text insertion, menu focus, and color previews.
- ⚙️ Configuration and updates - Configure caches before installation, sync hooks only from the active status-line config, report settings-write failures, and improve update-check deadlines, proxies, and self-managed version detection.
- 🩹 Miscellaneous bug fixes - Preserve Custom Powerline themes and versionless modern configs; correct reset timestamps and locale formatting, stale service health, long-transcript metrics, custom-command styling, JJ colors, and cache temporary-file cleanup.
- 🔧 Maintenance - Refresh development dependencies, consolidate progress-bar rendering, and improve TUI test synchronization.
v2.2.32 - v2.2.33 - Usage forecasts, live previews, and accurate metrics
Includes all 56 PRs merged since the v2.2.32 tag.
- 🔮 Block forecasts - New Block Forecast and Block Limit Timer widgets project 5-hour usage at reset and estimate time to the limit from your recent pace.
- ⏳ Clearer block usage and countdowns - Session Usage is now Block Usage with a
5h:label; hide it at 100% and hide Block Reset Timer below 100% to swap the percentage for a reset countdown. - 💳 Gateway spend limits - New Spend Limit Usage and Spend Limit Amount widgets show gateway-reported usage percentages and dollar amounts without an extra API request.
- ⚡ Fast Mode and Extra Usage Limit - Display Claude Code's fast-mode state and your monthly extra-usage limit, with configurable formats and hide states.
- 👀 Live widget picking - Preview highlighted widgets before adding, inserting, or changing them; long picker lists scroll to keep the preview visible, and global installs no longer pause on each editor keypress.
- 🔗 Directory and status links - Open the current directory in a file manager, VS Code, or Cursor while keeping your preferred path abbreviation; Claude Status can link its text and history strip to the status page.
- 🌿 Shorter Git names - Toggle fish-style abbreviation for Git Branch and Git Worktree while branch links keep their full targets.
- 🎨 Glyph controls - Customize Remote Control Status's Nerd Font on/off glyphs and label formats, with a corrected Nerd Fonts v3 off icon; Shift+Tab clears or restores every glyph slot together.
- 📊 Accurate token and context metrics - Split or interleaved records from one API response no longer inflate token totals or speed; calculated context percentages exclude output tokens until they become input.
- ⏱️ Reliable cache and usage timing - Cache Timer prefers Claude Code's reported cache expiry; stale usage fallback drops windows that have reset, and remaining-usage bars place their cursor at time remaining.
- 👤 Account and profile isolation - Usage caches and backoff locks are separate per Claude config directory, account email follows the live credentials, and macOS credential lookups retry by username and stop further Keychain probes after a timeout.
- 🏷️ Automatic session titles - Session Name falls back to Claude Code's generated title when no custom rename exists.
- ⌨️ Clearer editing - Blinking bar cursors make trailing spaces visible, and label edits update the status-line preview before confirmation.
- 🛠️ Developer reload - Set
CCSTATUSLINE_DEV_RELOAD=1and press Ctrl+R to restart the TUI with the latest code while retaining unsaved settings and navigation. - 🩹 Miscellaneous bug fixes - Preserve manual separators across Powerline toggles and existing refresh intervals during failed version checks; fix wrapped-hook dispatch, block detection, Git/JJ counts and detached-HEAD handling, Git cache timing, install detection, default colors, memory-unit rounding, and the terminal-width menu's default label.
- 📐 Rendering and hook feedback - Hidden widgets end merges unless merged onward; 8-bit terminal colors and hyperlinks render correctly while other control sequences are removed whole, and saves explain when a wrapper command prevents widget-hook installation.
- 🔧 Maintenance - Refresh dependencies and publishing CI, and isolate install and settings tests from the real home directory and unrelated tests.
v2.2.32 - Safer imports, proxy handling, and rendering fixes
- 📥 Review imported commands - Config imports show new shell commands in full and require confirmation with Cancel selected by default; control characters are displayed as escaped text.
- 🔒 Private settings stay private - Saves preserve restrictive settings-file permissions, Claude settings backups inherit the source permissions, and installation stops rather than overwriting unreadable Claude settings.
- 🌐 Proxy exclusions and deadlines - Usage and Claude Status requests honor
NO_PROXYandno_proxyand have total five-second deadlines; JJ commands also time out after five seconds. - ⏳ Accurate cache timer state - Interrupts and local slash commands such as
/costno longer leave Cache Timer reportingHOT. - ⚡ Faster Git and text rendering - Git widgets skip unnecessary calls outside repositories and keep separate caches per working directory; text-width calculations reuse Unicode measurements, and Git file/URL parsing avoids quadratic slowdowns.
- 📏 Reliable styled-text truncation - Width limits remain correct when ANSI styling or hyperlinks split an emoji or another display cluster.
- 🛡️ Command and file handling - Update versions are validated before installation, fonts download into private temporary folders, branch/host names stay literal CLI arguments, and Skills logs reject unsafe session IDs.
- 🔄 Reliable usage backoff - Successful usage requests preserve rate-limit backoff written by concurrent renders.
v2.2.31 - Cost tracking, customization, and broad reliability improvements
Across the updates since the September 3 release, 64 PRs have been incorporated, plus additional security fixes and test isolation.
- 🩹 Miscellaneous bug fixes - 29 dedicated bug-fix PRs since September 3 cover usage/account caching, transcript reading, Git/JJ and directory displays, Unicode truncation, Powerline colors and layout, keyboard controls, settings recovery, hooks, and installation/update flows.
- 🔒 Security fixes - Three additional fixes restrict repository-controlled Git commands, resolve Windows helper executables from PATH, and filter terminal control sequences while preserving colors and hyperlinks.
- 💰 Session Cost Rate - Track session cost per hour of active API time or total session time, with a one-minute minimum before showing a rate.
- 📅 Extra Usage Daily Budget - Spread the remaining monthly spending limit over the remaining UTC days, with an option to skip future weekend days.
- 🏷️ Editable labels - Press
eto customize text labels. - ⚡ Faster rendering - Piped status lines skip loading the interactive TUI, reducing startup work on every repaint.
- 🧰 Maintenance - Shared widget and editor implementations, broader regression coverage, more reliable tests, dependency updates, and CI actions pinned to commit SHAs.
v2.2.29 - v2.2.30 - Faster rendering, command caching, and reliable usage
- ⚡ Faster terminal width detection - Linux can probe the terminal directly without subprocesses, portable fallbacks skip shell wrappers, and configurable caching reuses failed width probes across renders while detected widths refresh on the next render.
- 🔧 Custom command caching and timeouts - Opt into output caching for up to 60 seconds from Configure Status Line, and enforce command timeouts even when descendants retain output pipes.
- 🔣 More customizable Git/JJ symbols - Press
gto edit insertion/deletion signs, Git clean/dirty markers, and the JJ Revision prefix, including empty glyphs for compact layouts. - 🙈 Hide reset-timer placeholders - Block Reset Timer and Weekly Reset Timer can hide loading and error output through
h; useffor 12/24-hour format andofor weekly hours-only display. - 👤 Reliable usage account selection - macOS usage lookup respects the active config profile's Keychain credentials, and access-token refreshes preserve cached usage when the refresh token is unchanged.
- 📊 Unused model quotas show zero - Weekly model usage widgets recognize an explicit 0% quota even before the API supplies a reset timestamp.
- ↔️ Full-width layouts by default - New configurations and settings without an explicit flex mode now use Full width always.
- ⏱️ Bounded Git commands - Cached Git commands have a five-second timeout so a stalled Git invocation cannot block the status line indefinitely.
v2.2.28 - v2.2.29 - Service health, flexible formatting, and resilient rendering
- 🩺 Claude service health - Added a
Claude Statuswidget with live severity, a cached 48-hour incident-history strip, stale-data fallback, and graceful?output when status data is unavailable. - 🙈 Unified conditional hiding - Numeric, Git, JJ, usage, cache, and other widgets now share an
hchecklist for supported hide conditions, with automatic migration of existing settings and optional merge-target hiding for decorative text or symbols. - 🔢 Configurable number formatting - Numeric widgets can use precise, compact, or whole-number styles per widget or globally by token, speed, percent, memory, and cost type, while advanced configs can set decimal precision explicitly.
- 📜 Faster, reliable large-session rendering - Transcript-backed token, duration, speed, compaction, effort, and session-name metrics now stream JSONL records through one shared scan instead of loading an entire transcript into a single string, while no-active-block results are briefly cached to avoid repeated full-history scans.
- ⚠️ Git conflict display controls - Git Conflicts can hide when the count is zero or show either
⚠0or a customizable clean glyph when the tree is conflict-free. - 🩹 Self-healing usage locks - Usage widgets ignore impossible fetch-lock deadlines more than 24 hours ahead, allowing poisoned locks caused by clock jumps or old test artifacts to recover on the next render.
- 🧹 Bounded Git cache cleanup - Failed persistent Git-cache writes clean up their temporary file and reuse one stable fallback name, preventing Windows file locks from leaking thousands of orphaned temp files.
- 📊 Consistent timer bars - Block Timer, Block Reset Timer, and Weekly Reset Timer now round progress-bar fill to the nearest cell, matching the other progress widgets.
v2.2.27 - Portable configuration import and export
- 📦 Config import/export - Export the current TUI configuration to JSON, validate and preview imports, then replace all settings or merge only supplied fields while preserving local installation metadata and leaving the result unsaved for review.
v2.2.25 - v2.2.26 - Fable usage, migrated usage API support, compaction accuracy, and rendering reliability
- 🪄 Weekly Fable usage - Added a
Weekly Fable Usagewidget with percentage, progress-bar, remaining-mode, and time-cursor controls. - 📊 Reshaped usage API support - Session and all-model weekly usage can fall back to the newer
limits[]response, while Sonnet, Opus, and Fable weekly widgets read authoritativeweekly_scopedentries so migrated accounts do not show stale or frozen values. - 🧠 Correct post-compaction context - Context length and percentage widgets reset immediately from
compact_boundary.postTokensafter/compact, then switch to the first new turn instead of retaining the pre-compaction size. - 🧹 Reliable hidden-widget separators - Manual separators now look past widgets that render empty, preserve the intended visible boundary, and inherit colors from the actual preceding visible widget.
- ⚡ Non-blocking Git PR/CI refreshes - Git PR and CI widgets render from a versioned disk cache while stale data refreshes in the background, preventing slow
ghcalls from blocking the status line.
v2.2.22 - v2.2.24 - Powerline flex mode, cache/CI/sandbox visibility, layout controls, composable metrics, and safer config
- ⏳ Prompt cache timer - Added a
Cache Timerwidget with liveHOTstate, TTL countdown, configurable 5-minute/1-hour windows, and customizable state glyphs. - ✅ GitHub CI status - Added a
Git CI Statuswidget that summarizes failing, pending, and successful checks for the current branch's pull request. - 🔒 Sandbox status - Added a
Sandbox Statuswidget with glyph, text, and Nerd Font formats that follows Claude Code's layered sandbox setting on each refresh. - ↔️ One-sided default padding - Default widget padding can now apply to both sides, the left only, or the right only in standard and Powerline layouts.
- ⚡ Powerline flex mode - Flex separators now work in Powerline mode, letting Powerline status lines right-align content or absorb available width. <