@xynogen/pix-powershell
Pi tool — PowerShell execution with pretty output (renders Pi's built-in powershell tool like pix-bash)
Package details
Install @xynogen/pix-powershell from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:@xynogen/pix-powershell- Package
@xynogen/pix-powershell- Version
0.1.7- Published
- Nov 4, 2026
- Downloads
- 1,369/mo · 588/wk
- Author
- xynogen
- License
- MIT
- Types
- extension
- Size
- 16 KB
- Dependencies
- 2 dependencies · 2 peers
Pi manifest JSON
{
"extensions": [
"src/extension.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pix-powershell
Pi tool — PowerShell execution with pretty output.
What it does
Renders Pi's built-in powershell tool the same way pix-bash renders bash: a compact call line, a full-width status-colored framed output block, a live five-line tail while the command runs, and an auto-collapsed one-line summary such as ✓ powershell Get-ChildItem -Force · 42 lines · 1.2s. Long output fades out bottom-up and ends with a footer such as … 12 more lines (ctrl+o to expand), with your own expand key. Execution is unchanged — it wraps Pi's own createPowerShellToolDefinition (pwsh.exe, falling back to Windows PowerShell).
Output and compatibility fixes
- Plain-text output. PowerShell 7.2+ adds ANSI colour to table headers and errors even when output is piped, which wastes tokens and clutters the transcript. Every command starts with
if ($PSStyle) { $PSStyle.OutputRendering = 'PlainText' }. Windows PowerShell 5.1 has no$PSStyle, so the line is a no-op there. &&/||on Windows PowerShell 5.1. Pi falls back topowershell.exewhenpwsh.exeisn't on PATH, and 5.1 rejects chain operators. On 5.1 only, top-level chains are rewritten to$?checks (a && b→a; $__pixOk = $?; if ($__pixOk) { b; … }), and a failed chain at the end of the script still exits non-zero. Operators inside strings, comments, here-strings, and( [ {blocks are left alone. Whenever a rewrite happens, the output starts with a visible[pix-powershell] … rewrote && / ||line.
Windows only
Pi exposes powershell only on native Windows. pix-powershell follows that:
- On non-Windows platforms it registers nothing, so no extra tool schema reaches the model.
- On native Windows it registers the
powershelltool at load time, so the tool is enabled automatically. Inside pix-core it stays always on (never deferred), like the default shell.bashstays enabled too.
Auto-collapse
Uses the shared collapse section of ~/.pi/agent/pix.json. Disable for this tool only with:
{ "collapse": { "tools": { "powershell": false } } }
Install
pi install npm:@xynogen/pix-powershell
Bundled in
@xynogen/pix-core. Install it alone only if you do not use pix-core.
Full distro
This package is part of Pix. The installer sets up Pi and the full distro. See Install for the notes for each OS.
# Linux / macOS
curl -fsSL https://raw.githubusercontent.com/xynogen/pix-mono/main/scripts/install.sh | sh
# Windows
irm https://raw.githubusercontent.com/xynogen/pix-mono/main/scripts/install.ps1 | iex
License
MIT