diff options
| author | Paul Buetow <paul@buetow.org> | 2026-03-20 20:49:39 +0200 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2026-03-20 20:49:39 +0200 |
| commit | 097afe5a81849ea8a921286c887014e242fa3794 (patch) | |
| tree | 09b035931cbca6793b370c33a490f094d8315b37 /pi/agent/extensions/inline-bash/README.md | |
| parent | e66e46fcc27aee1246f40b76fedd87d2138e6d15 (diff) | |
Add Pi extensions and usage docs
Diffstat (limited to 'pi/agent/extensions/inline-bash/README.md')
| -rw-r--r-- | pi/agent/extensions/inline-bash/README.md | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/pi/agent/extensions/inline-bash/README.md b/pi/agent/extensions/inline-bash/README.md new file mode 100644 index 0000000..777f2fa --- /dev/null +++ b/pi/agent/extensions/inline-bash/README.md @@ -0,0 +1,44 @@ +# Inline Bash + +Inline shell expansion for Pi prompts. + +This is the upstream `inline-bash.ts` example installed as a local extension in +your dotfiles-backed Pi tree. It expands `!{...}` before the prompt is sent to +the model. + +## What It Does + +- `!{command}` runs a shell command locally +- the command output replaces the inline expression in your prompt +- regular whole-line `!command` behavior stays unchanged + +## Usage Flows + +### Flow 1: Inline one value into a prompt + +```text +What files are in !{pwd}? +``` + +Pi sends the expanded prompt after `pwd` runs locally. + +### Flow 2: Inline git state + +```text +Summarize the current branch !{git branch --show-current} and these changes: !{git status --short} +``` + +### Flow 3: Inline system context + +```text +I am on kernel !{uname -r} and hostname !{hostname}. Explain whether that matters for this bug. +``` + +## Notes And Limits + +- Commands run on your local machine, not on the model provider. +- Expansion happens before the prompt is sent. +- Each inline command has a 30 second timeout. +- If a command fails, the prompt gets an inline error marker. +- This is convenient, but it is still shell execution. Treat prompt text + accordingly. |
