Skip to content

developzoneio/claude-code-statusline-windows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Claude Code Statusline for Windows

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%

Why PowerShell?

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.

Requirements

  • Windows 10/11 with PowerShell (built in)
  • Claude Code installed
  • A Claude Pro/Max plan for the 5h and Weekly rate-limit fields (other fields work on any plan)

Setup

1. Add the script

Copy statusline-command.ps1 to your Claude config folder:

C:/Users/<YourName>/.claude/statusline-command.ps1

2. Register it in settings.json

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\""
}

3. Test before restarting

$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.

4. Restart Claude Code

Restart the app. Your statusline now shows real values.

JSON Fields

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.

Customize

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 branchgit rev-parse --abbrev-ref HEAD
  • Add emoji / separators — e.g. 🤖 $model or 📂 $dir
  • Warn on high context — flag Context: with ⚠️ when usage is high

License

MIT — see LICENSE.

About

A PowerShell statusline for Claude Code on Windows — shows model, context, and rate limits. No jq required.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors