Settings

Theme

Show HN: Capsule Bash – Sandboxed Bash for Agents

github.com

3 points by mavdol04 11 days ago · 3 comments · 1 min read

Reader

I'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

debarshri 11 days ago

This is interesting. We are building something similar too but for remote agents.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection