mcpField
E
e2b-sandbox

e2b-sandbox

github.com/computesdkCloud & DevOps182 installsUpdated 3d ago
Repository

About e2b-sandbox

e2b-sandbox is a ComputeSDK skill for creating and managing E2B cloud sandboxes, aimed at developers running commands or working with files in isolated Linux environments. It uses ComputeSDK’s shared sandbox API.

Key features

  1. 01Create and retrieve sandboxes
  2. 02Run commands in a sandbox
  3. 03Access sandbox filesystem
  4. 04Inspect, connect to, and destroy sandboxes
  5. 05Configure API key and execution timeout

Use cases

  1. 01Run commands in an isolated Linux environment
  2. 02Read and write files in a cloud sandbox

Install

Copy the command and run it in a terminal.

$npx skills add https://github.com/computesdk/sandbox-skills --skill e2b-sandbox

After installing, type/e2b-sandboxin Claude Code to confirm it loaded.

Details

From the project README

E2B Sandboxes with ComputeSDK

E2B provider for ComputeSDK - cloud sandboxes with full Linux environments, filesystem access, and microVM isolation.

Setup

npm install computesdk @computesdk/e2b

Set your credentials:

# .env
E2B_API_KEY=your_e2b_api_key

Quick Start

import { compute } from 'computesdk';
import { e2b } from '@computesdk/e2b';

compute.setConfig({
  provider: e2b({
    apiKey: process.env.E2B_API_KEY,
  }),
});

const sandbox = await compute.sandbox.create();

const result = await sandbox.runCommand('echo "Hello from E2B!"');
console.log(result.stdout);

await sandbox.destroy();

You can also call the provider factory directly:

import { e2b } from '@computesdk/e2b';

const sdk = e2b({
    apiKey: process.env.E2B_API_KEY,
  });
const sandbox = await sdk.sandbox.create();

E2B Configuration

interface E2BConfig {

  /** E2B API key - if not provided, will fallback to E2B_API_KEY environment variable */
  apiKey?: string;
  /** Execution timeout in milliseconds */
  timeout?: number;

}

Full API

ComputeSDK exposes the same universal sandbox API across providers: sandbox.create(), sandbox.getById(), sandbox.destroy(), sandbox.runCommand(), sandbox.getInfo(), sandbox.getUrl(), and sandbox.filesystem.*.

Install the main skill for the complete reference:

npx skills add https://github.com/computesdk/sandbox-skills --skill computesdk

Or see https://www.computesdk.com/docs/reference/sandbox/.

Comments

Markdown supported