By weihaog1
Two-line statusline for Claude Code showing context usage, API rate limits, session time, git status, and config counts. Works on macOS, Linux, and Windows (Git Bash/WSL).
An adaptive statusline for Claude Code that shows everything you need at a glance. Renders 2 lines on wide terminals, 4 lines on narrow ones.

alan:~/Codin/Tools/claude-code-statusline-alansauce [Opus 4.6 (1M context)] ctx:5% 48k/1000k
| Component | Example | Description |
|---|---|---|
| User | alan | System username from $USER. Bold cyan. |
| Working directory | ~/Codin/Tools/... | Project path with $HOME abbreviated to ~. |
| Model | [Opus 4.6 (1M context)] | Active Claude model. Yellow brackets. |
| Context usage % | ctx:5% | Context window consumed. Green (<50%), yellow (50-79%), bold red (80%+). |
| Context tokens | 48k/1000k | Current tokens vs. window size. Includes input, output, cache creation, and cache read. Rounded up to nearest thousand. |
On wide terminals, config counts appear on line 1. On narrow terminals they get their own line:
| Component | Example | Description |
|---|---|---|
| CLAUDE.md count | 1 CLAUDE.md | Files detected across all scopes: ~/.claude/CLAUDE.md, ./CLAUDE.md, ./CLAUDE.local.md, ./.claude/CLAUDE.md, ./.claude/CLAUDE.local.md. |
| Rules count | 4 Rules | Total .md files in ~/.claude/rules/ (global) and ./.claude/rules/ (project). |
| MCPs count | 2 MCPs | Enabled MCP servers. Counts keys in mcpServers from ~/.claude.json (user) and ./.mcp.json (project), minus any listed in disabledMcpServers or disabledMcpjsonServers. |
| Hooks count | 1 Hooks | Hook event types from ~/.claude/settings.json, ./.claude/settings.json, and ./.claude/settings.local.json. |
5hr: 11% (resets 2h 52m) | weekly: 67% (resets 1d 6h) | Session:2m34s | (main)
| Component | Example | Description |
|---|---|---|
| 5-hour usage | 5hr: 11% (resets 2h 52m) | Rolling 5-hour rate limit utilization from the Anthropic OAuth API. Blue. Shows "N/A" for API key users. |
| Weekly usage | weekly: 67% (resets 1d 6h) | Rolling 7-day rate limit utilization. Magenta. Shows "N/A" for API key users. |
| Session duration | Session:2m34s | Time since session start. Uses total_duration_ms when available, falls back to transcript file birth time. Green. |
| Git branch | (main) | Current branch, "detached", or "(not a git repo)". Yellow. |
| Git file status | [Committed:2,Staged:5,Edited:36] | Bracketed file change summary. Only non-zero categories appear. Hidden when clean. |
Git status categories:
| Label | What it means |
|---|---|
Committed:N | Files staged in the index (git diff --cached) |
Staged:N | Tracked files modified but not staged (git diff) |
Edited:N | Untracked files not in .gitignore (git ls-files --others) |
The statusline measures its content against terminal width. When everything fits, it renders 2 lines. When the terminal is narrow, it expands to 4 lines to avoid truncation.
Usage API responses are cached in /tmp/claude/statusline-usage-cache.json with a 5-minute TTL. Writes are atomic (mktemp + mv). If the API fails (429, timeout), the statusline falls back to stale cache with a [cached] indicator.
Clone this repo:
git clone https://github.com/weihaog1/claude-code-statusline-alansauce.git ~/.claude/plugins/claude-code-statusline-alansauce
Add to ~/.claude/settings.json:
{
"statusLine": {
"type": "command",
"command": "bash ~/.claude/plugins/claude-code-statusline-alansauce/statusline.sh",
"padding": 0
}
}
Restart Claude Code.
bash (4.0+)jq - JSON parsingcurl - usage APIgit - branch/status displaybc - context percentage color thresholds| Platform | Command |
|---|---|
| macOS | brew install jq |
| Debian/Ubuntu | sudo apt install jq |
| Fedora | sudo dnf install jq |
| Arch | sudo pacman -S jq |
Currently macOS-only. Credentials are read from the macOS Keychain via the security command.
MIT
Own this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimOwn this plugin?
Verify ownership to unlock analytics, metadata editing, and a verified badge. GitHub access is read-only (username + org membership).
Sign in to claimBased on adoption, maintenance, documentation, and repository signals. Not a security audit or endorsement.
npx claudepluginhub weihaog1/claude-code-statusline-alansauce --plugin claude-code-statusline-alansauceA minimal, opinionated and non-configurable, Claude Code status line
Live usage status bar for Claude Code — session limits, weekly usage, lines changed, 10 themes, widget priorities, shimmer animations, and zero API calls
A comprehensive statusline dashboard for Claude Code — session summary, quota bars, agent tracker, MCP health, message history, and more. All at a glance, no slash commands needed.
Unified status line for Claude Code with multi-CLI (Claude, Codex, Gemini, z.ai) usage monitoring, context, rate limits, and cost tracking
Comprehensive UI/UX design plugin for mobile (iOS, Android, React Native) and web applications with design systems, accessibility, and modern patterns
Standalone image generation plugin using Nano Banana MCP server. Generates and edits images, icons, diagrams, patterns, and visual assets via Gemini image models. No Gemini CLI dependency required.