SpyBara
Go Premium

Documentation 2026-01-26 21:03 UTC to 2026-01-27 21:01 UTC

8 files changed +330 −125. View all changes and history on the product overview
2026
Sat 31 03:42 Fri 30 18:07 Thu 29 21:03 Wed 28 15:06 Tue 27 21:01 Mon 26 21:03 Sun 25 03:34 Sat 24 03:29 Fri 23 21:01 Thu 22 21:03 Wed 21 21:05 Tue 20 21:03 Mon 19 21:01 Fri 16 21:01 Wed 14 06:02 Mon 12 21:02 Sun 11 18:02 Sat 10 21:01 Fri 9 21:01 Thu 8 21:02 Wed 7 21:01 Tue 6 21:01 Sat 3 18:02
Details

519 ```bash theme={null}519 ```bash theme={null}

520 for file in $(cat files.txt); do520 for file in $(cat files.txt); do

521 claude -p "Migrate $file from React to Vue. Return OK or FAIL." \521 claude -p "Migrate $file from React to Vue. Return OK or FAIL." \

522 --allowedTools "Edit,Bash(git commit:*)"522 --allowedTools "Edit,Bash(git commit *)"

523 done523 done

524 ```524 ```

525 </Step>525 </Step>

Details

30| `--agent` | Specify an agent for the current session (overrides the `agent` setting) | `claude --agent my-custom-agent` |30| `--agent` | Specify an agent for the current session (overrides the `agent` setting) | `claude --agent my-custom-agent` |

31| `--agents` | Define custom [subagents](/en/sub-agents) dynamically via JSON (see below for format) | `claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'` |31| `--agents` | Define custom [subagents](/en/sub-agents) dynamically via JSON (see below for format) | `claude --agents '{"reviewer":{"description":"Reviews code","prompt":"You are a code reviewer"}}'` |

32| `--allow-dangerously-skip-permissions` | Enable permission bypassing as an option without immediately activating it. Allows composing with `--permission-mode` (use with caution) | `claude --permission-mode plan --allow-dangerously-skip-permissions` |32| `--allow-dangerously-skip-permissions` | Enable permission bypassing as an option without immediately activating it. Allows composing with `--permission-mode` (use with caution) | `claude --permission-mode plan --allow-dangerously-skip-permissions` |

33| `--allowedTools` | Tools that execute without prompting for permission. See [permission rule syntax](/en/settings#permission-rule-syntax) for pattern matching. To restrict which tools are available, use `--tools` instead | `"Bash(git log:*)" "Bash(git diff:*)" "Read"` |33| `--allowedTools` | Tools that execute without prompting for permission. See [permission rule syntax](/en/settings#permission-rule-syntax) for pattern matching. To restrict which tools are available, use `--tools` instead | `"Bash(git log *)" "Bash(git diff *)" "Read"` |

34| `--append-system-prompt` | Append custom text to the end of the default system prompt (works in both interactive and print modes) | `claude --append-system-prompt "Always use TypeScript"` |34| `--append-system-prompt` | Append custom text to the end of the default system prompt (works in both interactive and print modes) | `claude --append-system-prompt "Always use TypeScript"` |

35| `--append-system-prompt-file` | Load additional system prompt text from a file and append to the default prompt (print mode only) | `claude -p --append-system-prompt-file ./extra-rules.txt "query"` |35| `--append-system-prompt-file` | Load additional system prompt text from a file and append to the default prompt (print mode only) | `claude -p --append-system-prompt-file ./extra-rules.txt "query"` |

36| `--betas` | Beta headers to include in API requests (API key users only) | `claude --betas interleaved-thinking` |36| `--betas` | Beta headers to include in API requests (API key users only) | `claude --betas interleaved-thinking` |


39| `--dangerously-skip-permissions` | Skip all permission prompts (use with caution) | `claude --dangerously-skip-permissions` |39| `--dangerously-skip-permissions` | Skip all permission prompts (use with caution) | `claude --dangerously-skip-permissions` |

40| `--debug` | Enable debug mode with optional category filtering (for example, `"api,hooks"` or `"!statsig,!file"`) | `claude --debug "api,mcp"` |40| `--debug` | Enable debug mode with optional category filtering (for example, `"api,hooks"` or `"!statsig,!file"`) | `claude --debug "api,mcp"` |

41| `--disable-slash-commands` | Disable all skills and slash commands for this session | `claude --disable-slash-commands` |41| `--disable-slash-commands` | Disable all skills and slash commands for this session | `claude --disable-slash-commands` |

42| `--disallowedTools` | Tools that are removed from the model's context and cannot be used | `"Bash(git log:*)" "Bash(git diff:*)" "Edit"` |42| `--disallowedTools` | Tools that are removed from the model's context and cannot be used | `"Bash(git log *)" "Bash(git diff *)" "Edit"` |

43| `--fallback-model` | Enable automatic fallback to specified model when default model is overloaded (print mode only) | `claude -p --fallback-model sonnet "query"` |43| `--fallback-model` | Enable automatic fallback to specified model when default model is overloaded (print mode only) | `claude -p --fallback-model sonnet "query"` |

44| `--fork-session` | When resuming, create a new session ID instead of reusing the original (use with `--resume` or `--continue`) | `claude --resume abc123 --fork-session` |44| `--fork-session` | When resuming, create a new session ID instead of reusing the original (use with `--resume` or `--continue`) | `claude --resume abc123 --fork-session` |

45| `--ide` | Automatically connect to IDE on startup if exactly one valid IDE is available | `claude --ide` |45| `--ide` | Automatically connect to IDE on startup if exactly one valid IDE is available | `claude --ide` |

desktop.md +235 −63

Details

6 6 

7> Run Claude Code tasks locally or on secure cloud infrastructure with the Claude desktop app7> Run Claude Code tasks locally or on secure cloud infrastructure with the Claude desktop app

8 8 

9<img src="https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=c4e9dc9737b437d36ab253b75a1cc595" alt="Claude Code on desktop interface" data-og-width="4132" width="4132" data-og-height="2620" height="2620" data-path="images/desktop-interface.png" data-optimize="true" data-opv="3" srcset="https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?w=280&fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=b1a8421a544c3e8c78679fa1a7b56190 280w, https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?w=560&fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=79cf4ea0923098cc429198678ea50903 560w, https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?w=840&fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=14bcbcd569d179770fe656686ffbf6bf 840w, https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?w=1100&fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=b873274db1e9ff8585ba545032aa24a5 1100w, https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?w=1650&fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=25553dced783c3a8c2a1134a53295f7e 1650w, https://mintcdn.com/claude-code/zEGbGSbinVtT3BLw/images/desktop-interface.png?w=2500&fit=max&auto=format&n=zEGbGSbinVtT3BLw&q=85&s=9ad49e6468c2f87b1895093deeea7bb2 2500w" />9<Note>

10 Claude Code on desktop is currently in preview.

11</Note>

12 

13Claude Code is an AI coding assistant that works directly with your codebase. Unlike Claude.ai chat, it can read your project files, edit code, run terminal commands, and understand how different parts of your code connect. You watch changes happen in real time.

14 

15You can use Claude Code through the terminal ([CLI](/en/quickstart)) or through the desktop app described here. Both provide the same core capabilities. The desktop app adds a graphical interface and visual session management.

16 

17<CardGroup cols={2}>

18 <Card title="New to Claude Code?" icon="rocket" href="#installation-and-setup">

19 Start here to install and make your first edit

20 </Card>

10 21 

11## Claude Code on desktop (Preview)22 <Card title="Coming from the CLI?" icon="terminal" href="#how-desktop-relates-to-cli">

23 See what's shared and what's different

24 </Card>

25</CardGroup>

12 26 

13The Claude desktop app provides a native interface for running multiple Claude Code sessions on your local machine and seamless integration with Claude Code on the web.27The desktop app has three tabs:

14 28 

15## Installation29* **Chat**: A conversational interface for general questions and tasks (like Claude.ai)

30* **Cowork**: An autonomous agent that works on tasks in the background

31* **Code**: An AI coding assistant that reads and edits your project files directly

16 32 

17Download the Claude desktop app for your platform:33This documentation covers the **Code** tab. For the chat interface, see the [Claude Desktop support articles](https://support.claude.com/en/collections/16163169-claude-desktop).

18 34 

19<CardGroup cols={2}>35## Installation and setup

36 

37<Steps>

38 <Step title="Download the app">

39 Download Claude for your platform. You'll need an Anthropic account ([sign up at claude.ai](https://claude.ai) if you don't have one).

40 

41 <CardGroup cols={2}>

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

21 Universal build for Intel and Apple Silicon43 Universal build for Intel and Apple Silicon

22 </Card>44 </Card>


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

25 For x64 processors47 For x64 processors

26 </Card>48 </Card>

27</CardGroup>49 </CardGroup>

50 

51 For Windows ARM64, [download here](https://claude.ai/api/desktop/win32/arm64/exe/latest/redirect?utm_source=claude_code\&utm_medium=docs). Local sessions are not available on ARM64 devices, so use remote sessions instead.

52 

53 Linux is not currently supported.

54 </Step>

55 

56 <Step title="Open the app and sign in">

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

58 </Step>

59 

60 <Step title="Select the Code tab">

61 Click the **Code** tab in the top left. If clicking Code prompts you to sign in online, complete the sign-in and restart the app.

62 </Step>

63</Steps>

64 

65## Getting started

66 

67If you already use the CLI, you can skip to [How Desktop relates to CLI](#how-desktop-relates-to-cli) for a quick overview of differences.

68 

69<Steps>

70 <Step title="Choose a folder and environment">

71 Select **Local** to run Claude on your machine using your files directly. This is the best choice for getting started. Click **Select folder** and choose your project directory.

28 72 

29For Windows ARM64, [download here](https://claude.ai/api/desktop/win32/arm64/exe/latest/redirect?utm_source=claude_code\&utm_medium=docs).73 You can also run [remote sessions](/en/claude-code-on-the-web) that continue in the cloud even if you close the app.

74 </Step>

75 

76 <Step title="Start a session">

77 Type what you want Claude to do:

78 

79 * "Find a TODO comment and fix it"

80 * "Add tests for the main function"

81 * "Create a CLAUDE.md with instructions for this codebase"

82 

83 A **session** is a conversation with Claude about your code. Each session tracks its own context and changes, so you can work on multiple tasks without them interfering with each other.

84 </Step>

85 

86 <Step title="Review and accept changes">

87 By default, Code is in **Ask** mode, where Claude proposes changes and waits for your approval before applying them. You'll see:

88 

89 1. **A diff view** showing exactly what will change in each file

90 2. **Accept/Reject buttons** to approve or decline each change

91 3. **Real-time updates** as Claude works through your request

92 

93 If you reject a change, Claude will ask how you'd like to proceed differently. Your files aren't modified until you accept.

94 </Step>

95</Steps>

96 

97The sections below cover commands, permission modes, parallel sessions, and ways to extend Claude Code with custom workflows and integrations.

98 

99## What you can do

100 

101Claude Code can edit files, run terminal commands, and understand how your code connects. Try prompts like:

102 

103* `Fix the bug in the login function`

104* `Run the tests and fix any failures`

105* `How does the authentication flow work?`

106 

107You can rename, resume, and archive sessions through the sidebar.

108 

109### Choose a permission mode

110 

111Control how Claude works using the mode selector next to the send button:

112 

113* **Ask** (recommended for new users): Claude asks for your approval before each file edit or command. You see a diff view and can accept or reject each change.

114* **Code**: Claude auto-accepts file edits but still asks before running terminal commands. Use this when you trust file changes and want faster iteration.

115* **Plan**: Claude creates a detailed plan for your approval before making any changes. Good for complex tasks where you want to review the approach first.

116 

117To stop Claude mid-task, click the stop button.

118 

119Remote sessions only support **Code** and **Plan** modes because they continue running in the background without requiring your active participation. See [permission modes](/en/iam#permission-modes) for details on how these work internally.

120 

121### Work in parallel with sessions

122 

123Click **+ New session** in the sidebar to work on multiple tasks in parallel. For Git repositories, each session gets its own isolated copy of your project using worktrees, so changes in one session don't affect another until you commit them. Worktrees are stored in `~/.claude-worktrees/` by default.

30 124 

31<Note>125<Note>

32 Local sessions are not available on Windows ARM64.126 Session isolation requires [Git](https://git-scm.com/downloads). Without Git, sessions in the same directory edit the same files, so changes in one session are immediately visible in others.

33</Note>127</Note>

34 128 

35## Features129To include files listed in your `.gitignore` (like `.env`) in new worktrees, create a `.worktreeinclude` file in your project root listing the file patterns to copy.

130 

131To manage a session, click its dropdown in the sidebar to rename it, archive it, or check context usage. When context fills up, Claude automatically summarizes the conversation. You can also ask Claude to compact if you want to free up space earlier.

132 

133### Run long-running tasks remotely

36 134 

37Claude Code on desktop provides:135For large refactors, test suites, migrations, or other long-running tasks, select **Remote** instead of **Local** when starting a session. Remote sessions run on Anthropic's cloud infrastructure and continue even if you close the app or shut down your computer. Check back anytime to see progress or steer Claude in a different direction.

38 136 

39* **Diff view**: Review Claude's changes file by file before creating a pull request, and comment on specific lines to iterate further137Remote sessions support **Code** and **Plan** modes. See [Claude Code on the web](/en/claude-code-on-the-web) for details on configuring remote environments.

40* **Parallel local sessions with `git` worktrees**: Run multiple Claude Code sessions simultaneously in the same repository, each with its own isolated `git` worktree

41* **Include files listed in your `.gitignore` in your worktrees**: Automatically copy files in your `.gitignore`, like `.env`, to new worktrees using `.worktreeinclude`

42* **Launch Claude Code on the web**: Kick off secure cloud sessions directly from the desktop app

43 138 

44## Review changes with diff view139### Review changes with diff view

45 140 

46After Claude makes changes to your code, the diff view lets you review modifications file by file before creating a pull request.141After Claude makes changes to your code, the diff view lets you review modifications file by file before creating a pull request.

47 142 

48When Claude makes changes to files, a diff stats indicator appears showing the number of lines added and removed (for example, `+12 -1`). Click this indicator to open the diff viewer, which displays a file list on the left and the changes for each file on the right.143When Claude changes files, a diff stats indicator appears showing the number of lines added and removed (for example, `+12 -1`). Click this indicator to open the diff viewer, which displays a file list on the left and the changes for each file on the right.

49 144 

50### Comment on specific lines145To comment on specific lines, click any line in the diff to open a comment box. Type your feedback and press **Enter** to send. In the full diff view, press **Enter** to accept each comment, then **Cmd+Enter** to send them all. Claude reads your comments and makes the requested changes, which appear as a new diff you can review.

51 146 

52Click on any line in the diff to open a comment box. Type your feedback and press **Enter** to send. In the full diff view, press **Enter** to accept each comment, then **Cmd+Enter** to send them all. Claude reads your comments and makes the requested changes, which appear as a new diff you can review.147## Extend Claude Code

53 148 

54## Using Git worktrees149You can extend Claude Code with custom commands, automated workflows, and external integrations.

55 150 

56Claude Code on desktop enables running multiple Claude Code sessions in the same repository using Git worktrees. Each session gets its own isolated worktree, allowing Claude to work on different tasks without conflicts. The default location for worktrees is `~/.claude-worktrees` but this can be configured in your settings on the Claude desktop app.151### Connect external tools

152 

153For local sessions, click the **...** button before starting and select **Connectors** to add integrations like Google Calendar, Slack, GitHub, Linear, Notion, and more. Connectors must be configured before the session starts and are only available for local sessions. Once connected, Claude can read your calendar, send messages, create issues, and interact with your tools directly. You can ask Claude what connectors are configured in your session.

154 

155Connectors are [MCP (Model Context Protocol) servers](/en/mcp) with built-in setup. You can also [create custom connectors](https://support.claude.com/en/articles/11175166-getting-started-with-custom-connectors-using-remote-mcp) or add MCP servers manually via [configuration files](/en/mcp#configure-mcp-servers).

156 

157### Create custom skills

158 

159[Skills](/en/skills) are reusable prompts that extend Claude's capabilities. For example, you could create a `review` skill that runs your standard code review checklist, or a `deploy` skill that walks through your deployment steps. Skills are defined as markdown files in `.claude/skills/` and can include instructions, context, and even call other tools. Ask Claude what skills are available or to run a specific skill. Claude can also help you create a skill if you describe what you want, or see [skills](/en/skills) to learn how to write them yourself.

160 

161### Automate workflows with hooks

162 

163[Hooks](/en/hooks) run shell commands automatically in response to Claude Code events. For example, you could run a linter after every file edit, auto-format code, or send notifications when tasks complete. Hooks are configured in your [settings files](/en/settings). See [hooks](/en/hooks) for available events and configuration examples.

164 

165## Environment configuration

166 

167When starting a session, you choose between **Local** (runs on your machine) or **Remote** (runs on Anthropic's cloud).

168 

169**Local sessions** inherit environment variables from your shell. If you need additional variables, set them in your shell profile (`~/.zshrc`, `~/.bashrc`) and restart the desktop app. See [environment variables](/en/settings#environment-variables) for the full list of supported variables.

170 

171[Extended thinking](/en/common-workflows#use-extended-thinking-thinking-mode) is enabled by default, which improves performance on complex reasoning tasks but uses additional tokens. The thinking process runs in the background but isn't displayed in the Desktop interface. To disable it or adjust the budget, set `MAX_THINKING_TOKENS` in your shell profile (use `0` to disable).

172 

173**Remote sessions** run on Anthropic's cloud infrastructure and continue even if you close the app. Usage counts toward your subscription plan limits with no separate compute charges. See [Claude Code on the web](/en/claude-code-on-the-web) for details on configuring remote environments.

174 

175## How Desktop relates to CLI

176 

177If you already use the Claude Code CLI, Desktop runs the same underlying engine with a graphical interface. You can run both simultaneously on the same machine, even on the same project. Each maintains separate session history, but they share configuration and project memory (CLAUDE.md files).

178 

179### CLI flag equivalents

180 

181If you're used to CLI flags, the table below shows the Desktop equivalent for each. Some flags have no Desktop equivalent because they're designed for scripting or automation.

182 

183| CLI | Desktop equivalent |

184| ------------------------------------- | ---------------------------------------------- |

185| `--model sonnet` | **...** menu > Model (before starting session) |

186| `--resume`, `--continue` | Click a session in the sidebar |

187| `--allowedTools`, `--disallowedTools` | Not available in Desktop |

188| `--dangerously-skip-permissions` | Not available in Desktop |

189| `--print` | Not available (Desktop is interactive) |

190 

191### Shared configuration

192 

193Desktop and CLI read the same configuration files, so your setup carries over:

194 

195* **[CLAUDE.md](/en/memory)** and **CLAUDE.local.md** files in your project are used by both

196* **[MCP servers](/en/mcp)** configured in `~/.claude.json` or `.mcp.json` work in both

197* **[Hooks](/en/hooks)** and **[skills](/en/skills)** defined in settings apply to both

198* **[Settings](/en/settings)** in `~/.claude.json` and `~/.claude/settings.json` are shared

199* **Models** (Sonnet, Opus, Haiku) are available in both (Desktop requires selecting before starting a session)

57 200 

58<Note>201<Note>

59 If you start a local session in a folder that does not have Git initialized, the desktop app will not create a new worktree.202 MCP servers configured for the **Claude Desktop chat app** (in `claude_desktop_config.json`) are separate from Claude Code. To use MCP servers in Claude Code, configure them in `~/.claude.json` or your project's `.mcp.json` file. See [MCP configuration](/en/mcp#configure-mcp-servers) for details.

60</Note>203</Note>

61 204 

62### Copying files ignored with `.gitignore`205### What's different

63 206 

64When Claude Code creates a worktree, files ignored via `.gitignore` aren't automatically available. Including a `.worktreeinclude` file solves this by specifying which ignored files should be copied to new worktrees.207**Desktop adds:**

65 208 

66Create a `.worktreeinclude` file in your repository root:209* Graphical interface with visual session management

210* Built-in connectors for common integrations

211* Automatic session isolation for Git repositories (each session gets its own worktree)

67 212 

68```213**CLI adds:**

69.env214 

70.env.local215* [Third-party API providers](/en/third-party-integrations) (Bedrock, Vertex, Foundry). If you use these, continue using CLI for those projects.

71.env.*216* [CLI flags](/en/cli-reference) for scripting (`--print`, `--resume`, `--continue`)

72**/.claude/settings.local.json217* [Programmatic usage](/en/headless) via the Agent SDK

218 

219## Troubleshooting

220 

221Solutions to common issues with the Claude desktop app. For CLI issues, see [CLI troubleshooting](/en/troubleshooting).

222 

223### Check your version

224 

225To see which version of the desktop app you're running:

226 

227* **macOS**: Click **Claude** in the menu bar, then **About Claude**

228* **Windows**: Click **Help**, then **About**

229 

230Click the version number to copy it to your clipboard.

231 

232### "Branch doesn't exist yet" when opening in CLI

233 

234Remote sessions can create branches that don't exist on your local machine. Click the branch name in the session toolbar to copy it, then fetch it locally:

235 

236```bash theme={null}

237git fetch origin <branch-name>

238git checkout <branch-name>

73```239```

74 240 

75The file uses `.gitignore`-style patterns. When a worktree is created, files matching these patterns that are also in your `.gitignore` will be copied from your main repository to the worktree.241### "Failed to load session" error

76 242 

77<Tip>243This error can occur for several reasons:

78 Only files that are both matched by `.worktreeinclude` AND listed in `.gitignore` are copied. This prevents accidentally duplicating tracked files.

79</Tip>

80 244 

81### Launch Claude Code on the web245* The selected folder no longer exists or is inaccessible

246* A Git repository requires Git LFS but it's not installed (see [Git LFS errors](#git-lfs-errors))

247* File permissions prevent access to the project directory

82 248 

83From the desktop app, you can kick off Claude Code sessions that run on Anthropic's secure cloud infrastructure.249Try selecting a different folder or restarting the desktop app.

84 250 

85To start a web session from desktop, select a remote environment when creating a new session.251### App won't quit

86 252 

87For more details, see [Claude Code on the web](/en/claude-code-on-the-web).253If the desktop app doesn't close properly:

88 254 

89## Bundled Claude Code version255* **macOS**: Press Cmd+Q. If the app doesn't respond, use Force Quit (Cmd+Option+Esc, select Claude, click Force Quit).

256* **Windows**: Use Task Manager (Ctrl+Shift+Esc) to end the Claude process.

90 257 

91Claude Code on desktop includes a bundled, stable version of Claude Code to ensure a consistent experience for all desktop users. The bundled version is required and downloaded on first launch even if a version of Claude Code exists on the computer. Desktop automatically manages version updates and cleans up old versions.258### Windows installation issues

92 259 

93<Note>260If the installer fails silently or doesn't complete properly:

94 The bundled Claude Code version in Desktop may differ from the latest CLI version. Desktop prioritizes stability while the CLI may have newer features.

95</Note>

96 261 

97## Environment configuration2621. **PATH not updated**: After installation, open a new terminal window. The PATH updates only apply to new terminal sessions.

2632. **Concurrent installation error**: If you see an error about another installation in progress but there isn't one, try running the installer as Administrator.

98 264 

99For local environments, Claude Code on desktop automatically extracts your `$PATH` environment variable from your shell configuration. This allows local sessions to access development tools like `yarn`, `npm`, `node`, and other commands available in your terminal without additional setup.265### Session not finding installed tools

100 266 

101### Custom environment variables267If Claude can't find tools like `npm`, `node`, or other CLI commands:

102 268 

103Select "Local" environment, then to the right, select the settings button. This will open a dialog where you can update local environment variables. This is useful for setting project-specific variables or API keys that your development workflows require. Environment variable values are masked in the UI for security reasons.2691. Verify the tools work in your regular terminal

2702. Check that your shell profile (`~/.zshrc`, `~/.bashrc`) properly sets up PATH

2713. Restart the desktop app to reload environment variables

104 272 

105<Note>273### MCP servers not working (Windows)

106 Environment variables must be specified as key-value pairs, in [`.env` format](https://www.dotenv.org/). For example:

107 274 

108 ```275If MCP server toggles don't respond or servers fail to connect on Windows:

109 API_KEY=your_api_key

110 DEBUG=true

111 276 

112 # Multiline values - wrap in quotes2771. Check that the MCP server is properly configured in your settings

113 CERT="-----BEGIN CERT-----2782. Restart the desktop app after making changes

114 MIIE...2793. Verify the MCP server process is running (check Task Manager)

115 -----END CERT-----"2804. Review the server logs for connection errors

116 ```281 

117</Note>282### Git LFS errors

283 

284If you see "Git LFS is required by this repository but is not installed," your repository uses Git Large File Storage for large binary files. Install Git LFS before opening this repository:

285 

2861. Install Git LFS from [git-lfs.com](https://git-lfs.com/)

2872. Run `git lfs install` in your terminal

2883. Restart the desktop app

118 289 

119## Enterprise configuration290## Enterprise configuration

120 291 


122 293 

123## Related resources294## Related resources

124 295 

125* [Claude Code on the web](/en/claude-code-on-the-web)296* [Claude Code on the web](/en/claude-code-on-the-web): Run remote sessions that continue in the cloud

126* [Claude Desktop support articles](https://support.claude.com/en/collections/16163169-claude-desktop)297* [CLI reference](/en/cli-reference): Use Claude Code in your terminal with flags and scripting

127* [Enterprise Configuration](https://support.claude.com/en/articles/12622667-enterprise-configuration)298* [Common workflows](/en/common-workflows): Tutorials for debugging, refactoring, testing, and more

128* [Common workflows](/en/common-workflows)299* [Settings reference](/en/settings): Configure Claude Code behavior with settings files

129* [Settings reference](/en/settings)300* [Claude Desktop support](https://support.claude.com/en/collections/16163169-claude-desktop): Help articles for the Chat tab and general desktop app usage

301* [Enterprise configuration](https://support.claude.com/en/articles/12622667-enterprise-configuration): Admin policies for organizational deployments

headless.md +2 −2

Details

92 92 

93```bash theme={null}93```bash theme={null}

94claude -p "Look at my staged changes and create an appropriate commit" \94claude -p "Look at my staged changes and create an appropriate commit" \

95 --allowedTools "Bash(git diff:*),Bash(git log:*),Bash(git status:*),Bash(git commit:*)"95 --allowedTools "Bash(git diff *),Bash(git log *),Bash(git status *),Bash(git commit *)"

96```96```

97 97 

98The `--allowedTools` flag uses [permission rule syntax](/en/settings#permission-rule-syntax). The `:*` suffix enables prefix matching, so `Bash(git diff:*)` allows any command starting with `git diff`.98The `--allowedTools` flag uses [permission rule syntax](/en/settings#permission-rule-syntax). The trailing ` *` enables prefix matching, so `Bash(git diff *)` allows any command starting with `git diff`. The space before `*` is important: without it, `Bash(git diff*)` would also match `git diff-index`.

99 99 

100<Note>100<Note>

101 User-invoked [skills](/en/skills) like `/commit` and [built-in commands](/en/interactive-mode#built-in-commands) are only available in interactive mode. In `-p` mode, describe the task you want to accomplish instead.101 User-invoked [skills](/en/skills) like `/commit` and [built-in commands](/en/interactive-mode#built-in-commands) are only available in interactive mode. In `-p` mode, describe the task you want to accomplish instead.

iam.md +7 −6

Details

119 119 

120**Bash**120**Bash**

121 121 

122Bash permission rules support both prefix matching with `:*` and wildcard matching with `*`:122Bash permission rules support wildcard matching with `*`. Wildcards can appear at any position in the command, including at the beginning, middle, or end:

123 123 

124* `Bash(npm run build)` Matches the exact Bash command `npm run build`124* `Bash(npm run build)` Matches the exact Bash command `npm run build`

125* `Bash(npm run test:*)` Matches Bash commands starting with `npm run test`125* `Bash(npm run test *)` Matches Bash commands starting with `npm run test`

126* `Bash(npm *)` Matches any command starting with `npm ` (e.g., `npm install`, `npm run build`)126* `Bash(npm *)` Matches any command starting with `npm ` (e.g., `npm install`, `npm run build`)

127* `Bash(* install)` Matches any command ending with ` install` (e.g., `npm install`, `yarn install`)127* `Bash(* install)` Matches any command ending with ` install` (e.g., `npm install`, `yarn install`)

128* `Bash(git * main)` Matches commands like `git checkout main`, `git merge main`128* `Bash(git * main)` Matches commands like `git checkout main`, `git merge main`

129* `Bash(* --help *)` Matches any command with `--help` followed by additional arguments

129 130 

130The key difference between `:*` and `*`: the `:*` suffix enforces a word boundary, requiring the prefix to be followed by a space or end-of-string. For example, `Bash(ls:*)` matches `ls -la` but not `lsof`. In contrast, `Bash(ls*)` with a bare `*` matches both `ls -la` and `lsof` because `*` has no word boundary constraint.131When `*` appears at the end with a space before it (like `Bash(ls *)`), it enforces a word boundary, requiring the prefix to be followed by a space or end-of-string. For example, `Bash(ls *)` matches `ls -la` but not `lsof`. In contrast, `Bash(ls*)` without a space matches both `ls -la` and `lsof` because there's no word boundary constraint. The legacy `:*` suffix syntax is equivalent to ` *` but is deprecated.

131 132 

132<Tip>133<Tip>

133 Claude Code is aware of shell operators (like `&&`) so a prefix match rule like `Bash(safe-cmd:*)` won't give it permission to run the command `safe-cmd && other-cmd`134 Claude Code is aware of shell operators (like `&&`) so a prefix match rule like `Bash(safe-cmd *)` won't give it permission to run the command `safe-cmd && other-cmd`

134</Tip>135</Tip>

135 136 

136<Warning>137<Warning>

137 Important limitations of Bash permission patterns:138 Important limitations of Bash permission patterns:

138 139 

139 1. The `:*` wildcard only works at the end of a pattern for prefix matching140 1. The space before `*` matters: `Bash(ls *)` matches `ls -la` but not `lsof`, while `Bash(ls*)` matches both

140 2. The `*` wildcard can appear at any position and matches any sequence of characters141 2. The `*` wildcard can appear at any position and matches any sequence of characters

141 3. Patterns like `Bash(curl http://github.com/:*)` can be bypassed in many ways:142 3. Patterns like `Bash(curl http://github.com/ *)` can be bypassed in many ways:

142 * Options before URL: `curl -X GET http://github.com/...` won't match143 * Options before URL: `curl -X GET http://github.com/...` won't match

143 * Different protocol: `curl https://github.com/...` won't match144 * Different protocol: `curl https://github.com/...` won't match

144 * Redirects: `curl -L http://bit.ly/xyz` (redirects to github)145 * Redirects: `curl -L http://bit.ly/xyz` (redirects to github)

Details

373 373 

374### Private repositories374### Private repositories

375 375 

376Claude Code supports installing plugins from private repositories. Set the appropriate authentication token in your environment, and Claude Code will use it when authentication is required.376Claude Code supports installing plugins from private repositories. For manual installation and updates, Claude Code uses your existing git credential helpers. If `git clone` works for a private repository in your terminal, it works in Claude Code too. Common credential helpers include `gh auth login` for GitHub, macOS Keychain, and `git-credential-store`.

377 

378Background auto-updates run at startup without credential helpers, since interactive prompts would block Claude Code from starting. To enable auto-updates for private marketplaces, set the appropriate authentication token in your environment:

377 379 

378| Provider | Environment variables | Notes |380| Provider | Environment variables | Notes |

379| :-------- | :--------------------------- | :---------------------------------------- |381| :-------- | :--------------------------- | :---------------------------------------- |


387export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx389export GITHUB_TOKEN=ghp_xxxxxxxxxxxxxxxxxxxx

388```390```

389 391 

390Authentication tokens are only used when a repository requires authentication. Public repositories work without any tokens configured, even if tokens are present in your environment.

391 

392<Note>392<Note>

393 For CI/CD environments, configure the token as a secret environment variable. GitHub Actions automatically provides `GITHUB_TOKEN` for repositories in the same organization.393 For CI/CD environments, configure the token as a secret environment variable. GitHub Actions automatically provides `GITHUB_TOKEN` for repositories in the same organization.

394</Note>394</Note>


478}478}

479```479```

480 480 

481Allow all marketplaces from an internal git server using regex pattern matching:

482 

483```json theme={null}

484{

485 "strictKnownMarketplaces": [

486 {

487 "source": "hostPattern",

488 "hostPattern": "^github\\.example\\.com$"

489 }

490 ]

491}

492```

493 

481#### How restrictions work494#### How restrictions work

482 495 

483Restrictions are validated early in the plugin installation process, before any network requests or filesystem operations occur. This prevents unauthorized marketplace access attempts.496Restrictions are validated early in the plugin installation process, before any network requests or filesystem operations occur. This prevents unauthorized marketplace access attempts.

484 497 

485The allowlist uses exact matching. For a marketplace to be allowed, all specified fields must match exactly:498The allowlist uses exact matching for most source types. For a marketplace to be allowed, all specified fields must match exactly:

486 499 

487* For GitHub sources: `repo` is required, and `ref` or `path` must also match if specified in the allowlist500* For GitHub sources: `repo` is required, and `ref` or `path` must also match if specified in the allowlist

488* For URL sources: the full URL must match exactly501* For URL sources: the full URL must match exactly

502* For `hostPattern` sources: the marketplace host is matched against the regex pattern

489 503 

490Because `strictKnownMarketplaces` is set in [managed settings](/en/settings#settings-files), individual users and project configurations cannot override these restrictions.504Because `strictKnownMarketplaces` is set in [managed settings](/en/settings#settings-files), individual users and project configurations cannot override these restrictions.

491 505 


564 578 

565### Private repository authentication fails579### Private repository authentication fails

566 580 

567**Symptoms**: Authentication errors when installing plugins from private repositories, even with tokens configured581**Symptoms**: Authentication errors when installing plugins from private repositories

568 582 

569**Solutions**:583**Solutions**:

570 584 

571* Verify your token is set in the current shell session: `echo $GITHUB_TOKEN`585For manual installation and updates:

586 

587* Verify you're authenticated with your git provider (for example, run `gh auth status` for GitHub)

588* Check that your credential helper is configured correctly: `git config --global credential.helper`

589* Try cloning the repository manually to verify your credentials work

590 

591For background auto-updates:

592 

593* Set the appropriate token in your environment: `echo $GITHUB_TOKEN`

572* Check that the token has the required permissions (read access to the repository)594* Check that the token has the required permissions (read access to the repository)

573* For GitHub, ensure the token has the `repo` scope for private repositories595* For GitHub, ensure the token has the `repo` scope for private repositories

574* For GitLab, ensure the token has at least `read_repository` scope596* For GitLab, ensure the token has at least `read_repository` scope

575* Verify the token hasn't expired597* Verify the token hasn't expired

576* If using multiple git providers, ensure you've set the token for the correct provider

577 598 

578### Plugins with relative paths fail in URL-based marketplaces599### Plugins with relative paths fail in URL-based marketplaces

579 600 

settings.md +50 −39

Details

106 "permissions": {106 "permissions": {

107 "allow": [107 "allow": [

108 "Bash(npm run lint)",108 "Bash(npm run lint)",

109 "Bash(npm run test:*)",109 "Bash(npm run test *)",

110 "Read(~/.zshrc)"110 "Read(~/.zshrc)"

111 ],111 ],

112 "deny": [112 "deny": [

113 "Bash(curl:*)",113 "Bash(curl *)",

114 "Read(./.env)",114 "Read(./.env)",

115 "Read(./.env.*)",115 "Read(./.env.*)",

116 "Read(./secrets/**)"116 "Read(./secrets/**)"


172 172 

173| Keys | Description | Example |173| Keys | Description | Example |

174| :----------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- |174| :----------------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | :--------------------------------------------------------------------- |

175| `allow` | Array of permission rules to allow tool use. See [Permission rule syntax](#permission-rule-syntax) below for pattern matching details | `[ "Bash(git diff:*)" ]` |175| `allow` | Array of permission rules to allow tool use. See [Permission rule syntax](#permission-rule-syntax) below for pattern matching details | `[ "Bash(git diff *)" ]` |

176| `ask` | Array of permission rules to ask for confirmation upon tool use. See [Permission rule syntax](#permission-rule-syntax) below | `[ "Bash(git push:*)" ]` |176| `ask` | Array of permission rules to ask for confirmation upon tool use. See [Permission rule syntax](#permission-rule-syntax) below | `[ "Bash(git push *)" ]` |

177| `deny` | Array of permission rules to deny tool use. Use this to exclude sensitive files from Claude Code access. See [Permission rule syntax](#permission-rule-syntax) and [Bash permission limitations](/en/iam#tool-specific-permission-rules) | `[ "WebFetch", "Bash(curl:*)", "Read(./.env)", "Read(./secrets/**)" ]` |177| `deny` | Array of permission rules to deny tool use. Use this to exclude sensitive files from Claude Code access. See [Permission rule syntax](#permission-rule-syntax) and [Bash permission limitations](/en/iam#tool-specific-permission-rules) | `[ "WebFetch", "Bash(curl *)", "Read(./.env)", "Read(./secrets/**)" ]` |

178| `additionalDirectories` | Additional [working directories](/en/iam#working-directories) that Claude has access to | `[ "../docs/" ]` |178| `additionalDirectories` | Additional [working directories](/en/iam#working-directories) that Claude has access to | `[ "../docs/" ]` |

179| `defaultMode` | Default [permission mode](/en/iam#permission-modes) when opening Claude Code | `"acceptEdits"` |179| `defaultMode` | Default [permission mode](/en/iam#permission-modes) when opening Claude Code | `"acceptEdits"` |

180| `disableBypassPermissionsMode` | Set to `"disable"` to prevent `bypassPermissions` mode from being activated. This disables the `--dangerously-skip-permissions` command-line flag. See [managed settings](/en/iam#managed-settings) | `"disable"` |180| `disableBypassPermissionsMode` | Set to `"disable"` to prevent `bypassPermissions` mode from being activated. This disables the `--dangerously-skip-permissions` command-line flag. See [managed settings](/en/iam#managed-settings) | `"disable"` |


217 217 

218#### Wildcard patterns218#### Wildcard patterns

219 219 

220Two wildcard syntaxes are available for Bash rules:220Bash rules support glob patterns with `*`. Wildcards can appear at any position in the command, including at the beginning, middle, or end. The following configuration allows npm and git commit commands while blocking git push:

221 

222| Wildcard | Position | Behavior | Example |

223| :------- | :------------------ | :----------------------------------------------------------------------------------------------- | :------------------------------------------- |

224| `:*` | End of pattern only | **Prefix matching** with word boundary. The prefix must be followed by a space or end-of-string. | `Bash(ls:*)` matches `ls -la` but not `lsof` |

225| `*` | Anywhere in pattern | **Glob matching** with no word boundary. Matches any sequence of characters at that position. | `Bash(ls*)` matches both `ls -la` and `lsof` |

226 

227**Prefix matching with `:*`**

228 

229The `:*` suffix matches any command that starts with the specified prefix. This works with multi-word commands. The following configuration allows npm and git commit commands while blocking git push and rm -rf:

230 221 

231```json theme={null}222```json theme={null}

232{223{

233 "permissions": {224 "permissions": {

234 "allow": [225 "allow": [

235 "Bash(npm run:*)",226 "Bash(npm run *)",

236 "Bash(git commit:*)",227 "Bash(git commit *)",

237 "Bash(docker compose:*)"228 "Bash(git * main)",

229 "Bash(* --version)",

230 "Bash(* --help *)"

238 ],231 ],

239 "deny": [232 "deny": [

240 "Bash(git push:*)",233 "Bash(git push *)"

241 "Bash(rm -rf:*)"

242 ]234 ]

243 }235 }

244}236}

245```237```

246 238 

247**Glob matching with `*`**239The space before `*` matters: `Bash(ls *)` matches `ls -la` but not `lsof`, while `Bash(ls*)` matches both. The legacy `:*` suffix syntax (e.g., `Bash(npm run:*)`) is equivalent to ` *` but is deprecated.

248 

249The `*` wildcard can appear at the beginning, middle, or end of a pattern. The following configuration allows any git command targeting main (like `git checkout main`, `git merge main`) and any version check command (like `node --version`, `npm --version`):

250 

251```json theme={null}

252{

253 "permissions": {

254 "allow": [

255 "Bash(git * main)",

256 "Bash(* --version)"

257 ]

258 }

259}

260```

261 240 

262<Warning>241<Warning>

263 Bash permission patterns that try to constrain command arguments are fragile. For example, `Bash(curl http://github.com/:*)` intends to restrict curl to GitHub URLs, but won't match `curl -X GET http://github.com/...` (flags before URL), `curl https://github.com/...` (different protocol), or commands using shell variables. Do not rely on argument-constraining patterns as a security boundary. See [Bash permission limitations](/en/iam#tool-specific-permission-rules) for alternatives.242 Bash permission patterns that try to constrain command arguments are fragile. For example, `Bash(curl http://github.com/ *)` intends to restrict curl to GitHub URLs, but won't match `curl -X GET http://github.com/...` (flags before URL), `curl https://github.com/...` (different protocol), or commands using shell variables. Do not rely on argument-constraining patterns as a security boundary. See [Bash permission limitations](/en/iam#tool-specific-permission-rules) for alternatives.

264</Warning>243</Warning>

265 244 

266For detailed information about tool-specific permission patterns—including Read, Edit, WebFetch, MCP, Task rules, and Bash permission limitations—see [Tool-specific permission rules](/en/iam#tool-specific-permission-rules).245For detailed information about tool-specific permission patterns—including Read, Edit, WebFetch, MCP, Task rules, and Bash permission limitations—see [Tool-specific permission rules](/en/iam#tool-specific-permission-rules).


429 408 

430This hierarchy ensures that organizational policies are always enforced while still allowing teams and individuals to customize their experience.409This hierarchy ensures that organizational policies are always enforced while still allowing teams and individuals to customize their experience.

431 410 

432For example, if your user settings allow `Bash(npm run:*)` but a project's shared settings deny it, the project setting takes precedence and the command is blocked.411For example, if your user settings allow `Bash(npm run *)` but a project's shared settings deny it, the project setting takes precedence and the command is blocked.

433 412 

434### Key points about the configuration system413### Key points about the configuration system

435 414 


556* `github`: GitHub repository (uses `repo`)535* `github`: GitHub repository (uses `repo`)

557* `git`: Any git URL (uses `url`)536* `git`: Any git URL (uses `url`)

558* `directory`: Local filesystem path (uses `path`, for development only)537* `directory`: Local filesystem path (uses `path`, for development only)

538* `hostPattern`: regex pattern to match marketplace hosts (uses `hostPattern`)

559 539 

560#### `strictKnownMarketplaces`540#### `strictKnownMarketplaces`

561 541 


572* Only available in managed settings (`managed-settings.json`)552* Only available in managed settings (`managed-settings.json`)

573* Cannot be overridden by user or project settings (highest precedence)553* Cannot be overridden by user or project settings (highest precedence)

574* Enforced BEFORE network/filesystem operations (blocked sources never execute)554* Enforced BEFORE network/filesystem operations (blocked sources never execute)

575* Uses exact matching for source specifications (including `ref`, `path` for git sources)555* Uses exact matching for source specifications (including `ref`, `path` for git sources), except `hostPattern`, which uses regex matching

576 556 

577**Allowlist behavior**:557**Allowlist behavior**:

578 558 


582 562 

583**All supported source types**:563**All supported source types**:

584 564 

585The allowlist supports six marketplace source types. Each source must match exactly for a user's marketplace addition to be allowed.565The allowlist supports seven marketplace source types. Most sources use exact matching, while `hostPattern` uses regex matching against the marketplace host.

586 566 

5871. **GitHub repositories**:5671. **GitHub repositories**:

588 568 


644 624 

645Fields: `path` (required: absolute path to directory containing `.claude-plugin/marketplace.json`)625Fields: `path` (required: absolute path to directory containing `.claude-plugin/marketplace.json`)

646 626 

6277. **Host pattern matching**:

628 

629```json theme={null}

630{ "source": "hostPattern", "hostPattern": "^github\\.example\\.com$" }

631{ "source": "hostPattern", "hostPattern": "^gitlab\\.internal\\.example\\.com$" }

632```

633 

634Fields: `hostPattern` (required: regex pattern to match against the marketplace host)

635 

636Use host pattern matching when you want to allow all marketplaces from a specific host without enumerating each repository individually. This is useful for organizations with internal GitHub Enterprise or GitLab servers where developers create their own marketplaces.

637 

638Host extraction by source type:

639 

640* `github`: always matches against `github.com`

641* `git`: extracts hostname from the URL (supports both HTTPS and SSH formats)

642* `url`: extracts hostname from the URL

643* `npm`, `file`, `directory`: not supported for host pattern matching

644 

647**Configuration examples**:645**Configuration examples**:

648 646 

649Example - Allow specific marketplaces only:647Example: allow specific marketplaces only:

650 648 

651```json theme={null}649```json theme={null}

652{650{


680}678}

681```679```

682 680 

681Example: allow all marketplaces from an internal git server:

682 

683```json theme={null}

684{

685 "strictKnownMarketplaces": [

686 {

687 "source": "hostPattern",

688 "hostPattern": "^github\\.example\\.com$"

689 }

690 ]

691}

692```

693 

683**Exact matching requirements**:694**Exact matching requirements**:

684 695 

685Marketplace sources must match **exactly** for a user's addition to be allowed. For git-based sources (`github` and `git`), this includes all optional fields:696Marketplace sources must match **exactly** for a user's addition to be allowed. For git-based sources (`github` and `git`), this includes all optional fields:

skills.md +5 −5

Details

338description: Summarize changes in a pull request338description: Summarize changes in a pull request

339context: fork339context: fork

340agent: Explore340agent: Explore

341allowed-tools: Bash(gh:*)341allowed-tools: Bash(gh *)

342---342---

343 343 

344## Pull request context344## Pull request context


425```425```

426# Allow only specific skills426# Allow only specific skills

427Skill(commit)427Skill(commit)

428Skill(review-pr:*)428Skill(review-pr *)

429 429 

430# Deny specific skills430# Deny specific skills

431Skill(deploy:*)431Skill(deploy *)

432```432```

433 433 

434Permission syntax: `Skill(name)` for exact match, `Skill(name:*)` for prefix match with any arguments.434Permission syntax: `Skill(name)` for exact match, `Skill(name *)` for prefix match with any arguments.

435 435 

436**Hide individual skills** by adding `disable-model-invocation: true` to their frontmatter. This removes the skill from Claude's context entirely.436**Hide individual skills** by adding `disable-model-invocation: true` to their frontmatter. This removes the skill from Claude's context entirely.

437 437 


465---465---

466name: codebase-visualizer466name: codebase-visualizer

467description: Generate an interactive collapsible tree visualization of your codebase. Use when exploring a new repo, understanding project structure, or identifying large files.467description: Generate an interactive collapsible tree visualization of your codebase. Use when exploring a new repo, understanding project structure, or identifying large files.

468allowed-tools: Bash(python:*)468allowed-tools: Bash(python *)

469---469---

470 470 

471# Codebase Visualizer471# Codebase Visualizer