Execute a command in the sandbox.
run(command: string, options: RunOptions = {}): Promise<ExecutionResult>| Name | Type | Description |
|---|---|---|
command* | string | Shell command to execute. |
options | RunOptions | Default: {}Execution options. |
const result = await sandbox.run("echo hello");
console.log(result.stdout); // "hello\n"
console.log(result.exit_code); // 0