@diegovisk/pi-windows
Windows environment diagnostics, bash normalization, and ACL remediation for pi.dev
Package details
Install @diegovisk/pi-windows from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@diegovisk/pi-windows- Package
@diegovisk/pi-windows- Version
1.0.1- Published
- Jul 10, 2026
- Downloads
- 153/mo · 153/wk
- Author
- diegovisk
- License
- MIT
- Types
- extension
- Size
- 33.5 KB
- Dependencies
- 0 dependencies · 1 peer
Pi manifest JSON
{
"extensions": [
"./index.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-windows
Windows environment diagnostics, bash command normalization, and ACL remediation for pi.dev.
Install
npm (recommended)
pi install npm:@diegovisk/pi-windows@1.0.1
Or add to ~/.pi/agent/settings.json:
{
"packages": ["npm:@diegovisk/pi-windows"]
}
git
pi install git:github.com/Diegovisk/pi-windows@main
Then /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 -Json
Viewing 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.txt
ACL fix (admin)
# Elevated PowerShell
.\scripts\fix-subagents-acl.ps1
Testing
npm test
npm run test:unit
npm run test:mock
npm run test:live
npm run doctor
Uses print mode patterns — no --mode json on Windows.
Doctor output
Last report saved to ~/.pi/win-doctor-last.json.