A native PowerShell statusline for Claude Code on Windows — shows your current model, context usage, working directory, and rate limits at the bottom of the terminal. No jq, no extra dependencies.
admin@MY-PC D:/projects/my-app | Sonnet | Context: 25% | 5h: 50% | Weekly: 70%
Most statusline tutorials use a bash script with jq to parse the JSON that Claude Code pipes in. On Windows, jq usually isn't installed, so every parse fails silently and you see -- for everything. PowerShell ships with every Windows install and parses JSON natively — zero setup.
- Windows 10/11 with PowerShell (built in)
- Claude Code installed
- A Claude Pro/Max plan for the
5handWeeklyrate-limit fields (other fields work on any plan)
Copy statusline-command.ps1 to your Claude config folder:
C:/Users/<YourName>/.claude/statusline-command.ps1
Open C:/Users/<YourName>/.claude/settings.json and add the statusLine block (see settings.example.json). Replace <YourName> with your actual Windows username.
"statusLine": {
"type": "command",
"command": "powershell -NoProfile -File \"C:/Users/<YourName>/.claude/statusline-command.ps1\""
}$test = '{"model":{"display_name":"Sonnet"},"workspace":{"current_dir":"D:/projects/my-app"},"context_window":{"used_percentage":25},"rate_limits":{"five_hour":{"used_percentage":50},"seven_day":{"used_percentage":70}}}'
$test | powershell -NoProfile -File "C:/Users/<YourName>/.claude/statusline-command.ps1"You should see the formatted statusline print in the terminal.
Restart the app. Your statusline now shows real values.
Claude Code pipes this JSON into the script on each update:
| Field | Description |
|---|---|
model.display_name |
Current model name (e.g. Sonnet, Opus) |
workspace.current_dir |
Active working directory |
context_window.used_percentage |
% of context window consumed |
rate_limits.five_hour.used_percentage |
5-hour usage (Pro/Max only) |
rate_limits.seven_day.used_percentage |
Weekly usage (Pro/Max only) |
The rate-limit fields only exist on Pro/Max plans and only appear after the first API response in a session — so -- there at the start is normal.
The script is just a PowerShell string, so tweak it freely:
- Shorten the path — keep only the last folder instead of the full path
- Add the current git branch —
git rev-parse --abbrev-ref HEAD - Add emoji / separators — e.g.
🤖 $modelor📂 $dir - Warn on high context — flag
Context:with⚠️ when usage is high
MIT — see LICENSE.