# Claude Code

Claude Code runs in its own tab in each [pane](/docs/panes-and-worktrees), on that pane's branch.

## Install

```bash
curl -fsSL https://claude.ai/install.sh | bash
```

On Windows, run `irm https://claude.ai/install.ps1 | iex` in PowerShell. Or use npm: `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"]} /> (<KeyCombo keys={["Ctrl", "Alt", "3"]} /> on Windows and Linux) or press <KeyCombo keys={["⌘", "⇧", "P"]} /> (Open Search) and choose **Add Claude Code**.

<TerminalPreview lines={[
  { type: "command", text: "claude --dangerously-skip-permissions" },
  { 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"]} />.

> **Warning:** Pane starts it as `claude --dangerously-skip-permissions`, so it edits files and runs any command on your machine without asking. To have it ask first, add Claude Code as a [custom command](/docs/custom-agents): just `claude`.

Pane remembers each Claude Code tab's conversation. After a restart, use **Resume Previous Panes** to resume it with `--resume`.
