Moo Statusline for Claude Code
A beautiful, informative statusline for Claude Code CLI that shows your project, git branch, model, context usage, and real-time rate limit tracking via the Anthropic API.
Codex CLI
For a Codex-oriented copy of the script, see statusline-codex.sh and README-CODEX.md.
Quick run:
chmod +x ./statusline-codex.sh
echo '{"cwd":"'$PWD'","model":"gpt-5.2-codex","info":{"last_token_usage":{"total_tokens":6472},"model_context_window":258400},"rate_limits":{"primary":{"used_percent":24.0,"window_minutes":300,"resets_at":1767958180},"secondary":{"used_percent":3.0,"window_minutes":10080,"resets_at":1768212356}}}' | ./statusline-codex.sh
Live watcher (separate terminal):
chmod +x ./codex-statusline-watch.sh
./codex-statusline-watch.sh
Features
- 🌿 Git Integration - Shows project name and current branch (highlighted in green)
- 🤖 Model Display - Simplified model names with version (e.g., opus 4.6, sonnet 4.5, haiku 4)
- 🧠 Effort Indicator - Shows thinking effort level as dots next to model name (●●• = medium; 4-dot scale on opus 4.7+ for xhigh/max)
- Worktree Detection - Shows worktree name in light brown when working in a git worktree
- 📊 Context Tracking - Shows current usage vs auto-compact threshold (e.g.,
⛁ 97k/155k(200k)), respects autoCompactWindow setting
- ⚡ Live Rate Limit Data - Real 5-hour usage from Anthropic API with visual progress bar
- ⏰ Smart Reset Timer - Displays next reset time and countdown (e.g.,
↺ 9pm 1h43m)
- 🎨 Color-Coded Warnings - Orange/red alerts when context or rate limits are high
- 💰 Extra Usage Tracking - Shows extra usage progress bar and spend when 5-hour limit is reached
- 📈 Weekly Usage - Optional 7-day usage percentage when available
What It Looks Like

repo 🌿 main | opus 4.6 ●●● | ⛁ 65k/455k(500k) | [██░░░░░░░░] 5h:24% used ↺9pm 1h43m
When 5-hour limit is reached with extra usage enabled:
repo 🌿 main | opus 4.6 ●●● | [█░░░░░░░░░] extra:12% used $515.00/$4250 | 5h:100% used ↺3pm.0h14m | w:63%
In a worktree:
repo 🌿 feature-branch my-worktree | opus 4.6 ●●• | [██░░░░░░░░] 5h:24% used ↺9pm 1h43m
Breakdown:
repo 🌿 main - Project name + git branch (branch in green #74BE33)
my-worktree - Worktree name in light brown (only shown in git worktrees)
opus 4.6 ●●• - Current model with version and effort level dots
●●● = high (default), ●●• = medium, ●•• = low
- Opus 4.7+ uses a 4-dot scale:
●●●● = max/xhigh, ●●●• = high, ●●•• = medium, ●••• = low
- Only shown for thinking-capable models (opus/sonnet, not haiku)
- Reads from
/model command, CLAUDE_CODE_EFFORT_LEVEL env var, or alwaysThinkingEnabled setting
⛁ 65k/500k - Current context usage / compact threshold
- With
autoCompactWindow: used directly as threshold (e.g., 65k/500k)
- Without: defaults to
context_window_size - 45K with window in parens (e.g., 65k/155k(200k))
- Turns orange when <20k remaining, red when <10k
[██░░░░░░░░] 5h:24% used - 5-hour rate limit usage from Anthropic API
- Visual bar + percentage
- Gray: <50%, Yellow: 50-79%, Red: ≥80%
- Shows
w:3% if weekly data is available; at ≥50% also shows reset date and countdown (e.g., w:87% ↺ 6mar-midday.3h18m)
- When 5h hits 100% and extra usage is enabled, shows extra usage bar (light orange) with dollar spend
↺9pm 1h43m - Next reset time + countdown
- Icon in dark green (#357500)
- Clean time format:
9pm not 9:00pm
Installation
Plugin Install (Recommended)
# 1. Add the plugin to Claude Code
claude plugins add github:moogento/moo-statusline
# 2. Run the setup command
/statusline
# 3. Restart Claude Code
Homebrew (macOS)
# 1. Tap and install
brew tap moogento/moo-statusline
brew install moo-statusline
# 2. Add to your Claude Code settings (~/.claude/settings.json):
{
"statusLine": {
"type": "command",
"command": "bash ~/.claude/statusline.sh"
}
}
# 3. Restart Claude Code
Quick Install
# 1. Download the statusline script
curl -o ~/.claude/statusline.sh https://raw.githubusercontent.com/moogento/moo-statusline/main/statusline.sh
chmod +x ~/.claude/statusline.sh
# 2. Add to your Claude Code settings
# Edit ~/.claude/settings.json (global) or .claude/settings.json (project-specific)
{
"statusLine": {
"type": "command",
"command": "bash ~/.claude/statusline.sh"
}
}
# 3. Restart Claude Code
Manual Install
-
Copy the script:
cp statusline.sh ~/.claude/statusline.sh
chmod +x ~/.claude/statusline.sh
-
Configure Claude Code:
Edit ~/.claude/settings.json (for global settings) or .claude/settings.json (for project-specific settings):