Getting Started
You end up with the PsAgent module imported and a live agent in your terminal:
Import-Module ./src/PsAgent.Cmdlets/bin/Release/net10.0/PsAgent.psd1Invoke-Acp "Read hello.txt and tell me the magic word." -Agent opencode -NoUi -AutoApprove1. Clone the siblings
Section titled “1. Clone the siblings”This repo builds against two siblings by relative path. Clone all three next to each other:
git clone https://github.com/standardbeagle/ps-bashgit clone https://github.com/standardbeagle/stratagit clone https://github.com/standardbeagle/ps-agentcore/├── ps-bash/ ← ProjectReference: Show-Styled, BashRuntime.RunChildProcess├── strata/ ← the CSS cascade, consumed from strata/local-feed└── ps-agent/ ← this repo2. Pack the Strata feed
Section titled “2. Pack the Strata feed”Strata is not on nuget.org, so its local feed has to be packed first:
cd ../strata && ./scripts/pack-local.sh # populates ../strata/local-feedThe build auto-detects the feed and the newest Strata.Css nupkg version, so a strata bump needs
no edit in this repo. A missing feed fails the build with the pack-local.sh instruction rather
than a wall of CS0246.
3. Build
Section titled “3. Build”cd ../ps-agent && dotnet build -c Release -m:1-m:1 is not optional. This repo ProjectReferences ../ps-bash/src/PsBash.Cmdlets, so a build
here writes into ps-bash’s shared src/*/bin; two concurrent builds against those outputs are the
documented root cause of ps-bash’s test-suite flakiness.
4. Import and run
Section titled “4. Import and run”Import-Module ./src/PsAgent.Cmdlets/bin/Release/net10.0/PsAgent.psd1
# Needs Anthropic credentials — see Authentication.Invoke-Agent "why does the parser drop trailing newlines?"
# Needs an ACP agent installed. opencode is the easiest: no npx download.Invoke-Acp "Read hello.txt and tell me the magic word." -Agent opencode -NoUi -AutoApproveInvoke-Acp is verified end-to-end against opencode 1.18.18. The known -Agent names shell
out through npx:
-Agent | Runs |
|---|---|
claude | npx -y @zed-industries/claude-code-acp |
gemini | npx -y @google/gemini-cli --experimental-acp |
codex | npx -y @zed-industries/codex-acp |
opencode | opencode acp — ACP is a subcommand of its own binary |
Anything else is treated as an executable on PATH that speaks ACP on stdio:
Invoke-Acp "..." -Agent my-agent -ArgumentList '--stdio'Run the tests
Section titled “Run the tests”dotnet build -c Debug -m:1dotnet test src/PsAgent.Cmdlets.Tests --no-buildThe ACP client has an end-to-end suite against fixtures/stub-acp-agent.js, a dependency-free
Node agent, so the handshake, framing, streamed updates and agent-to-client callbacks are covered
with no ACP agent installed, no network and no API key. Those tests self-skip when Node is absent.
Next: the transcript model both cmdlets write to, or the full parameter
sets for Invoke-Agent and
Invoke-Acp.