sandbox.commands.run().
This page covers
run(). If you need to send input to a process while it runs, like a REPL, spawn() keeps the session open instead.Using
AsyncSandbox? The same methods are there, awaitable. See the Sandbox reference.Handling exit codes
run() doesn’t throw on a non-zero exit code. Check exitCode on the result yourself.
Working directory and environment
Passcwd and env to control the execution context.
Watch the units: TypeScript takes
timeoutMs (milliseconds), Python takes timeout_seconds (seconds).