AI agent (Claude) with bash access to a Mesa repo, built with Mastra.
Same functionality as just-bash-ai-sdk, but using Mastra's Agent class with createTool and the built-in model router for Anthropic.
npm install
# Create a .env in this directory (gitignored)
cp .env.example .env
# Now populate your .env file with the required values
# Run
npm startMesaclient initializes a virtual filesystem viamesa.fs.mount()(native Rust via NAPI)mesaFs.bash()returns a bash instance backed by the virtual filesystem- A
bashtool is defined using Mastra'screateTool() - Mastra's
Agentclass wraps the model + tools, streaming reasoning, tool calls, and text to the terminal
| Variable | Description |
|---|---|
MESA_ORG |
Your Mesa organization slug |
MESA_REPO |
The repository to mount |
MESA_PRIVATE_KEY |
Mesa signing private key |
ANTHROPIC_API_KEY |
Anthropic API key (get one here) |
- Node.js >= 18
- Mesa account with a signing key
- Anthropic API key