Add a Super‑Cool Status Bar to Claude Code for Real‑Time Model, Token, and Git Insights
This article introduces the open‑source ccstatusline tool for Claude Code CLI, explains its real‑time status bar features—including model name, token usage, cost estimation, and Git information—shows how to install it via Claude or manually, and guides users through interactive TUI configuration.
What is ccstatusline
ccstatusline is a terminal status‑line utility for the Claude Code CLI. It continuously displays model name, Git branch, token usage, context usage, cost estimation, and real‑time speed at the bottom of the terminal.
Core features
Token and cost monitoring
The status line shows input tokens, output tokens, total tokens, and the estimated cost in US dollars for the current session. It also provides a token‑speed component (tokens per second) configurable with a sliding window from 0 to 120 seconds; 0 displays the average speed for the whole session, while 30 displays the speed over the most recent half‑minute.
Context visualization
When the context window approaches its limit, Claude performs automatic compaction. ccstatusline offers components for context length, percentage, progress bar, and a Compaction Counter that shows how many compressions have occurred, helping users decide when to start a new conversation.
Git information
Beyond the branch name, the status line can display staged file count, unstaged file count, conflict count, ahead/behind status, commit SHA, pull‑request information (GitHub and GitLab), added lines, and deleted lines. The Git branch component can be made clickable to open the branch URL in a browser.
Powerline theme
Multiple built‑in themes use arrow separators and gradient colors. They support 16‑color, 256‑color, and true‑color modes, allowing extensive visual customization.
Interactive TUI configuration
An interactive terminal UI lets users add, remove, reorder, and recolor any of the 70 available components, switch themes, and preview changes in real time. A fuzzy‑search feature helps locate components quickly.
Installation
Method 1: Claude Code assisted installation
Paste the repository URL into the Claude Code terminal to let Claude install the tool. After installation, run ccstatusline-zh setup manually to configure the status line.
Method 2: Manual installation
Global installation (recommended): npm install -g ccstatusline-zh Non‑global installation: npx -y ccstatusline@latest After installing, edit the Claude settings file ( ~/.claude/settings.json on Unix or %USERPROFILE%\.claude\settings.json on Windows) and add:
{
"statusLine": {
"type": "command",
"command": "ccstatusline-zh",
"padding": 0,
"refreshInterval": 10
}
}Restart Claude Code to activate the status line. The refreshInterval accepts values from 1 to 60 seconds; versions earlier than 2.1.97 do not support this field.
Custom configuration
Run ccstatusline-zh setup to launch the TUI configuration interface. Users can select any of the 70 components, arrange their order, and adjust colors or themes.
Project links
Original repository: https://github.com/sirmalloc/ccstatusline
Chinese version: https://github.com/huangguang1999/ccstatusline-zh
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
Java Tech Enthusiast
Sharing computer programming language knowledge, focusing on Java fundamentals, data structures, related tools, Spring Cloud, IntelliJ IDEA... Book giveaways, red‑packet rewards and other perks await!
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
