# Claude Code

import { Callout } from "nextra/components";

## Install

```bash
npm install -g @anthropic-ai/claude-code
```

## Authenticate

**API key** — add to your shell profile:

```bash
export ANTHROPIC_API_KEY="sk-ant-..."
```

**Claude Pro / Max** — skip the key. Run `claude` once and log in via the browser prompt.

## Launch

Press <KeyCombo keys={["⌘", "⌥", "3"]} /> or open the Command Palette → **Add Claude Code**.

A dedicated tab opens and Claude Code is ready.

<TerminalPreview lines={[
  { type: "command", text: "claude" },
  { type: "output",  text: "Welcome to Claude Code v1.0" },
  { type: "output",  text: "" },
  { type: "command", text: "Add input validation to the login form" },
  { type: "success", text: "✓ Modified src/login.tsx" },
  { type: "success", text: "✓ Modified src/validators.ts" }
]} />

Review the changes in **Changes** (<KeyCombo keys={["⌘", "⇧", "B"]} />), then commit with <KeyCombo keys={["⌘", "⇧", "K"]} />.

<Toggle title="Permissions & picking up where you left off">

**Permissions**

Pane's **Add Claude Code** button starts it as `claude --dangerously-skip-permissions`, so it doesn't stop to ask before each edit or command. The pane's worktree keeps its changes away from your main branch, but Claude Code can still run any command on your machine. Want it to ask first? Add Claude Code as a [custom command](/docs/custom-agents): just `claude`.

**Picking up where you left off**

Pane remembers each Claude Code tab's conversation. Restart Pane and the tab resumes it with `--resume`. No manual steps needed.

</Toggle>
