{"id":50233174,"url":"https://github.com/andi0b/pi-pwsh","last_synced_at":"2026-07-04T09:31:01.622Z","repository":{"id":358719892,"uuid":"1199822927","full_name":"andi0b/pi-pwsh","owner":"andi0b","description":"PowerShell tool for pi coding agent","archived":false,"fork":false,"pushed_at":"2026-05-18T19:04:42.000Z","size":54,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-18T21:10:11.233Z","etag":null,"topics":["pi-coding-agent","pi-package","powershell","pwsh"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/andi0b.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-04-02T18:41:47.000Z","updated_at":"2026-05-18T19:04:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/andi0b/pi-pwsh","commit_stats":null,"previous_names":["andi0b/pi-pwsh"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/andi0b/pi-pwsh","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andi0b%2Fpi-pwsh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andi0b%2Fpi-pwsh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andi0b%2Fpi-pwsh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andi0b%2Fpi-pwsh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andi0b","download_url":"https://codeload.github.com/andi0b/pi-pwsh/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andi0b%2Fpi-pwsh/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35117334,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-07-04T02:00:05.987Z","response_time":113,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["pi-coding-agent","pi-package","powershell","pwsh"],"created_at":"2026-05-26T19:00:32.258Z","updated_at":"2026-07-04T09:31:01.601Z","avatar_url":"https://github.com/andi0b.png","language":"TypeScript","funding_links":[],"categories":["Extensions"],"sub_categories":[],"readme":"# pi-pwsh\n\nA small pi package that adds a `pwsh` tool for running PowerShell commands.\n\nIt tries to behave like pi's built-in `bash` tool, including:\n\n- similar truncation behavior\n- similar output rendering\n- shell shortcut behavior via `!p` / `!!p` and `!pwsh` / `!!pwsh`\n\n\u003e Note: this extension is carefully vibe slopped.\n\nCurrently developed for Windows, but it should (might?) work on Linux/macOS too if `pwsh` is installed.\n\nDoes not work with `powershell`, it requires `pwsh` (PowerShell 7+) in path.\n\n## What it provides\n\n- `pwsh` tool for executing PowerShell in the current working directory\n- keeps `bash` as the default shell tool by default\n- optional `pwshTool.replaceBash` setting to remove the built-in `bash` tool from the active tool list and run bang commands through PowerShell\n- optional `pwshTool.removeRead` setting to remove the built-in `read` tool from the active tool list\n- optional `pwshTool.availableCommands` setting to configure which commands are detected and mentioned in the tool instructions\n- useful when a task is easier in PowerShell than in bash\n\n### PowerShell tool\n\nAsk pi to use the `pwsh` tool when PowerShell is the better fit.\n\nExample:\n\n```text\nuse pwsh to list all services\n```\n\n### PowerShell bang shortcuts\n\nThis package also supports quick PowerShell commands through pi's regular bang-command path. Bang shortcut output starts with a `[pwsh]` marker so it is clear PowerShell handled the command:\n\n- `!p command` or `!pwsh command` — runs the command through PowerShell and includes the result in context\n- `!!p command` or `!!pwsh command` — runs the command through PowerShell but excludes the result from context\n\nExamples:\n\n```text\n!p Get-ChildItem\n!!pwsh Get-Process | Sort-Object CPU -Descending | Select-Object -First 20\n```\n\n## Settings\n\nConfigure the package in `~/.pi/agent/settings.json` or `.pi/settings.json` under `pwshTool`. Defaults:\n\n```json\n{\n  \"pwshTool\": {\n    \"replaceBash\": false,\n    \"removeRead\": false,\n    \"availableCommands\": [\"rg\", \"fd\", \"jq\", \"yq\", \"curl\", \"sed\"]\n  }\n}\n```\n\nSet options before starting pi; there is no interactive toggle command.\n\n| Option | Default | Description |\n| --- | --- | --- |\n| `replaceBash` | `false` | When `true`, removes `bash` from the active tool list, keeps this tool registered as `pwsh`, removes the instruction to prefer bash, and runs `!command` / `!!command` through PowerShell. |\n| `removeRead` | `false` | When `true`, removes `read` from the active tool list. Useful if you want agents to inspect files through `pwsh` commands instead. |\n| `availableCommands` | `[\"rg\", \"fd\", \"jq\", \"yq\", \"curl\", \"sed\"]` | Common commands to detect on PATH and mention in the `pwsh` tool guidelines when `replaceBash` is enabled. Only commands actually found on PATH are listed. Set to `[]` to remove this guideline completely. |\n\nThe `availableCommands` guideline exists because LLMs often assume Unix-oriented helpers such as `rg`, `fd`, `jq`, or `curl` are unavailable when the shell is Windows/PowerShell. Listing commands that are actually available helps the model use them confidently instead of falling back to slower or less appropriate alternatives. In pwsh-only mode, the prompt also adds separate guidelines for `rg` and `fd` when each is available, telling the model to prefer them for text search and file discovery over PowerShell-specific commands where appropriate.\n\n## See also\n\n- [marcfargas/pi-powershell](https://github.com/marcfargas/pi-powershell): Another pi PowerShell extension, with more features regarding background jobs\n- [Codex PowerShell implementation](https://github.com/openai/codex/blob/d44f4205fb93ca1f602a21f110d795bd499a1e07/codex-rs/shell-command/src/powershell.rs)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandi0b%2Fpi-pwsh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandi0b%2Fpi-pwsh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandi0b%2Fpi-pwsh/lists"}