| Name | Type | Description |
|---|---|---|
command* | string |
Execute a command in the sandbox.
Commands are run using sh -c to execute the command string. Uses sh instead of bash for compatibility with minimal images like Alpine.
The shell command to execute
const result = await sandbox.execute("echo 'Hello World'");
console.log(result.output); // "Hello World\n"
console.log(result.exitCode); // 0