Directory Compare FCRS-1.0 /llms.txt
← Back to Directory

E2B CLI

$ e2b Official Med Risk
E2B · Agent Bridges & Meta · MIT · macos / linux / windows

E2B CLI (@e2b/cli) manages Firecracker microVM sandboxes and custom sandbox templates (e2b.toml) built for executing untrusted AI-generated code. Supports non-interactive E2B_API_KEY auth, e2b sandbox list, e2b sandbox exec, and e2b template create.

FCRS-1.0 Score
85 /100
Good
Medium Confidence
Zero-Friction Install
brew install e2b
CLI vs MCP Decision Hybrid (CLI + MCP)

e2b CLI handles template builds and sandbox lifecycle management cleanly from CI; E2B's SDK/MCP suits interactive code-interpreter tool calls.

Agent-Readiness Checklist

— JSON Output
— Field Filtering
✓ Non-Interactive
— Dry-Run
— Read-Only Mode
— NO_COLOR Clean
✓ Self-Describing
— Official SKILL.md

Static evaluation (not yet probed on this host). Run npm run data:probe locally to capture live verification.

FCRS-1.0 6-Dimension Breakdown

Agent-Readiness 20 / 25

Supports E2B_API_KEY, sandbox exec, sandbox list, and template build, though lacks universal --json output on list commands.

  • Supports E2B_API_KEY and sandbox exec; lacks --json on list
Trust & Safety 22 / 25

Sandboxes run inside isolated Firecracker microVMs, protecting host machines from untrusted code.

  • Hardware-virtualized Firecracker microVM isolation
Setup & Portability 14 / 15

Available via Homebrew, npm install -g @e2b/cli, and npx @e2b/cli across major OSes.

  • Distributed via Homebrew and @e2b/cli on npm
Utility & Efficiency 13 / 15

Simplifies custom sandbox image builds (e2b.toml) and live microVM inspection.

  • Covers sandbox lifecycle, remote exec, and template builds
Maintenance & Lineage 9 / 10

Official e2b-dev/E2B repository under MIT license.

  • Official e2b-dev/E2B repository
Docs & Verifiability 7 / 10

Clear CLI docs at e2b.dev/docs/cli.

  • Official docs at e2b.dev/docs/cli

Security, Auth & Guardrails

Auth Modes
OAuth Browser Env API Key Config File
Credential Storage

API key via E2B_API_KEY env var or saved locally after e2b auth login.

Side Effects
Read-Only Local Write Remote Write Destructive Billing Impact
Cost & Quotas

CLI is MIT open-source; E2B Cloud includes a free starter credit tier with usage-based microVM billing.

Copyable Guardrail for CLAUDE.md / AGENTS.md
# E2B CLI Agent Rules
- Set `E2B_API_KEY` in headless environments instead of `e2b auth login`.
- Never invoke `e2b sandbox connect` without a command (it opens an interactive PTY shell); use `e2b sandbox exec`.
- Always clean up ephemeral sandboxes with `e2b sandbox kill <id>` to avoid idle billing.

Agent-Ready Command Recipes

Safe Read-Only Queries

List active sandboxes
e2b sandbox list

Displays running E2B sandboxes, template IDs, and start times.

List available sandbox templates
e2b template list

Enumerates custom and built-in sandbox templates in your team.

Controlled Writes & Previews

Execute a non-interactive command inside a sandbox
e2b sandbox exec <sandbox-id> "python3 --version"

Runs a single command inside an isolated microVM sandbox and returns output.

Strengths for Agents

  • + Fast Firecracker microVM isolation for running untrusted AI-generated code.
  • + e2b sandbox exec runs non-interactive commands inside live sandboxes.
  • + Clean E2B_API_KEY environment auth.

Caveats & Pitfalls

  • ! sandbox list and template list output formatted text tables rather than --json.
  • ! e2b sandbox connect opens an interactive PTY terminal—prefer e2b sandbox exec.

Tested Agent Hosts

Claude Code Codex CLI Gemini CLI