Skip to main content
Env vars set at creation time are applied to every process the sandbox runs: commands.run(), shells, and anything those spawn. They persist across pause() / resume() cycles.
Env var values are delivered in plain text — any process in the sandbox can read them. For API keys and other credentials, use secrets instead: the sandbox only ever holds a stand-in token, and the real value is attached to outbound requests.

Per-command overrides

The env option on commands.run() adds to or overrides the sandbox-wide env for a single command.
Values pass through unmodified - no shell expansion or interpolation. Escape $ and special characters yourself if needed.