@diegovisk/pi-windows
v1.0.1
Published
Windows environment diagnostics, bash normalization, and ACL remediation for pi.dev
Maintainers
Readme
pi-windows
Windows environment diagnostics, bash command normalization, and ACL remediation for pi.dev.
Install
npm (recommended)
pi install npm:@diegovisk/[email protected]Or add to ~/.pi/agent/settings.json:
{
"packages": ["npm:@diegovisk/pi-windows"]
}git
pi install git:github.com/Diegovisk/pi-windows@mainThen /reload in pi.
Commands
| Command | Description |
|---------|-------------|
| /win-doctor | Run diagnostics (bash, PATH split, bundled tools, ACL, sessions) |
| /win-setup | Apply recommended shellCommandPrefix + terminal hints |
| /win-sessions | Scan session JSONL for Windows tool failures |
| /win-last | Reopen last doctor report in scrollable editor |
| /win-last-sessions | Reopen last sessions scan in editor |
| /win-clear | Remove pi-windows widgets from the TUI |
| /win-fix-acl | Launch elevated fix for pi-subagents temp ACL issues |
What it fixes
Pi's bash tool runs Git Bash, not PowerShell. Models often emit Windows-native syntax that fails:
dir /b,findstr,systeminfo | findstr→ wrapped ascmd //cGet-Service,$env:Path,winget,choco→ wrapped aspowershell -NoProfile -CommandC:\...paths → normalized toC:/...with MSYS path guards
Environment variables
| Variable | Default | Effect |
|----------|---------|--------|
| PI_WINDOWS_NORMALIZE | on | Set 0 to disable bash rewriting |
| PI_WINDOWS_PROMPT | on | Set 0 to disable Windows system prompt block |
| PI_WINDOWS_NORMALIZE_QUIET | off | Set 1 to hide normalize status updates |
Standalone doctor
.\scripts\win-doctor.ps1
.\scripts\win-doctor.ps1 -JsonViewing full output
The small widget above the prompt truncates long lines. After /win-doctor or /win-sessions:
- Scrollable editor opens automatically — use arrow keys / PgUp / PgDn; press Esc to close.
- Text file on disk:
~/.pi/win-doctor-last.txtor~/.pi/win-sessions-last.txt(open in Notepad, Cursor, etc.). - JSON (doctor only):
~/.pi/win-doctor-last.json - Reopen later:
/win-lastor/win-last-sessions - Clear the compact widget:
/win-clear
Standalone doctor (outside pi):
.\scripts\win-doctor.ps1
# or open the saved file after running /win-doctor in pi:
notepad $env:USERPROFILE\.pi\win-doctor-last.txtACL fix (admin)
# Elevated PowerShell
.\scripts\fix-subagents-acl.ps1Testing
npm test
npm run test:unit
npm run test:mock
npm run test:live
npm run doctorUses print mode patterns — no --mode json on Windows.
Doctor output
Last report saved to ~/.pi/win-doctor-last.json.
