Show HN: Capsule Bash – Sandboxed Bash for Agents
github.comI've always felt that existing Bash wasn't adapted for agents. It gives way too much freedom and not enough feedback to enrich the context after each command.
I ended up building this TypeScript-based sandboxed Bash. If we compare it to other alternatives, it is divided into two layers:
- The core, with all the Bash commands and the operator logic.
- The runtime, a pluggable part that manages code execution in the sandbox. There's a Wasm runtime available based on a Rust runtime I launched a few months ago. [1]
In practice, the core calls the runtime to execute code and get back structured information from the sandbox, including exact filesystem changes (what was created, modified or deleted) and direct feedback in stdout.
I added commonly used commands, including `python3 -c` and `node -e`, but if you find an edge case where the current commands aren't enough, let me know.
GitHub: https://github.com/capsulerun/bash
--
[1]: https://news.ycombinator.com/item?id=46871387 This is interesting. We are building something similar too but for remote agents. Nice, what are you building exactly ? We are building cloud-native agent harnesses.