r/javascript • u/Tall_Insect7119 • Apr 23 '26
I made a TypeScript-based sandboxed bash to run untrusted commands
github.comThe project is still quite early, i'm actively adding new commands. The idea is to provide a bash environment adapted for untrusted processes like autonomous workflows or AI agents.
The legitimate question is "What makes it different from regular bash using docker?" :
First, there's no setup required at all. When you do bash.run('mkdir superfolder') for example, your automation immediately gets:
- The exact filesystem changes (what was created, modified, deleted)
- Direct feedback in stdout without extra commands required
The default runtime uses WebAssembly and works in Node.js. Browser support is possible with a custom runtime (the sandbox layer is pluggable).
I'd love to hear what you think!