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; 5-dot scale on opus 4.7+ and fable for xhigh/max)
- πͺΎ Worktree Detection - In a worktree, shows the parent repo name + branch with πΏπͺΎ icons together; appends the folder name (light brown) only when it isn't derivable from the branch
- π Context Tracking - Shows current usage vs auto-compact threshold (e.g.,
β 97k/155k), 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/155k | [βββββ] 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 (parent repo name + branch, icons together; the folder is added only when it isn't derivable from the branch):
myrepo πΏπͺΎ feature-branch | opus 4.6 βββ’ | [βββββ] 5h:24% used βΊ9pm 1h43m
myrepo πΏ feature-branch πͺΎ scratch-dir | opus 4.6 βββ’ | [βββββ] 5h:24% used βΊ9pm 1h43m
Breakdown:
repo πΏ main - Project name + git branch (branch in green #74BE33); in a worktree the gray name is the parent repo
πΏπͺΎ branch - In a worktree the branch + worktree icons sit together; the folder name (light brown) is appended only when it isn't derivable from the branch (not a prefix/suffix match), e.g. πΏ feature-branch πͺΎ scratch-dir
opus 4.6 βββ’ - Current model with version and effort level dots
βββ = high (default), βββ’ = medium, ββ’β’ = low
- Opus 4.7+ and Fable use a 5-dot scale:
βββββ = max, βββββ’ = xhigh, ββββ’β’ = high, βββ’β’β’ = medium, ββ’β’β’β’ = low
- Only shown for thinking-capable models (opus/sonnet/fable, 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 (e.g., 65k/155k)
- 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 marketplace and install the plugin
/plugin marketplace add https://github.com/moogento/moo-statusline.git
/plugin install moo-statusline@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