Projects

Code Intelligence & Engines

ag-bash

AI-native bash interpreter, in TypeScript.

1 min read · 119 words

View repo 392 commits
TypeScriptWebAssemblyMCPTree-sitterpnpm

AI agents need deterministic, sandboxed shell execution for tool-calling. ag-bash is a bash interpreter implemented entirely in TypeScript that gives them exactly that — exposed as the @ag-bash/bash shell engine plus an MCP server and an agent terminal bridge.

It parses shell syntax with a Tree-sitter WASM grammar and executes against sandboxed WASM runtimes (CPython, QuickJS, SQLite3) instead of the host shell, enabling patterns like fork-speculation (try N approaches, keep the winner) and self-healing recovery. Built and bundled with esbuild (ESM + CJS); 5 green CI workflows including CodeQL and security fuzzing.

  • In-process sandboxed execution, no host shell
  • Tree-sitter WASM parser · WASM language runtimes
  • MCP server · fork-speculation · self-healing

Systems + security breadth. 392 commits, 5 CI gates.