pi-powershell
PowerShell extension for pi - replaces bash with PowerShell on Windows and auto-translates bash commands
Package details
Install pi-powershell from npm and Pi will load the resources declared by the package manifest.
$ pi install npm:pi-powershell- Package
pi-powershell- Version
1.0.3- Published
- May 23, 2026
- Downloads
- not available
- Author
- ngsoftware
- License
- MIT
- Types
- extension
- Size
- 13.7 KB
- Dependencies
- 1 dependency · 1 peer
Pi manifest JSON
{
"extensions": [
"./pi-powershell-extension.ts"
]
}Security note
Pi packages can execute code and influence agent behavior. Review the source before installing third-party packages.
README
pi-powershell
PowerShell extension for pi - the terminal coding harness.
Features
- Replaces bash with PowerShell on Windows
- Auto-translates bash commands to PowerShell equivalents
- Preserves native PowerShell cmdlets
Auto-Translation Support
| Bash | PowerShell |
|---|---|
ls, ll, la |
Get-ChildItem |
pwd |
Get-Location |
cat file |
Get-Content file |
echo "text" |
Write-Output "text" |
mkdir dir |
New-Item -ItemType Directory |
touch file |
New-Item -ItemType File |
rm -rf dir |
Remove-Item -Recurse -Force |
grep pattern file |
Select-String -Pattern |
ps |
Get-Process |
which cmd |
Get-Command | Select-Object -ExpandProperty Source |
ls | grep pattern |
Get-ChildItem | Where-Object |
ls | wc -l |
Get-ChildItem | Measure-Object -Line |
ls | head -n |
Get-ChildItem | Select-Object -First |
$HOME, $PATH |
$env:HOME, $env:PATH |
export VAR=value |
$env:VAR=value |
Native PowerShell cmdlets pass through unchanged:
!Get-Process | Select-Object -First 5
!Get-Service | Where-Object {$_.Status -eq 'Running'}
Installation
npm install -g pi-powershell
Or in pi:
pi install pi-powershell
Requirements
- Windows (PowerShell 7+ or Windows PowerShell)
- Node.js 18+
Scripts (Windows)
| Command | Description |
|---|---|
npm run serve |
Start static server (foreground) |
npm run serve:bg |
Start server in new window |
npm run dev:bg |
Start dev server in new window |
npm run http |
Simple HTTP server (port 8080) |
npm run http:bg |
HTTP server in new window |
npm run run -- "cmd" |
Run any command in background |
npm run kill |
Kill all node processes |
Examples
# Start server in new window
npm run serve:bg
# Run any command in background
npm run run -- "npm run dev"
npm run run -- "node server.js --port 3000"
npm run run -- "npx next dev"
# Stop all node processes
npm run kill
License
MIT