GitHub - chimd715/ClaudeCodeStatusLine: Custom status line for Claude Code showing model, tokens, rate limits, and git info in real-time

A custom status line for Claude Code that displays model info, token usage, rate limits, and reset times in a compact two-line format. It runs as an external shell command, so it does not slow down Claude Code or consume any extra tokens.

Screenshot

Status Line Screenshot

What it shows

The status line displays information in two lines:

Line 1: Usage & Limits

Segment Description
Effort Reasoning effort level (low, med, high)
Tokens Used / total context window tokens
Model Current model name (e.g., Opus 4.5)
H 5-hour rate limit: percentage, progress bar, and reset time
W Weekly (7-day) rate limit: percentage, progress bar, and reset time
E Extra usage: percentage, progress bar, and credits spent/limit (if enabled)

Line 2: Project Info

Segment Description
Dir Current working directory name
Branch Git branch name and file changes (+/-)

Usage percentages are color-coded: green (<50%) → yellow (≥50%) → orange (≥70%) → red (≥90%).

Requirements

macOS / Linux

  • jq — for JSON parsing
  • curl — for fetching usage data from the Anthropic API
  • Claude Code with OAuth authentication (Pro/Max subscription)

Windows

  • PowerShell 5.1+ (included by default on Windows 10/11)
  • git in PATH (for branch/diff info)
  • Claude Code with OAuth authentication (Pro/Max subscription)

Installation

Quick setup (recommended)

Copy the contents of statusline.sh (or statusline.ps1 on Windows) 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.

Manual setup — macOS / Linux

  1. Copy the script to your Claude config directory:

    cp statusline.sh ~/.claude/statusline.sh
    chmod +x ~/.claude/statusline.sh
  2. Add the status line config to ~/.claude/settings.json:

    {
      "statusLine": {
        "type": "command",
        "command": "~/.claude/statusline.sh"
      }
    }
  3. Restart Claude Code.

Manual setup — Windows

Windows users should use statusline.ps1 instead of the bash script.

  1. Copy the script to your Claude config directory:

    Copy-Item statusline.ps1 "$env:USERPROFILE\.claude\statusline.ps1"
  2. Add the status line config to %USERPROFILE%\.claude\settings.json:

    PowerShell / CMD:

    {
      "statusLine": {
        "type": "command",
        "command": "powershell -NoProfile -File \"%USERPROFILE%\\.claude\\statusline.ps1\""
      }
    }

    Git Bash / WSL bash:

    {
      "statusLine": {
        "type": "command",
        "command": "powershell -NoProfile -File \"$USERPROFILE\\.claude\\statusline.ps1\""
      }
    }

    Note: Use %USERPROFILE% in CMD/PowerShell or $USERPROFILE in bash shells. The %VAR% syntax does not expand in bash.

  3. Restart Claude Code.

Caching

Usage data from the Anthropic API is cached for 60 seconds at /tmp/claude/statusline-usage-cache.json to avoid excessive API calls.

License

MIT

Author

Daniel Oliveira

Website X LinkedIn