Skip to content

Releases: capsulerun/bash

v0.1.0

20 Apr 23:17
b2a5990

Choose a tag to compare

Capsule Bash - Sandboxed bash made for agents

TypeScript SDK

npm install @capsule-run/bash @capsule-run/bash-wasm

Run it:

import { Bash } from "@capsule-run/bash";
import { WasmRuntime } from "@capsule-run/bash-wasm";

const bash = new Bash({ runtime: new WasmRuntime() });

const result = await bash.run("mkdir src && touch src/index.ts");

console.log(result);
/*
{
  stdout: "Folder created ✔\nFile created ✔",
  stderr: "",
  diff: { created: ['src', 'src/index.ts'], modified: [], deleted: [] },
  duration: 10,
  exitCode: 0,
}
*/

MCP server

{
  "mcpServers": {
    "capsule": {
      "command": "npx",
      "args": ["-y", "@capsule-run/bash-mcp"]
    }
  }
}

See the MCP README for configuration details.

Interactive shell

Clone the repository, then run from the project root:

pnpm -s bash-wasm-shell

Important

Python and pip are required to compile the Python sandbox. Both sandboxes (JS and Python) are needed to run the shell.