Overview
From README.md, rendered when the site was built.
One router for every cloud sandbox provider. You ask for a sandbox; the router picks a provider that still has free usage left, fails over when one refuses, and keeps track of what each sandbox costs. The four ways providers expose themselves — an SDK, a REST API, a CLI and an MCP server — are each here once, for all of them.
import { createRouter } from "sandboxrouting";
const router = await createRouter(); // config file + keys from the environment
const sbx = await router.create({ timeoutSec: 600 });
const r = await sbx.commands.run("python3 -c 'print(6*7)'");
await sbx.files.write("/work/app.py", "print('hi')");
console.log(sbx.provider, r.stdout); // e.g. "modal 42"
await sbx.kill();