Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/agents/claude-code.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
icon: "/images/icons/claude-code.svg"
---

[Claude Code](https://docs.anthropic.com/en/docs/claude-code) is Anthropic's agentic coding tool. E2B provides a pre-built `claude` template with Claude Code already installed.

Check warning on line 7 in docs/agents/claude-code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/agents/claude-code.mdx#L7

Did you really mean 'Anthropic's'?

Check warning on line 7 in docs/agents/claude-code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/agents/claude-code.mdx#L7

Did you really mean 'agentic'?

## CLI

Expand Down Expand Up @@ -64,7 +64,7 @@

const sandbox = await Sandbox.create('claude', {
envs: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY },
timeoutMs: 600_000,

Check warning on line 67 in docs/agents/claude-code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/agents/claude-code.mdx#L67

Did you really mean 'timeoutMs'?
})

await sandbox.git.clone('https://github.com/your-org/your-repo.git', {
Expand Down Expand Up @@ -212,7 +212,7 @@

## Resume a session

Claude Code persists conversations that can be resumed with follow-up tasks using `--session-id`.
Claude Code persists conversations that can be resumed with follow-up tasks using `--resume`.

<CodeGroup>
```typescript JavaScript & TypeScript
Expand All @@ -220,7 +220,7 @@

const sandbox = await Sandbox.create('claude', {
envs: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY },
timeoutMs: 600_000,

Check warning on line 223 in docs/agents/claude-code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/agents/claude-code.mdx#L223

Did you really mean 'timeoutMs'?
})

// Start a new session
Expand All @@ -230,11 +230,11 @@

// Extract session ID from the JSON response
const response = JSON.parse(initial.stdout)
const sessionId = response.session_id

Check warning on line 233 in docs/agents/claude-code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/agents/claude-code.mdx#L233

Did you really mean 'sessionId'?

// Continue with a follow-up task
const followUp = await sandbox.commands.run(
`cd /home/user/repo && claude --dangerously-skip-permissions --session-id ${sessionId} -p "Now implement step 1 of the plan"`,
`cd /home/user/repo && claude --dangerously-skip-permissions --resume ${sessionId} -p "Now implement step 1 of the plan"`,
{ onStdout: (data) => process.stdout.write(data) }
)

Expand Down Expand Up @@ -263,7 +263,7 @@

# Continue with a follow-up task
follow_up = sandbox.commands.run(
f'cd /home/user/repo && claude --dangerously-skip-permissions --session-id {session_id} -p "Now implement step 1 of the plan"',
f'cd /home/user/repo && claude --dangerously-skip-permissions --resume {session_id} -p "Now implement step 1 of the plan"',
on_stdout=lambda data: print(data, end=""),
)

Expand Down Expand Up @@ -334,7 +334,7 @@

const sandbox = await Sandbox.create('claude', {
envs: { ANTHROPIC_API_KEY: process.env.ANTHROPIC_API_KEY },
mcp: {

Check warning on line 337 in docs/agents/claude-code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/agents/claude-code.mdx#L337

Did you really mean 'mcp'?
browserbase: {
apiKey: process.env.BROWSERBASE_API_KEY,
projectId: process.env.BROWSERBASE_PROJECT_ID,
Expand All @@ -342,8 +342,8 @@
},
})

const mcpUrl = sandbox.getMcpUrl()

Check warning on line 345 in docs/agents/claude-code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/agents/claude-code.mdx#L345

Did you really mean 'mcpUrl'?
const mcpToken = await sandbox.getMcpToken()

Check warning on line 346 in docs/agents/claude-code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/agents/claude-code.mdx#L346

Did you really mean 'mcpToken'?

await sandbox.commands.run(
`claude mcp add --transport http e2b-mcp-gateway ${mcpUrl} --header "Authorization: Bearer ${mcpToken}"`
Expand Down Expand Up @@ -437,7 +437,7 @@

<CodeGroup>
```bash JavaScript & TypeScript
npx tsx build.ts

Check warning on line 440 in docs/agents/claude-code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/agents/claude-code.mdx#L440

Did you really mean 'npx'?
```
```bash Python
python build.py
Expand All @@ -454,6 +454,6 @@
Auto-pause, resume, and manage sandbox lifecycle
</Card>
<Card title="Git integration" icon="code-branch" href="/docs/sandbox/git-integration">
Clone repos, manage branches, and push changes

Check warning on line 457 in docs/agents/claude-code.mdx

View check run for this annotation

Mintlify / Mintlify Validation (e2b) - vale-spellcheck

docs/agents/claude-code.mdx#L457

Did you really mean 'repos'?
</Card>
</CardGroup>
Loading