ccstatusline README

The project's README from github.com/sirmalloc/ccstatusline. As one markdown file: README.md.

              _        _             _ _            
  ___ ___ ___| |_ __ _| |_ _   _ ___| (_)_ __   ___ 
 / __/ __/ __| __/ _` | __| | | / __| | | '_ \ / _ \
| (_| (__\__ \ || (_| | |_| |_| \__ \ | | | | |  __/
 \___\___|___/\__\__,_|\__|\__,_|___/_|_|_| |_|\___|
                                                     

ccstatusline

🎨 A highly customizable status line formatter for Claude Code CLI Display model info, git branch, token usage, and other metrics in your terminal

npm version npm downloads License: MIT Node.js Version install size Maintenance

Mentioned in Awesome Claude Code ClaudeLog - A comprehensive knowledge base for Claude

Demo


📚 Table of Contents


🆕 Recent Updates

v2.2.28 - v2.2.29 - Service health, flexible formatting, and resilient rendering

v2.2.27 - Portable configuration import and export

v2.2.25 - v2.2.26 - Fable usage, migrated usage API support, compaction accuracy, and rendering reliability

v2.2.22 - v2.2.24 - Powerline flex mode, cache/CI/sandbox visibility, layout controls, composable metrics, and safer config

Powerline Flex Mode

v2.2.21 - Cache widgets, compaction details, extra usage currency, and package fixes

v2.2.20 - Gradients, token accuracy, usage reliability, and Git PR/MR fixes

v2.2.14 - v2.2.19 - Version pinning, npm provenance, usage overage widgets, and Git lock avoidance

v2.2.13 - Weekly model usage, voice status, hooks, and docs

v2.2.9 - v2.2.12 - GitLab support, reset timers, context, compaction, and git widgets


Older updates (v2.2.8 and earlier)

v2.2.8 - Git widgets, smarter picker search, and minimalist mode

  • 🔀 New Git PR widget - Added a Git PR widget with clickable PR links plus optional status and title display for the current branch.
  • 🧰 Major Git widget expansion - Added Git Status, Git Staged, Git Unstaged, Git Untracked, Git Ahead/Behind, Git Conflicts, Git SHA, Git Origin Owner, Git Origin Repo, Git Origin Owner/Repo, Git Upstream Owner, Git Upstream Repo, Git Upstream Owner/Repo, Git Is Fork, Git Worktree Mode, Git Worktree Name, Git Worktree Branch, Git Worktree Original Branch, and Custom Symbol.
  • 👤 Claude Account Email widget - Added a session widget that reads the signed-in Claude account email from ~/.claude.json while respecting CLAUDE_CONFIG_DIR.
  • 🧼 Global Minimalist Mode - Added a global toggle in Global Overrides that forces widgets into raw-value mode for a cleaner, label-free status line.
  • 🔎 Smarter widget picker search - The add/change widget picker now supports substring, initialism, and fuzzy matching, with ranked results and live match highlighting.
  • 📏 Better terminal width detection - Flex separators and right-alignment now work more reliably when ccstatusline is launched through wrapper processes or nested PTYs.
  • 🎨 Powerline theme continuity - Built-in Powerline themes can now continue colors cleanly across multiple status lines instead of restarting each line.
  • 🚀 New Token Speed widgets - Added three widgets: Input Speed, Output Speed, and Total Speed.
    • Each speed widget supports a configurable window of 0-120 seconds in the widget editor (w key).
    • 0 disables window mode and uses a full-session average speed.
    • 1-120 calculates recent speed over the selected rolling window.
  • 🧩 New Skills widget controls (v2.2.1) - Added configurable Skills modes (last/count/list), optional hide-when-empty behavior, and list-size limiting with most-recent-first ordering.
  • 🌐 Usage API proxy support (v2.2.2) - Usage widgets honor the uppercase HTTPS_PROXY environment variable for their direct API call to Anthropic.
  • 🧠 New Thinking Effort widget (v2.2.4) - Added a widget that shows the current Claude Code thinking effort level.
  • 🍎 Better macOS usage lookup reliability (v2.2.5) - Improved reliability when loading usage API tokens on macOS.
  • ⌨️ New Vim Mode widget (v2.2.5) - Added a widget that shows the current vim mode, with ASCII and optional Nerd Font icon display.
  • 🔗 Git widget link modes (v2.2.6) - Git Branch can render clickable GitHub branch links, and Git Root Dir can render clickable IDE links for VS Code and Cursor.
  • 🤝 Better subagent-aware speed reporting - Token speed calculations continue to include referenced subagent activity so displayed speeds better reflect actual concurrent work.
  • 🧩 New Usage widgets (v2.1.0) - Added Session Usage, Weekly Usage, Block Reset Timer, and Context Bar widgets.
  • 📊 More accurate counts (v2.1.0) - Usage/context widgets now use new statusline JSON metrics when available for more accurate token and context counts.
  • 🪟 Windows empty file bug fix (v2.1.1) - Fixed a Windows issue that could create an empty c:\dev\null file.
  • 🔗 New Link widget (v2.1.3) - Added a new Link widget with clickable OSC8 rendering, preview parity, and raw mode support.
  • ➕ New Git Insertions widget (v2.1.4) - Added a dedicated Git widget that shows only uncommitted insertions (e.g., +42).
  • ➖ New Git Deletions widget (v2.1.4) - Added a dedicated Git widget that shows only uncommitted deletions (e.g., -10).
  • 🧠 Context format fallback fix (v2.1.6) - When context_window_size is missing, context widgets now infer 1M models from long-context labels such as [1m] and 1M context in model identifiers.
  • **⏳ Wee

ccstatusline (sirmalloc/ccstatusline)

Searching Database…

这是什么?ccstatusline 是一个高度可定制的 Claude Code 命令行状态栏,可以在你的终端里直接显示模型信息、git 分支、token 用量等各种指标。
怎么把它装到我的 Claude Code 终端里?安装这个 npm 包——默认流程是固定版本的全局安装——然后用自带的 TUI 界面排布小组件,并把 statusLine 条目写入 Claude Code 的设置。
要让所有小组件都能用,我电脑上还需要装什么?安装需要 Node.js 14 或更新版本,以及 npm 或 Bun;分支类小组件需要 git;想要拉取请求和 CI 状态小组件的话,需要 gh 或 glab 命令行工具。
哪些功能需要更新的 Claude Code 或额外的工具?设置刷新间隔需要 Claude Code 2.1.97 或更新版本;用量小组件在 Claude Code 的用量数据返回之前会显示加载占位符;PR/MR 小组件需要装好 gh 或 glab。
在 Windows 上能用吗?明确支持 Windows:辅助进程在后台隐藏窗口运行,git 缓存也针对 Windows 的文件锁问题做了规避;作为 Node 命令行工具,它同样可以在 macOS 和 Linux 上运行。
状态栏里我能自定义哪些东西?小组件的选择和顺序、按小组件或整行设置的颜色渐变、暗淡样式、内边距、数字格式、条件隐藏,以及带弹性分隔符的 Powerline 模式——全部在 TUI 界面里编辑。
它自带哪些小组件?模型信息、上下文长度和百分比、token 计数、按 Sonnet/Opus/Fable 分类的会话和每周用量、5 小时区块和重置倒计时、压缩次数、缓存命中/读取/写入、git 分支、PR/MR 和 CI 状态、沙盒和语音状态、Claude 服务健康状态,以及自定义命令。
Claude Code 会话时间长了会拖慢状态栏吗?不会。token、时长和速度等指标是通过一次共享扫描从会话记录里流式读取的,而不是把整个记录加载进来;没有活跃区块的结果还会短暂缓存,避免反复扫描完整历史。
我能把配置迁移到另一台电脑上吗?可以——TUI 支持把配置导出为 JSON,再导入回来,导入时会校验并预览,可以选择覆盖全部设置,或者只合并提供的字段。
Creator
sirmalloc
Size
14.7 MB
Stars
13.3K
Age
1y
Commits · 90 Days