Sandbox router for TypeScript

One SDK.
Every sandbox.

A typed API to create, run code in, and tear down sandboxes on boxd, Freestyle, Daytona, E2B, Boat, Runloop, Archil and Vercel. Keep application workflows consistent while configuring each provider explicitly.

v0.15.0 on npm · Getting started
run.ts
import { Beachside } from "beachside"
import { boxdAdapter } from "@beachside/boxd"

const client = await Beachside.connect({
  adapter: boxdAdapter,
  credentials: { apiKey: process.env.BOXD_API_KEY! },
  config: {
    org: process.env.BOXD_ORG!,
    network: "internet",
  },
})
await client.sandboxes.with({}, async (box) => {
  const run = await box.exec(["printf", "ready"])
  console.log(run.stdoutText())
})
await client.close()
 
connecting…
Adapters & support →
  • boxd
  • Freestyle
  • Daytona
  • E2B
  • Boat (exp)
  • Runloop (exp)
  • Archil (exp)
  • exe.dev (exp)
  • Vercel (exp)
  • Modal (exp)
  • + your adapter
@beachside/cli

Same sandboxes. Straight from your shell.

beachside creates, runs in and removes sandboxes on any provider with an adapter. It never prompts for input, every command has a --json form, and exit codes clearly indicate what to do next, so your coding agent can drive it as easily as you can.

Install the CLI
Teach your agent to use it
zsh — beachside
$ export BEACHSIDE_PROVIDER=boxd BOXD_API_KEY=... BOXD_ORG=... BOXD_NETWORK=internet
$ beachside create --name web
web
$ beachside cp ./app.py web:/tmp/app.py
$ beachside exec web -- python3 /tmp/app.py
hello from boxd
$ beachside ls
NAME  STATE    PROVIDER  PROFILE  ID         CREATED
web   running  boxd      boxd     bx_7kq2m9  2026-10-19T09:41:07.312Z
$ beachside rm web
web
exit 0 · sandbox removedvia e2b

Typed workflows. Plain TypeScript.

One API, any provider

Use common create, exec, files and destroy calls. Choose provider configuration and check its supported capabilities.

Plays nice with serverless

Save references to recover across invocations. Scope sandbox cleanup while keeping snapshots and volumes.

Traced end to end

OpenTelemetry traces connect SDK calls, provider operations, errors, and recovery context. Integrates with Sentry and Datadog.

Small adapters

Implement create and destroy to start. Add exec, files and recovery as your provider supports them.

@beachside/adapter

Bring your own provider

Wrap any sandbox API with defineAdapter. Declare config and credential schemas, implement the operations your provider supports, and Beachside handles lifecycle, error mapping and recovery around it.

Writing an adapter →
adapters/acme.ts · excerpt
// Inside your adapter's connect() method:
// Authenticate the client and verify scope first.
return {
  scope,
  supports: { images: ["prepared"], network: ["blocked"] },
  async create(input, ctx) {
    const box = await client.spawn({
      account: account.id,
      imageId: input.image.value,
      region: config.region,
      blockAllEgress: true,
      public: false,
      requestId: ctx.submissionId,
    });
    return {
      id: box.id,
      state: box.ready ? "running" : "unknown",
    };
  },
  async destroy(box) {
    await client.deleteAndWait(box.id, account.id, config.region);
    return { computeStopped: true, retainedResources: [] };
  },
};