SpyBara
Go Premium

Documentation 2026-04-16 21:13 UTC to 2026-04-17 21:13 UTC

11 files changed +59 −45. View all changes and history on the product overview
2026
Wed 29 21:21 Tue 28 21:21 Mon 27 21:20 Sun 26 04:08 Sat 25 21:10 Fri 24 18:11 Thu 23 18:19 Wed 22 21:15 Tue 21 21:14 Mon 20 21:14 Sat 18 18:09 Fri 17 21:13 Thu 16 21:13 Wed 15 18:20 Tue 14 21:14 Mon 13 21:14 Sat 11 00:11 Fri 10 21:09 Thu 9 21:14 Wed 8 21:13 Tue 7 21:14 Sat 4 18:05 Fri 3 21:07 Thu 2 21:08 Wed 1 21:12
Details

25Each SDK instance requires:25Each SDK instance requires:

26 26 

27* **Runtime dependencies**27* **Runtime dependencies**

28 * Python 3.10+ (for Python SDK) or Node.js 18+ (for TypeScript SDK)28 * Python 3.10+ for the Python SDK, or Node.js 18+ for the TypeScript SDK

29 * Node.js (required by the bundled Claude Code CLI that the SDK spawns; both SDK packages include it, so no separate install is needed)29 * Both SDK packages bundle a native Claude Code binary for the host platform, so no separate Claude Code or Node.js install is needed for the spawned CLI

30 30 

31* **Resource allocation**31* **Resource allocation**

32 * Recommended: 1GiB RAM, 5GiB of disk, and 1 CPU (vary this based on your task as needed)32 * Recommended: 1GiB RAM, 5GiB of disk, and 1 CPU (vary this based on your task as needed)

Details

74 ```74 ```

75 </Tab>75 </Tab>

76 </Tabs>76 </Tabs>

77 

78 <Note>

79 The TypeScript SDK bundles a native Claude Code binary for your platform as an optional dependency, so you don't need to install Claude Code separately.

80 </Note>

77 </Step>81 </Step>

78 82 

79 <Step title="Set your API key">83 <Step title="Set your API key">

Details

59 ```59 ```

60 </Tab>60 </Tab>

61 </Tabs>61 </Tabs>

62 

63 <Note>

64 The TypeScript SDK bundles a native Claude Code binary for your platform as an optional dependency, so you don't need to install Claude Code separately.

65 </Note>

62 </Step>66 </Step>

63 67 

64 <Step title="Set your API key">68 <Step title="Set your API key">

Details

18npm install @anthropic-ai/claude-agent-sdk18npm install @anthropic-ai/claude-agent-sdk

19```19```

20 20 

21<Note>

22 The SDK bundles a native Claude Code binary for your platform as an optional dependency such as `@anthropic-ai/claude-agent-sdk-darwin-arm64`. You don't need to install Claude Code separately. If your package manager skips optional dependencies, the SDK throws `Native CLI binary for <platform> not found`; set [`pathToClaudeCodeExecutable`](#options) to a separately installed `claude` binary instead.

23</Note>

24 

21## Functions25## Functions

22 26 

23### `query()`27### `query()`


345| `mcpServers` | `Record<string, [`McpServerConfig`](#mcp-server-config)>` | `{}` | MCP server configurations |349| `mcpServers` | `Record<string, [`McpServerConfig`](#mcp-server-config)>` | `{}` | MCP server configurations |

346| `model` | `string` | Default from CLI | Claude model to use |350| `model` | `string` | Default from CLI | Claude model to use |

347| `outputFormat` | `{ type: 'json_schema', schema: JSONSchema }` | `undefined` | Define output format for agent results. See [Structured outputs](/en/agent-sdk/structured-outputs) for details |351| `outputFormat` | `{ type: 'json_schema', schema: JSONSchema }` | `undefined` | Define output format for agent results. See [Structured outputs](/en/agent-sdk/structured-outputs) for details |

348| `pathToClaudeCodeExecutable` | `string` | Uses built-in executable | Path to Claude Code executable |352| `pathToClaudeCodeExecutable` | `string` | Auto-resolved from bundled native binary | Path to Claude Code executable. Only needed if optional dependencies were skipped during install or your platform isn't in the supported set |

349| `permissionMode` | [`PermissionMode`](#permission-mode) | `'default'` | Permission mode for the session |353| `permissionMode` | [`PermissionMode`](#permission-mode) | `'default'` | Permission mode for the session |

350| `permissionPromptToolName` | `string` | `undefined` | MCP tool name for permission prompts |354| `permissionPromptToolName` | `string` | `undefined` | MCP tool name for permission prompts |

351| `persistSession` | `boolean` | `true` | When `false`, disables session persistence to disk. Sessions cannot be resumed later |355| `persistSession` | `boolean` | `true` | When `false`, disables session persistence to disk. Sessions cannot be resumed later |

Details

24npm install @anthropic-ai/claude-agent-sdk24npm install @anthropic-ai/claude-agent-sdk

25```25```

26 26 

27<Note>

28 The SDK bundles a native Claude Code binary for your platform as an optional dependency, so you don't need to install Claude Code separately.

29</Note>

30 

27## Quick start31## Quick start

28 32 

29### One-shot prompt33### One-shot prompt

desktop.md +14 −4

Details

8 8 

9The Code tab within the Claude Desktop app lets you use Claude Code through a graphical interface instead of the terminal.9The Code tab within the Claude Desktop app lets you use Claude Code through a graphical interface instead of the terminal.

10 10 

11<CardGroup cols={2}>

12 <Card title="Download for macOS" icon="apple" href="https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code&utm_medium=docs">

13 Universal build for Intel and Apple Silicon

14 </Card>

15 

16 <Card title="Download for Windows" icon="windows" href="https://claude.ai/api/desktop/win32/x64/setup/latest/redirect?utm_source=claude_code&utm_medium=docs">

17 For x64 processors

18 </Card>

19</CardGroup>

20 

21For Windows ARM64, download the [ARM64 installer](https://claude.ai/api/desktop/win32/arm64/setup/latest/redirect?utm_source=claude_code\&utm_medium=docs). Linux is not supported.

22 

23After installing, launch Claude, sign in, and click the **Code** tab. See the [Get started guide](/en/desktop-quickstart) for a full walkthrough of your first session.

24 

11Desktop adds these capabilities on top of the standard Claude Code experience:25Desktop adds these capabilities on top of the standard Claude Code experience:

12 26 

13* [Parallel sessions](#work-in-parallel-with-sessions) with automatic Git worktree isolation27* [Parallel sessions](#work-in-parallel-with-sessions) with automatic Git worktree isolation


22* [Connectors](#connect-external-tools) for GitHub, Slack, Linear, and more36* [Connectors](#connect-external-tools) for GitHub, Slack, Linear, and more

23* Local, [SSH](#ssh-sessions), and [cloud](#run-long-running-tasks-remotely) environments37* Local, [SSH](#ssh-sessions), and [cloud](#run-long-running-tasks-remotely) environments

24 38 

25<Tip>

26 New to Desktop? Start with [Get started](/en/desktop-quickstart) to install the app and make your first edit.

27</Tip>

28 

29<Note>39<Note>

30 The workspace layout, terminal, file editor, side chats, and view modes described on this page require Claude Desktop v1.2581.0 or later. Open **Claude → Check for Updates** on macOS or **Help → Check for Updates** on Windows to update.40 The workspace layout, terminal, file editor, side chats, and view modes described on this page require Claude Desktop v1.2581.0 or later. Open **Claude → Check for Updates** on macOS or **Help → Check for Updates** on Windows to update.

31</Note>41</Note>

Details

8 8 

9The desktop app gives you Claude Code with a graphical interface built for running multiple sessions side by side: a sidebar for managing parallel work, a drag-and-drop layout with an integrated terminal and file editor, visual diff review, live app preview, GitHub PR monitoring with auto-merge, and scheduled tasks. No terminal required.9The desktop app gives you Claude Code with a graphical interface built for running multiple sessions side by side: a sidebar for managing parallel work, a drag-and-drop layout with an integrated terminal and file editor, visual diff review, live app preview, GitHub PR monitoring with auto-merge, and scheduled tasks. No terminal required.

10 10 

11Download Claude for your platform:

12 

13<CardGroup cols={2}>11<CardGroup cols={2}>

14 <Card title="macOS" icon="apple" href="https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code&utm_medium=docs">12 <Card title="Download for macOS" icon="apple" href="https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code&utm_medium=docs">

15 Universal build for Intel and Apple Silicon13 Universal build for Intel and Apple Silicon

16 </Card>14 </Card>

17 15 

18 <Card title="Windows" icon="windows" href="https://claude.ai/api/desktop/win32/x64/setup/latest/redirect?utm_source=claude_code&utm_medium=docs">16 <Card title="Download for Windows" icon="windows" href="https://claude.ai/api/desktop/win32/x64/setup/latest/redirect?utm_source=claude_code&utm_medium=docs">

19 For x64 processors17 For x64 processors

20 </Card>18 </Card>

21</CardGroup>19</CardGroup>

22 20 

23For Windows ARM64, download the [ARM64 installer](https://claude.ai/api/desktop/win32/arm64/setup/latest/redirect?utm_source=claude_code\&utm_medium=docs). Linux is not currently supported.21For Windows ARM64, download the [ARM64 installer](https://claude.ai/api/desktop/win32/arm64/setup/latest/redirect?utm_source=claude_code\&utm_medium=docs). Linux is not supported.

24 22 

25<Note>23<Note>

26 Claude Code requires a [Pro, Max, Team, or Enterprise subscription](https://claude.com/pricing?utm_source=claude_code\&utm_medium=docs\&utm_content=desktop_quickstart_pricing).24 Claude Code requires a [Pro, Max, Team, or Enterprise subscription](https://claude.com/pricing?utm_source=claude_code\&utm_medium=docs\&utm_content=desktop_quickstart_pricing).


40 38 

41<Steps>39<Steps>

42 <Step title="Install and sign in">40 <Step title="Install and sign in">

43 Download Claude for your platform and run the installer:41 Download the installer for your platform from the links above and run it. Launch Claude from your Applications folder on macOS or the Start menu on Windows, then sign in with your Anthropic account.

44 

45 * [macOS](https://claude.ai/api/desktop/darwin/universal/dmg/latest/redirect?utm_source=claude_code\&utm_medium=docs): universal build for Intel and Apple Silicon

46 * [Windows x64](https://claude.ai/api/desktop/win32/x64/setup/latest/redirect?utm_source=claude_code\&utm_medium=docs): for x64 processors

47 * [Windows ARM64](https://claude.ai/api/desktop/win32/arm64/setup/latest/redirect?utm_source=claude_code\&utm_medium=docs): for ARM processors

48 

49 Launch Claude from your Applications folder (macOS) or Start menu (Windows). Sign in with your Anthropic account.

50 </Step>42 </Step>

51 43 

52 <Step title="Open the Code tab">44 <Step title="Open the Code tab">

model-config.md +2 −0

Details

150This gives you the best of both worlds: Opus's superior reasoning for planning,150This gives you the best of both worlds: Opus's superior reasoning for planning,

151and Sonnet's efficiency for execution.151and Sonnet's efficiency for execution.

152 152 

153The plan-mode Opus phase runs with the standard 200K context window. The automatic 1M upgrade described in [Extended context](#extended-context) applies to the `opus` model setting and does not extend to `opusplan`.

154 

153### Adjust effort level155### Adjust effort level

154 156 

155[Effort levels](https://platform.claude.com/docs/en/build-with-claude/effort) control adaptive reasoning, which lets the model decide whether and how much to think on each step based on task complexity. Lower effort is faster and cheaper for straightforward tasks, while higher effort provides deeper reasoning for complex problems.157[Effort levels](https://platform.claude.com/docs/en/build-with-claude/effort) control adaptive reasoning, which lets the model decide whether and how much to think on each step based on task complexity. Lower effort is faster and cheaper for straightforward tasks, while higher effort provides deeper reasoning for complex problems.

routines.md +0 −2

Details

250| Labels | Labels applied to the PR |250| Labels | Labels applied to the PR |

251| Is draft | Whether the PR is in draft state |251| Is draft | Whether the PR is in draft state |

252| Is merged | Whether the PR has been merged |252| Is merged | Whether the PR has been merged |

253| From fork | Whether the PR comes from a fork |

254 253 

255Each filter pairs a field with an operator: equals, contains, starts with, is one of, is not one of, or matches regex.254Each filter pairs a field with an operator: equals, contains, starts with, is one of, is not one of, or matches regex.

256 255 


259A few example filter combinations:258A few example filter combinations:

260 259 

261* **Auth module review**: base branch `main`, head branch contains `auth-provider`. Sends any PR that touches authentication to a focused reviewer.260* **Auth module review**: base branch `main`, head branch contains `auth-provider`. Sends any PR that touches authentication to a focused reviewer.

262* **External contributor triage**: from fork is `true`. Routes every fork-based PR through an extra security and style review before a human looks at it.

263* **Ready-for-review only**: is draft is `false`. Skips drafts so the routine only runs when the PR is ready for review.261* **Ready-for-review only**: is draft is `false`. Skips drafts so the routine only runs when the PR is ready for review.

264* **Label-gated backport**: labels include `needs-backport`. Triggers a port-to-another-branch routine only when a maintainer tags the PR.262* **Label-gated backport**: labels include `needs-backport`. Triggers a port-to-another-branch routine only when a maintainer tags the PR.

265 263 

setup.md +10 −24

Details

41 <Tab title="Native Install (Recommended)">41 <Tab title="Native Install (Recommended)">

42 **macOS, Linux, WSL:**42 **macOS, Linux, WSL:**

43 43 

44 ```bash theme={null}44 ```bash theme={null} theme={null} theme={null} theme={null}

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

46 ```46 ```

47 47 

48 **Windows PowerShell:**48 **Windows PowerShell:**

49 49 

50 ```powershell theme={null}50 ```powershell theme={null} theme={null} theme={null} theme={null}

51 irm https://claude.ai/install.ps1 | iex51 irm https://claude.ai/install.ps1 | iex

52 ```52 ```

53 53 

54 **Windows CMD:**54 **Windows CMD:**

55 55 

56 ```batch theme={null}56 ```batch theme={null} theme={null} theme={null} theme={null}

57 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd57 curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

58 ```58 ```

59 59 


67 </Tab>67 </Tab>

68 68 

69 <Tab title="Homebrew">69 <Tab title="Homebrew">

70 ```bash theme={null}70 ```bash theme={null} theme={null} theme={null} theme={null}

71 brew install --cask claude-code71 brew install --cask claude-code

72 ```72 ```

73 73 


79 </Tab>79 </Tab>

80 80 

81 <Tab title="WinGet">81 <Tab title="WinGet">

82 ```powershell theme={null}82 ```powershell theme={null} theme={null} theme={null} theme={null}

83 winget install Anthropic.ClaudeCode83 winget install Anthropic.ClaudeCode

84 ```84 ```

85 85 


315 </Tab>315 </Tab>

316</Tabs>316</Tabs>

317 317 

318### Deprecated npm installation318### Install with npm

319 

320npm installation is deprecated. The native installer is faster, requires no dependencies, and auto-updates in the background. Use the [native installation](#install-claude-code) method when possible.

321 319 

322#### Migrate from npm to native320You can also install Claude Code as a global npm package. The package requires [Node.js 18 or later](https://nodejs.org/en/download).

323 

324If you previously installed Claude Code with npm, switch to the native installer:

325 321 

326```bash theme={null}322```bash theme={null}

327# Install the native binary323npm install -g @anthropic-ai/claude-code

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

329 

330# Remove the old npm installation

331npm uninstall -g @anthropic-ai/claude-code

332```324```

333 325 

334You can also run `claude install` from an existing npm installation to install the native binary alongside it, then remove the npm version.326The npm package installs the same native binary as the standalone installer. npm pulls the binary in through a per-platform optional dependency such as `@anthropic-ai/claude-code-darwin-arm64`, and a postinstall step links it into place. The installed `claude` binary does not itself invoke Node.

335 

336#### Install with npm

337 

338If you need npm installation for compatibility reasons, you must have [Node.js 18+](https://nodejs.org/en/download) installed. Install the package globally:

339 327 

340```bash theme={null}328Supported npm install platforms are `darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`, `linux-x64-musl`, `linux-arm64-musl`, `win32-x64`, and `win32-arm64`. Your package manager must allow optional dependencies. See [troubleshooting](/en/troubleshooting#native-binary-not-found-after-npm-install) if the binary is missing after install.

341npm install -g @anthropic-ai/claude-code

342```

343 329 

344<Warning>330<Warning>

345 Do NOT use `sudo npm install -g` as this can lead to permission issues and security risks. If you encounter permission errors, see [troubleshooting permission errors](/en/troubleshooting#permission-errors-during-installation).331 Do NOT use `sudo npm install -g` as this can lead to permission issues and security risks. If you encounter permission errors, see [troubleshooting permission errors](/en/troubleshooting#permission-errors-during-installation).

Details

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

640```640```

641 641 

642### Native binary not found after npm install

643 

644The `@anthropic-ai/claude-code` npm package pulls in the native binary through a per-platform optional dependency such as `@anthropic-ai/claude-code-darwin-arm64`. If running `claude` after install prints `Could not find native binary package "@anthropic-ai/claude-code-<platform>"`, check the following causes:

645 

646* **Optional dependencies are disabled.** Remove `--omit=optional` from your npm install command, `--no-optional` from pnpm, or `--ignore-optional` from yarn, and check that `.npmrc` does not set `optional=false`. Then reinstall. The native binary is delivered only as an optional dependency, so there is no JavaScript fallback if it is skipped.

647* **Unsupported platform.** Prebuilt binaries are published for `darwin-arm64`, `darwin-x64`, `linux-x64`, `linux-arm64`, `linux-x64-musl`, `linux-arm64-musl`, `win32-x64`, and `win32-arm64`. Claude Code does not ship a binary for other platforms; see the [system requirements](/en/setup#system-requirements).

648* **Corporate npm mirror is missing the platform packages.** Ensure your registry mirrors all eight `@anthropic-ai/claude-code-*` platform packages in addition to the meta package.

649 

650Installing with `--ignore-scripts` does not trigger this error. The postinstall step that links the binary into place is skipped, so Claude Code falls back to a wrapper that locates and spawns the platform binary on each launch. This works but starts more slowly; reinstall with scripts enabled for direct execution.

651 

642## Permissions and authentication652## Permissions and authentication

643 653 

644These sections address login failures, token issues, and permission prompt behavior.654These sections address login failures, token issues, and permission prompt behavior.