A custom status line for Claude Code that displays token usage, rate limits, and remaining time in a single compact line.
| Segment | Description |
|---|---|
| CWD@Branch | Current folder name and git branch (if in a repo) |
| Tokens | Used / total context window tokens |
| % Used / Remain | Context window usage percentage |
| 5h | 5-hour rate limit usage with progress bar and remaining time |
| 7d | 7-day rate limit usage with progress bar and remaining time |
| Off-peak | Green indicator when outside ET peak hours (Mon–Fri 8:00–13:59) |
| Version | Claude Code version (e.g., v2.1.80) |
Progress bars change color based on usage: green → orange → yellow → red.
jq— for JSON parsingcurl— for fetching usage data from the Anthropic API- Claude Code with OAuth authentication (Pro/Max subscription)
Copy the contents of statusline.sh and paste it into Claude Code with the prompt:
Use this script as my status bar
Claude Code will save the script and configure settings.json for you automatically.
-
Copy the script to your Claude config directory:
cp statusline.sh ~/.claude/statusline.sh chmod +x ~/.claude/statusline.sh
Or download directly from GitHub:
curl -fsSL https://raw.githubusercontent.com/tacoo/ClaudeCodeStatusLine/main/statusline.sh -o ~/.claude/statusline.sh && chmod +x ~/.claude/statusline.sh
-
Add the status line config to
~/.claude/settings.json:{ "statusLine": { "type": "command", "command": "~/.claude/statusline.sh" } } -
Restart Claude Code.
-
Copy the script to your Claude config directory:
Copy-Item statusline.ps1 "$env:USERPROFILE\.claude\statusline.ps1"
Or download directly from GitHub:
Invoke-WebRequest -Uri "https://raw.githubusercontent.com/tacoo/ClaudeCodeStatusLine/main/statusline.ps1" -OutFile "$env:USERPROFILE\.claude\statusline.ps1"
-
Add the status line config to
%USERPROFILE%\.claude\settings.json:{ "statusLine": { "type": "command", "command": "powershell -ExecutionPolicy Bypass -File \"%USERPROFILE%\\.claude\\statusline.ps1\"" } } -
Restart Claude Code.
MIT
