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).