@diegopetrucci/pi-inline-bash
v0.1.3
Published
A pi extension that expands inline bash commands in user prompts.
Downloads
390
Maintainers
Readme
inline-bash
A pi extension that expands inline bash commands in user prompts before they are sent to the agent.
This started from the original inline-bash.ts example in earendil-works/pi-mono, with small packaging and safety tweaks.
Usage
Write inline commands with !{...}:
What's in !{pwd}?
The current branch is !{git branch --show-current} and status: !{git status --short}
My node version is !{node --version}The extension runs each command and replaces the !{command} pattern with trimmed stdout or stderr. Each expansion is capped at 50,000 characters.
Whole-line !command syntax is left alone so pi's built-in shell-command behavior still works.
Install
Standalone npm package
pi install npm:@diegopetrucci/pi-inline-bashCollection package
pi install npm:@diegopetrucci/pi-extensionsGitHub package
pi install git:github.com/diegopetrucci/pi-extensionsThen reload pi:
/reloadNotes
- Hooks the
inputevent. - Inline commands run through
bash -cwith a 30-second timeout. - Extension-injected follow-up messages are ignored to avoid implicit shell execution from other extensions.
- In interactive mode, pi shows a notification summarizing the expanded commands.
- Treat prompt text containing
!{...}as shell code; only use this extension where prompt authors are trusted. permission-gatedoes not intercept these user-prompt expansions because they run before agent tool calls.
