Execute a command in the sandbox.
Commands are run using the sandbox's shell.
execute(command: string): Promise<ExecuteResponse>| Name | Type | Description |
|---|---|---|
command* | string | 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