sirmalloc/ccstatusline
A local CLI formatter for Claude Code session metrics, Git status, and Powerline layouts
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
ccstatusline is a TypeScript CLI extension for Claude Code's status line, not an MCP server or a model runtime. The npm package exposes the ccstatusline executable for two paths: an interactive terminal editor to configure and preview layouts, and a formatter invoked by Claude Code through its status-line settings. The piped render path skips loading the TUI, keeping editing code off the recurring refresh path.
Widgets compose multiple display lines with per-widget styling and standard or Powerline layouts. Their inputs span Claude Code session data, local Git/JJ state, and, for selected widgets, remote usage or provider data. PR and CI widgets render from a versioned disk cache and refresh stale data in the background, so a slow gh call need not hold up a repaint.
Key Capabilities & Differentiators
The terminal editor supports multi-line layouts, live widget previews, per-widget colors, and Powerline flex separators for right alignment. Manual separators look past widgets that render empty, and branch and directory labels can be truncated without losing hyperlink targets. Layouts can be exported as JSON, and imports can be previewed and merged or used to replace settings before saving.
Claude-specific widgets cover model identity, token and context metrics, five-hour block usage, weekly usage for Sonnet, Opus, and Fable, and prompt-cache state. Context widgets use compact_boundary.postTokens immediately after /compact. Git widgets cover GitHub pull requests and GitLab merge requests through gh or glab as appropriate; the GitHub CI widget summarizes failing, pending, and successful checks for the current branch's pull request.
Trade-offs & Limitations
Compared with a short custom status-line command, ccstatusline takes on the work of composing widgets, handling terminal width and Unicode, and managing caches for remote data. That matters when you need both Claude session metrics and repository status. If you only show the current directory and branch, a minimal script has fewer dependencies and fewer settings to audit. A generic shell prompt can cover those local fields but does not, on its own, receive Claude Code's status-line payload.
Runner startup varies by platform and cache state; pinning a global install avoids launching through the package runner on every refresh. Cached PR and CI values can lag remote state, and usage forecasts are estimates rather than quota guarantees. Layouts that include shell-command widgets are executable configuration: review imported commands before accepting them, even though the importer previews them and defaults to Cancel.
Hardware & Deployment Guide
Start the TUI with npx -y ccstatusline@latest or bunx -y ccstatusline@latest, then install the status-line command into Claude Code from the TUI. The package declares Node.js 14 or newer for the Node path. The pinned global option installs the current version and configures Claude Code to invoke ccstatusline directly rather than follow @latest. Formatter settings live in ~/.config/ccstatusline/settings.json; set CLAUDE_CONFIG_DIR for a nonstandard Claude Code settings directory.
Local widgets do not need a hosted ccstatusline service or GPU. Remote widgets depend on access to the relevant endpoints or provider CLI. Usage, Claude Status, and update-check requests honor HTTPS_PROXY and NO_PROXY or no_proxy exclusions. The TUI can set statusLine.refreshInterval on supported Claude Code versions (2.1.97 or newer). v2.2.32 added confirmation for newly imported shell commands and protected unreadable Claude settings from overwrite; v2.2.34 expanded cache-miss reporting and weekly limit forecasts.
limits[]; weekly Sonnet, Opus, and Fable widgets read weekly_scoped./compact, context widgets reset from compact_boundary.postTokens until the first new turn.gh or glab as appropriate; PR and CI rendering can use a versioned disk cache with background refresh.CCSTATUSLINE_WIDTH over Claude Code's COLUMNS.Frequent Claude Code users who want context, usage, and repository status in one terminal view, with reusable layouts they can preview and share.
You only need a couple of local fields, require all displayed data to stay offline, or want an MCP tool server or a centralized usage dashboard.
Quick Start & Installation
# Run the configuration TUI with npm npx -y ccstatusline@latest # Or use bunx, Bun's alternative to npx bunx -y ccstatusline@latest
Comparison vs. Top Coding, Skills & MCP Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| ccstatusline ★ | 13.7k | +33 | TypeScript | MIT | A local CLI formatter for Claude Code session metrics, Git status, and Powerline |
| rtk | 88.7k | +684 | Rust | Apache-2.0 | A local Rust CLI wrapper that trims command output before coding agents read it. |
| ECC | 316.1k | +4.2k | JavaScript | MIT | Plugins and CLI workflows for planning, reviewing, and verifying agent-written c |
| ponytail | 204.4k | +4.1k | JavaScript | MIT | A prompt-driven coding-agent plugin for smaller changes and focused tests. |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/sirmalloc/ccstatusline.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about ccstatusline
How does ccstatusline integrate with Claude Code?
What hardware and runtime overhead should I budget for?
Can a company run or redistribute it internally, and is there a server to host?
When is this better than a small custom status-line script?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy