Skip to main content
You need a Styne API key: create one on the dashboard (API keys).
1

Install and set your key

The unmodified e2b package works: those three variables are the only change from E2B (Switch from E2B). E2B_SANDBOX_URL sends the commands and file calls of every sandbox over one kept-open connection, so the first command of a new sandbox answers as fast as the second. styne login stores your key with mode 600; in CI set STYNE_API_KEY instead.
2

Create a sandbox and run a command

Save the TypeScript version as quickstart.mjs (or .ts) and run node quickstart.mjs. Expected output:
3

Know what just happened

A sandbox you do not kill ends at its timeout: 300 seconds here, 1 to 86,400 allowed. In Python a command that exits non-zero raises CommandExitException with the exit code and the output; the CLI’s exec exits with the command’s exit code.

Next

Run commands

Several commands, background processes, stdin and streaming output.

Timeouts, pause and resume

Keep memory, processes and files between tasks.

Fork and snapshots

Copy a running sandbox, or save one and start many from it.

API reference

Every operation of the sandbox API.

Operations