sandbox_exec
Execute shell commands in a sandbox to run builds, tests, installs, or CLI commands, returning stdout, stderr, and exit code for integration into automated workflows.
Instructions
Execute a shell command in a sandbox and return stdout, stderr, and exit code. Use for running builds, tests, installs, or any CLI command.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sandboxId | Yes | The sandbox ID to run the command in. | |
| command | Yes | The shell command to execute (e.g., "npm install", "python main.py"). | |
| cwd | No | Working directory inside the sandbox. Defaults to /home/user. | |
| timeoutMs | No | Command timeout in milliseconds. Default: 120000 (2 min). Set 0 for no timeout. | |
| envs | No | Environment variables to set for this command. |