简体中文
commands.run()
background
commands.kill()
import { Sandbox } from '@e2b/code-interpreter' const sandbox = await Sandbox.create() // 在后台运行命令 const command = await sandbox.commands.run('echo hello; sleep 10; echo world', { background: true, onStdout: (data) => { console.log(data) }, }) // 终止命令 await command.kill()