ai-engineerJR Academy
Run Claude Code in an isolated E2B cloud sandbox
Use an E2B sandbox to run Claude Code in an isolated cloud environment for agent testing, system commands and database operations.
AI EngineerSandboxSecurityCloud environments
Contents
![]()
An E2B sandbox gives Claude Code a separate cloud environment for running system commands, trying unfamiliar dependencies and testing agents. The sandbox keeps these experiments away from your local development setup and can be cleaned up afterwards.
Benefits
- Isolation: Run commands in the cloud without giving the sandbox access to your local files.
- Local configuration: Test changes without modifying your own machine.
- Clean environment: Start from Ubuntu with Claude Code.
- Remote execution: Run heavier workloads in the cloud.
- Cleanup: Failed experiments can be removed with the sandbox.
Prerequisites
- An E2B API key from the E2B dashboard.
- An Anthropic API key from the Anthropic Console.
- Python 3.11 or later.
Quick start
BASH
npx claude-code-templates@latest --sandbox e2b \
--e2b-api-key your_e2b_key \
--anthropic-api-key your_anthropic_key \
--prompt "Create a React todo app with TypeScript"
Run a specific agent
BASH
npx claude-code-templates@latest --sandbox e2b \
--e2b-api-key your_e2b_key \
--anthropic-api-key your_anthropic_key \
--agent development-team/frontend-developer \
--prompt "Create a modern todo app with TypeScript and Tailwind"
Common uses
- Test system configuration changes in an isolated environment.
- Run security checks on your own software.
- Rehearse database migrations and rollbacks.
- Try unfamiliar packages before installing them locally.
Directory layout after installation
TEXT
your-project/
├── .claude/
│ └── sandbox/
│ ├── e2b-launcher.py
│ ├── requirements.txt
│ └── .env.example
└── sandbox-xxxxxxxx/
├── index.html
└── src/
Further reading
Author: JR AcademyMore articles by this author →
Related certifications
Start with a few sample questions or a free chapter. The exam guide covers what the exam tests; the question bank lets you practise by exam domain.
Foundational
Claude Certified Architect – Foundations
CCAR-F
Foundational
Claude Certified Developer – Foundations
CCDV-F
Associate
Claude Certified Associate – Foundations
CCAO-F
Related learning resources
Continue reading
Your First MCP Server: Python, Claude Desktop and the Pitfalls That Block Connections
Build a small Python MCP server, connect it to Claude Desktop, diagnose stdio and configuration errors, and explore filesystem, GitHub, fetch, Postgres and search integrations.
2026-07-22
Rewriting awesome-ai After Nine Years of Curation
Notes on rebuilding an AI resource list started in 2017: removing stale links, adding modern development tools, localising the Chinese edition and making maintenance repeatable.
2026-05-06
Claude Code and Supabase integration guide
Use Claude Code agents, commands and MCP with Supabase for schema design, migrations, types and security.
2025-01-15