Adding file attachment with and stdout redirection.

This commit is contained in:
Morpheus Sandmann
2026-09-17 13:48:39 +01:00
parent 1c92cdff60
commit be5b2b8ff0
6 changed files with 320 additions and 26 deletions
+16
View File
@@ -157,6 +157,22 @@ shellbound --close 8f73ac # close one work
Modes are personae on the server named `shellbound_*`. The mode/dora argument may be a full persona name or the shortest unambiguous prefix of its slug (e.g. `a` = answer, `c` = creative). `e` is ambiguous (`explain` vs `expert`) and will ask for more characters.
## Attachments & piping
Attach text files with `--attach` (repeatable) and/or pipe a program's output on stdin; both ride along with the prompt as fenced context blocks (`[file: ...]`, `[stdin]`, and `[clipboard]` when using `--paste`), so the model can tell them from the prompt itself.
```
shellbound a --attach main.py "review this file"
shellbound a --attach main.py --attach utils.py "how are these related?"
cat build.log | shellbound a "what failed and why?"
git diff | shellbound sh "review and commit" --no-exec
```
- Piped stdin is read automatically when it is not a terminal; pass `--no-stdin` to ignore it.
- Files that look binary (NUL bytes) are skipped with a warning.
- Input over `attach_max_bytes` (default 100 KB, per file/stdin) is truncated with a warning, and the truncation is marked inside the block. Tune it via `shellbound setup` or `SHELLBOUND_ATTACH_MAX_BYTES`.
- A message may consist entirely of attachments/stdin — no separate prompt is required.
## Retention
After every completed turn shellbound keeps the most recent `keep_workspaces` (default 5) `shellbound_*` workspaces open and closes older ones (they stay listed and resumable). Tune it via `shellbound setup`, `SHELLBOUND_KEEP_WORKSPACES`, or the `keep_workspaces` config key.