Install Claude Code
Install and verify Claude Code on macOS, Windows, and Linux, then point it at HopsAPI.
Claude Code ships a native installer that bundles its own runtime, so you don't need Node.js first. Native installs update themselves in the background.
System requirements
| Item | Requirement | Notes |
|---|---|---|
| macOS | 13.0 or later | Apple Silicon and Intel |
| Windows | 10 (1809+) / 11 / Server 2019+ | Native or WSL |
| Linux | Ubuntu 20.04+, Debian 10+, Alpine 3.19+ | — |
| Hardware | 4 GB+ RAM, x64 or ARM64 | — |
| Node.js | 22 or later, recommended | Only relevant to the npm install |
macOS
Run this in a terminal:
curl -fsSL https://claude.ai/install.sh | bashHomebrew works too:
brew install --cask claude-codeThere are two casks: claude-code follows the stable channel (about a week behind, skipping releases with major regressions), and claude-code@latest follows the latest channel. Homebrew installs don't auto-update — run brew upgrade claude-code yourself.
Windows
In PowerShell:
irm https://claude.ai/install.ps1 | iexIn CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdOr use WinGet (also no auto-updates — run winget upgrade Anthropic.ClaudeCode yourself):
winget install Anthropic.ClaudeCodeYou don't need to run as Administrator. Installing Git for Windows is recommended — it provides Git Bash, which Claude Code uses for the Bash tool; without it, shell commands run through PowerShell instead. If your projects live in WSL, install and launch Claude Code inside the WSL terminal using the Linux steps below, not from PowerShell.
Linux
Run this in a terminal:
curl -fsSL https://claude.ai/install.sh | bashDebian, Fedora, RHEL, and Alpine can also install from Anthropic's signed apt / dnf / apk repositories — see the official setup docs for the commands. Those installs don't auto-update either; updates arrive through your normal system upgrades.
Alpine and other musl-based distributions need their dependencies installed first, plus the built-in ripgrep turned off:
apk add bash curl libgcc libstdc++ ripgrepThen add "env": { "USE_BUILTIN_RIPGREP": "0" } to ~/.claude/settings.json.
Install with npm
If you already have a stable Node.js setup, or the native installer is blocked on your machine, npm is still an officially supported path:
npm install -g @anthropic-ai/claude-codeAs of v2.1.198 the npm package declares Node.js 22 as its required version. On anything older, npm prints an EBADENGINE warning but usually still completes the install — upgrade Node.js if you hit trouble. It installs the same native binary, which doesn't use Node.js at runtime. Don't use sudo npm install -g — it leads to permission and security problems. Upgrade with npm install -g @anthropic-ai/claude-code@latest, not npm update -g, which respects the semver range from the original install and may not move you to the newest release.
Verify the installation
Run this in a terminal:
claude --versionA version number such as 2.1.211 (Claude Code) means it worked. If you get command not found, open a new terminal first — the installer updates PATH, and sessions opened earlier still hold the old value.
Claude Code still talks to Anthropic at this point. Continue to Configure a model provider to switch it to HopsAPI.
Editor extensions
Claude Code also runs inside your editor, sharing the same configuration as the CLI.
- VS Code / Cursor — install the Claude Code extension, or search "Claude Code" in the extensions panel (
Cmd+Shift+X/Ctrl+Shift+X). It adds inline diffs,@-mentioning files, and plan review. - JetBrains IDEs — install the Claude Code plugin from the JetBrains Marketplace and restart the IDE. Works with IntelliJ IDEA, PyCharm, WebStorm, and others.
Troubleshooting
| Symptom | Fix |
|---|---|
claude: command not found right after installing | Open a new terminal. If that doesn't help, add the install directory to PATH yourself: on macOS / Linux run echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && source ~/.zshrc; on Windows add %USERPROFILE%\.local\bin to the user Path variable and reopen your terminal. |
| Installed, but the binary seems missing | Check it exists: ls ~/.local/bin/claude on macOS / Linux, Test-Path "$env:USERPROFILE\.local\bin\claude.exe" on Windows. If it's there, only PATH is wrong. |
'irm' is not recognized as an internal or external command | You're in CMD — use the CMD command above. The reverse error, The token '&&' is not a valid statement separator, means you're in PowerShell. |
npm install -g fails with EACCES or another permission error | Don't use sudo. Fix your npm global prefix, or manage Node.js with nvm. |
| The download fails or hangs | A network problem. Behind a proxy, set export https_proxy=http://127.0.0.1:7890 ($env:https_proxy="http://127.0.0.1:7890" on Windows) and rerun the install command. |
| Windows SmartScreen blocks the installer | Click "More info" → "Run anyway". |
Codex desktop app
The Codex desktop app shares one config file with the CLI, so there is nothing extra to set up — this page shows how to confirm it took effect.
Configure a model provider
Point Claude Code at HopsAPI's native Anthropic Messages endpoint. Import it into CC Switch from the console in one click, add it in CC Switch by hand, or configure it yourself.