sandbox.commands.run() to execute shell commands. This is the primary method for running commands in your sandbox.
Basic Execution
Options Reference
| Option | Type | Default | Description |
|---|---|---|---|
background | boolean | false | Run without blocking |
envs | object | {} | Environment variables |
user | string | "user" | User to run as |
cwd | string | /home/user | Working directory |
timeout / timeoutMs | number | 60s / 60000ms | Command timeout |
on_stdout / onStdout | function | - | Stdout callback |
on_stderr / onStderr | function | - | Stderr callback |
stdin | boolean | false | Keep stdin open |
request_timeout / requestTimeoutMs | number | - | API request timeout |