Install
Core concepts
Every sandbox has two layers:- System driver provides host capabilities: filesystem, network, child processes, and permissions.
- The execution environment runs code in a V8 isolate.
Create a runtime
Execute code
Two methods for running sandboxed code:exec() for automation loops, CLI-style output capture, and per-call environment overrides. Use run() when the sandbox should return a value via export. See exec vs run for the full comparison.
Capture output
Console output is not buffered by default. Use theonStdio hook to capture it:
TypeScript
Optional companion package for sandboxed type checking and compilation:- Type-check Source
- Type-check Project
- Compile Source
- Compile Project
Permissions
All capabilities are blocked unless you opt in:Resource limits
Prevent runaway execution with CPU and memory bounds:Filesystem
Networking
Clean up
Next steps
Runtimes
Node runtime details.
System Drivers
Configure host capabilities per environment.
Security Model
Trust boundaries, timing hardening, and isolation guarantees.
API Reference
Complete type and method reference.