Skip to content

Latest commit

 

History

History
51 lines (34 loc) · 2.4 KB

File metadata and controls

51 lines (34 loc) · 2.4 KB

Sandbox SDK with supported provider logos

Run the same TypeScript sandbox code on Local, E2B, Daytona, Vercel Sandbox, Upstash Box, Ascii Box, or Railway Sandboxes.

Install

bun add @opencoredev/sandbox-sdk

Node.js 22 or 24 is supported. Bun 1.3 or newer is also supported.

Quickstart

import { createSandbox } from "@opencoredev/sandbox-sdk";
import { local } from "@opencoredev/sandbox-sdk/local";

await using sandbox = await createSandbox({ provider: local() });
console.log((await sandbox.run("node --version")).stdout);

await using stops the sandbox automatically when its scope exits, including when an operation throws.

Node.js 24 and Bun run this syntax directly. On Node.js 22, compile TypeScript to ES2022 or use the callback-style withSandbox() helper.

Providers

Provider Runtime Best for
Local AgentOS VM Development, CI, and self-hosting
E2B Hosted Linux sandbox Coding agents and isolated jobs
Daytona Cloud workspace Persistent projects and GPUs
Vercel Sandbox Hosted Linux sandbox Coding agents and persistent workspaces
Upstash Box Durable cloud container Serverless agents and long-lived state
Ascii Box Persistent cloud VM Full VMs and protected app previews
Railway Ephemeral cloud VM Durable jobs and private networking

Local is included. Cloud providers use their official SDKs and credentials.

Documentation

Setup, usage, integrations, and API reference are available at sandbox-sdk.app/docs.

Maintainer release instructions are in RELEASING.md.

License

MIT © OpenCore