CtrlK
BlogDocsLog inGet started
Tessl Logo

tessl/npm-e2b--code-interpreter

JavaScript/TypeScript SDK for E2B's code interpreter service with secure sandbox execution

Pending

Quality

Pending

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

Overview
Eval results
Files

sandbox.mddocs/

Sandbox Management

Core sandbox functionality for creating and managing secure code execution environments in the cloud.

Capabilities

Sandbox Class

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);

Inherited Base Functionality

The Sandbox class inherits all functionality from the base E2B SDK, including:

  • Static create method: static create(options?: any): Promise<Sandbox> (inherited from base e2b SDK)
  • File system operations (create, read, write, delete files and directories)
  • Command execution capabilities
  • Network access within the sandbox
  • Environment variable management
  • Process management
  • Terminal access

For complete base functionality, refer to the e2b package documentation.

Integration Notes

The code interpreter sandbox extends the base sandbox with:

  • Jupyter kernel integration for code execution
  • Multi-language support (Python, Deno/TypeScript, etc.)
  • Result streaming and formatting
  • Chart generation and visualization support
  • Stateful execution contexts

Install with Tessl CLI

npx tessl i tessl/npm-e2b--code-interpreter

docs

charts.md

contexts.md

execution.md

index.md

results.md

sandbox.md

tile.json