您可以使用 commands.run() 方法在沙箱内运行终端命令。

import { Sandbox } from '@e2b/code-interpreter'

const sandbox = await Sandbox.create()

const result = await sandbox.commands.run('ls -l')
console.log(result)