简体中文
npm i @e2b/code-interpreter@beta
npm i e2b@beta
npm i @e2b/desktop@beta
npm i -g @e2b/cli@v1.9.2
export E2B_DOMAIN=sandbox.ppio.cn export E2B_API_KEY="<Your PPIO API Key>"
import { Sandbox } from '@e2b/code-interpreter' // or import { Sandbox } from 'e2b' // or import { Sandbox } from '@e2b/desktop' const sbx = await Sandbox.create() const execution = await sbx.commands.run('ls -l') console.log(execution) await sbx.kill()
export E2B_DOMAIN=sandbox.ppio.cn # Authentication in CLI e2b auth login # Start sandbox and connect to terminal e2b sandbox spawn <template-id> # List sandboxes e2b sandbox list # Shutdown running sandboxes e2b sandbox kill <sandbox-id>