Skip to content

opencoredev/sandbox-sdk

Repository files navigation

Sandbox SDK with supported provider logos

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

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

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

About

A simple oss SDK for spinning sandboxes with one clean syntax.

Topics

Resources

License

Security policy

Stars

57 stars

Watchers

0 watching

Forks

Packages

 
 
 

Contributors