JavaScript/TypeScript SDK for E2B's code interpreter service with secure sandbox execution
—
Quality
Pending
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Core sandbox functionality for creating and managing secure code execution environments in the cloud.
The main Sandbox class extends the base E2B sandbox with code interpreter functionality.
/**
* E2B cloud sandbox for secure and isolated code execution
* Extends the base sandbox from the e2b package with code interpreter functionality
* Provides access to Linux OS, file operations, command execution, and code interpretation
*/
class Sandbox {
/**
* Default template identifier for code interpreter sandboxes
*/
protected static readonly defaultTemplate: string; // 'code-interpreter-v1'
}Usage Examples:
import { Sandbox } from "@e2b/code-interpreter";
// Create a basic sandbox
const sandbox = await Sandbox.create();
// Create a sandbox with custom options
const customSandbox = await Sandbox.create({
timeoutMs: 120000, // 2 minutes
apiKey: process.env.E2B_API_KEY
});
// Access sandbox ID
console.log(sandbox.sandboxId);The Sandbox class inherits all functionality from the base E2B SDK, including:
static create(options?: any): Promise<Sandbox> (inherited from base e2b SDK)For complete base functionality, refer to the e2b package documentation.
The code interpreter sandbox extends the base sandbox with:
Install with Tessl CLI
npx tessl i tessl/npm-e2b--code-interpreter