Documentation
¶
Overview ¶
sh is a tiny POSIX shell BIN backed by mvdan.cc/sh/v3/interp. The reason it exists is that openotters' runtime execs each BIN tool as a single process — no kernel shell between the LLM and the binary — so pipelines (`cmd1 | cmd2 | cmd3`) are impossible unless one tool *owns* the pipeline itself. `sh -c "<script>"` is that tool.
Why mvdan's shell rather than busybox:
- pure Go, cross-compiles to every platform our BIN images target (darwin/arm64, darwin/amd64, linux/amd64, linux/arm64) with zero C toolchain.
- embeddable, predictable, no /proc assumptions, no glibc.
- good POSIX coverage for the "pipe commands together" case, which is 99% of why an agent would want a shell.
Limitations worth flagging to the LLM (the Agentfile's BIN block should restate these):
- only the `-c "script"` invocation is supported here; we don't implement REPL or read-from-file modes.
- the mvdan interpreter doesn't support every obscure POSIX feature (job control, terminal operations) — you won't miss anything relevant to tool-chaining.
- the interpreter inherits the host environment and can reach any path the process can. No sandboxing. Treat it as equivalent to giving the LLM shell access on the host.
Click to show internal directories.
Click to hide internal directories.