# Repository Briefing: sirmalloc/ccstatusline
> Source: https://repoforai.com/repo/sirmalloc/ccstatusline (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/sirmalloc/ccstatusline
- **Category**: Coding, Skills & MCP (AI 编程 / Skills / MCP)
- **Primary Language**: TypeScript
- **License**: MIT
- **Engineering Health**: A+ (93/100 · Maintenance 35/35 · Adoption 18/25 · Releases 20/20 · License 20/20)
- **Latest Release**: v2.2.34 (2026-11-06) — https://github.com/sirmalloc/ccstatusline/releases
- **Review Snapshot**: 2026-12-01
- **Deployment / Stack Signals**: CLI
- **Momentum**: 13,730 ★ total (+3 24h / +33 7d) · 620 forks
- **Topics**: `ai-tools`, `claude-code`, `cli`, `developer-tools`, `git`, `powerline`, `statusbar`, `statusline`, `terminal`, `themeing`
- **When to Use**: Best for: Frequent Claude Code users who want context, usage, and repository status in one terminal view, with reusable layouts they can preview and share. Skip if: 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.

## Overview
```text
### Architecture & 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.
```

## Key Capabilities
```text
- Execution: One TypeScript CLI serves as both the interactive editor and the piped Claude Code formatter; rendering skips the TUI.
- Usage: Five-hour block and all-model weekly widgets can fall back to `limits[]`; weekly Sonnet, Opus, and Fable widgets read `weekly_scoped`.
- Context: After `/compact`, context widgets reset from `compact_boundary.postTokens` until the first new turn.
- Repository state: PR/MR widgets use `gh` or `glab` as appropriate; PR and CI rendering can use a versioned disk cache with background refresh.
- Layout: Powerline flex separators support right alignment, and v2.2.34 prioritizes `CCSTATUSLINE_WIDTH` over Claude Code's `COLUMNS`.
- Config portability: JSON imports support preview, merge, or replace; newly introduced shell commands require confirmation with Cancel selected by default.
```

## Quick Start / Clone
```bash
# Run the configuration TUI with npm
npx -y ccstatusline@latest

# Or use bunx, Bun's alternative to npx
bunx -y ccstatusline@latest
```
