CLI
Install
Start a shell
TypeScript SDK
The same sandbox runs in Node and in a browser tab, from one package.Install
Run your first sandbox
The first call to
Sandbox.create() downloads the default snapshot (vsnap-base)
and caches it, on disk in Node and in origin-private storage in a browser.Persistent sessions
Everything is async, and state is preserved across calls within one sandbox. Declaring it withawait using closes it when the scope ends:
In a browser
The same code, with the import named so bundlers cannot pick the Node build:Cross-Origin-Opener-Policy: same-origin and
Cross-Origin-Embedder-Policy: require-corp on the page if you want the guest to
have network. Without them the sandbox still boots and runs commands.
Running in a browser covers what the guest can reach,
and the one extra step a bundler needs.
Python SDK
Install
Run your first sandbox
The first call to
Sandbox.create() downloads the default snapshot (alpine) and caches it locally if not already present.Persistent sessions
State is preserved across calls within the same sandbox:Next steps
Python SDK
Sandbox API, snapshots, and suspend & resume from Python.
TypeScript SDK
The same API from Node and the browser.