Claude Code Custom Status Line Setup Guide for Windows
I build systems that blend AI and automation to solve real-world problems
This guide will help you set up a custom status line for Claude Code on Windows that displays the current directory, model name, and time.
First some background…
I don’t think anyone in Anthropic’s Claude code team uses anything other then Mac because the documentation is really lacking as far as using Claude Code on Windows is concerned.
For example, try setting up the status-line inside claude code on windows and see what happens. I wasted couple of hours. But i got it working:-)

So in case, i have to do it again or when another lone windows claude code user is banging their head, here is how to setup Claude Code status-line on Windows inside Powershell.
Step 1: Create the PowerShell Script
Open PowerShell
Create the script file:
New-Item -Path "~\.claude\claude-status.ps1" -ItemType File -ForceAdd the script content:
Set-Content -Path "~\.claude\claude-status.ps1" -Value @'$input = $input | Out-Stringif ($input.Trim().Length -gt 0) { try { $json = $input | ConvertFrom-Json $cwd = if ($json.workspace.current_dir) { Split-Path $json.workspace.current_dir -Leaf } else { "unknown" } $model = if ($json.model.display_name) { $json.model.display_name } else { "unknown" } $time = Get-Date -Format 'HH:mm' Write-Output "$cwd | $model | $time" } catch { Write-Output "parse-error: $($_.Exception.Message)" }} else { Write-Output "no-input"}'@
Step 2: Test the Script (Optional but Recommended)
Create test data:
$mockInput = @' { "workspace": { "current_dir": "C:\\Users\\YourUsername\\projects\\test-directory" }, "model": { "display_name": "Claude Sonnet 4" } } '@Test the script:
echo $mockInput | powershell -ExecutionPolicy Bypass -File ~\.claude\claude-status.ps1Expected output:
test-directory | Claude Sonnet 4 | 14:30
Step 3: Update Claude Code Settings
Find your Claude settings file at
~\.claude\settings.jsonIf the file doesn't exist, create it:
New-Item -Path "~\.claude\settings.json" -ItemType File -ForceAdd or update the settings file with this content:
{ "statusLine": { "type": "command", "command": "powershell -ExecutionPolicy Bypass -File ~\\.claude\\claude-status.ps1" } }⚠️ Important: Use double backslashes (
\\) in the JSON file for proper escaping.
Step 4: Restart Claude Code
Close and reopen Claude Code. You should now see a status line showing:
Current directory name
Model name
Current time (updates when the status refreshes)
Troubleshooting
If the status line doesn't appear:
Check the script path exists:
Test-Path ~\.claude\claude-status.ps1Test the script manually: Run the test from Step 2 to verify the script works correctly.
Verify settings file syntax: Make sure your
settings.jsonfile has valid JSON syntax.Try full path format: If using
~doesn't work, replaceYourUsernamewith your actual username:{ "statusLine": { "type": "command", "command": "powershell -ExecutionPolicy Bypass -File C:\\Users\\YourUsername\\.claude\\claude-status.ps1" } }Check PowerShell execution policy: If you get execution policy errors, you can temporarily allow script execution:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
What the Status Line Shows
The custom status line will display information in this format:
directory-name | Model Name | HH:MM
For example:
my-project | Claude Sonnet 4 | 14:30
Customizing the Display
You can modify the script to change what information is shown or how it's formatted. Edit the line in the script that says:
Write-Output "$cwd | $model | $time"
Some customization ideas:
Change the separator from
|to something else like•or-Add more information like git branch status
Change the time format (e.g.,
Get-Date -Format 'yyyy-MM-dd HH:mm')Add colors using PowerShell color codes
Files Created
This setup creates two files in your ~\.claude\ directory:
claude-status.ps1- The PowerShell script that generates the statussettings.json- Claude Code configuration file (if it didn't exist already)
Both files can be safely edited or removed if you want to change or disable the custom status line.
Good Luck, fellow Windows claude code user:-)