opensandbox
v0.3.0
Published
TypeScript SDK for OpenSandbox - E2B-compatible sandbox platform
Downloads
200
Maintainers
Readme
opensandbox
TypeScript SDK for OpenSandbox — an open-source, E2B-compatible sandbox platform.
Install
npm install opensandboxQuick Start
import { Sandbox } from "opensandbox";
const sandbox = await Sandbox.create({ template: "base" });
// Execute commands
const result = await sandbox.commands.run("echo hello");
console.log(result.stdout); // "hello\n"
// Read and write files
await sandbox.files.write("/tmp/test.txt", "Hello, world!");
const content = await sandbox.files.read("/tmp/test.txt");
// Clean up
await sandbox.kill();Configuration
| Option | Env Variable | Default |
|-----------|------------------------|--------------------------|
| apiUrl | OPENSANDBOX_API_URL | https://app.opensandbox.ai |
| apiKey | OPENSANDBOX_API_KEY | (none) |
License
MIT
