Claude Code installation in 2026 is free and takes about five minutes if you already have Node.js 18+ and a terminal. You install the CLI through npm, sign in with your Anthropic account, and start coding. The tool itself costs nothing; you pay only for the API tokens it consumes, and new Anthropic API accounts can claim a one-time $5 credit to get started.
What you need before starting
Before you run the installer, check four things.
- Node.js 18 or newer — LTS is best. Claude Code will refuse to run on older releases.
- npm 9 or newer — this ships with current Node LTS installers.
- An Anthropic account — you’ll log in through the browser.
- Git — Claude Code reads repository context and runs git commands.
| Platform | Minimum OS | Recommended shell | Node requirement |
|---|---|---|---|
| macOS | macOS 12 Monterey | Terminal (zsh/bash) | Node.js 18+ LTS |
| Windows | Windows 10 1909+ | PowerShell 7+ or Windows Terminal | Node.js 18+ LTS |
| Linux | Ubuntu 20.04 / Debian 11 / Fedora 35+ | bash/zsh | Node.js 18+ LTS |
Download Node from nodejs.org if it’s missing, or use a version manager such as nvm on macOS/Linux and nvm-windows on Windows.
Claude Code installation on macOS
Open Terminal and confirm your versions:
node -v
npm -v
Both should report 18.x+ and 9.x+. Then install the CLI globally:
npm install -g @anthropic-ai/claude-code
Wait for the progress bars to finish. After that, run:
claude --version
If you see a version number, you’re done. If you get permission denied, don’t use sudo npm install; instead, switch to nvm or change npm’s default directory. Apple Silicon and Intel Macs are both supported.
Claude Code installation on Windows
Install the Node.js LTS build from nodejs.org first. Then open PowerShell 7+ or Windows Terminal. The legacy Command Prompt works less reliably with modern npm packages, so avoid it.
Run:
npm install -g @anthropic-ai/claude-code
If PowerShell complains about script execution, run:
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser
Then verify:
claude --version
If the command is not found, close and reopen your terminal so the new PATH entry loads. On some machines you may also need to add %APPDATA%\npm to your system PATH manually.
Claude Code installation on Linux
Use your distribution’s package manager or nvm to install Node.js 18+. On Ubuntu 22.04, for example:
sudo apt update && sudo apt install -y nodejs npm
Then install Claude Code:
npm install -g @anthropic-ai/claude-code
If npm throws an EACCES error, do not run it with sudo. The safer fix is to use nvm or redirect npm’s global prefix to a folder you own:
mkdir ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
Verify with claude --version.
First-time setup and login
Handle to a project folder and run:
claude
The first launch opens your default browser for OAuth. Sign in with the same Anthropic account that holds your API credits or Pro subscription. Accept the requested permissions, return to the terminal, and answer the onboarding prompts. Claude Code will ask whether to enable optional analytics; this is your choice and does not affect functionality.
Once the prompt appears, you can start typing natural-language commands such as:
explain this codebase
Or
find the bug in src/utils.js
Free usage limits and pro tips
Claude Code is free to install, but every request burns API tokens. Anthropic gives new API accounts a one-time $5 credit, which covers roughly 25 million Haiku input tokens or about 1 million Opus tokens. If you need more, the Anthropic startup program has reportedly offered $1,000–$10,000 in credits to venture-backed founders, and some perk aggregators list ranges up to $25,000+. GitHub Student Developer Pack members can get Claude Pro at no cost, and open-source maintainers have received six months of Max access, valued at $1,200, through Anthropic’s open-source program.
For the cheapest path, route simple tasks through Haiku and reserve Opus for deep reasoning. On the Artificial Analysis LLM index, Claude Opus 5 scores 63—among the highest published scores when you do spend the tokens. You can also point Claude Code at OpenRouter or a local Ollama model to avoid Anthropic billing entirely, though capabilities and speed will differ.
Sign in or confirm the newsletter email at /perks to see apply links for startup credits and student perks when you qualify.
npm, downloads, and the cluade misspelling
The package is @anthropic-ai/claude-code. There is no separate download page that replaces npm for the official CLI in this guide. If you typed install cluade code or npx claude-code, you still want this URL. We are not minting a fourth page for typos.
Pricing, Pro vs API, and credit grants: Claude Code price. When to use the agent vs an IDE: Claude Code.
Troubleshooting common install errors
| Error | Likely cause | Fix |
|---|---|---|
command not found: claude |
npm global bin not on PATH | Reopen the terminal, or add the npm global folder to PATH |
npm ERR! EACCES |
Permission denied | Use nvm, or set a user-owned npm prefix |
Node version mismatch |
Node.js is too old | Upgrade to Node.js 18 LTS or newer |
| Browser auth loop | Default browser blocked | Run claude --verbose and paste the URL manually |
403 after login |
Region or billing restriction | Confirm your country supports API credits; some regions cannot claim the $5 credit |
| Windows script cannot run | Execution policy too strict | Run Set-ExecutionPolicy RemoteSigned -Scope CurrentUser |
If nothing works, uninstall and reinstall cleanly:
npm uninstall -g @anthropic-ai/claude-code
npm install -g @anthropic-ai/claude-code
Frequently asked questions
Is Claude Code free to install and use in 2026?
Yes, the installation is free. Usage is not. You either burn API credits or maintain a Claude Pro/Max subscription; Source 5 notes Pro starts at $20+/month. New API accounts receive a $5 starter credit, and several free-credit paths exist for students, startups, and open-source maintainers.
What are the system requirements for Claude Code installation?
You need Node.js 18+, npm 9+, macOS 12 / Windows 10 / a modern Linux distro, an internet connection, and git. A few hundred megabytes of free disk space is plenty. Claude Code runs in the terminal, so there is no GPU requirement.
How do I install Claude Code on Windows without errors?
Use PowerShell 7+ or Windows Terminal, install Node.js LTS from nodejs.org, then run npm install -g @anthropic-ai/claude-code. Set your execution policy to RemoteSigned if PowerShell blocks scripts, and restart the terminal so the PATH update takes effect.
Why is my Claude Code installation not working after setup?
Check the basics first: Node version, npm permissions, PATH, and network access. Run claude --version to confirm the CLI is reachable, then claude --verbose to see where login or API calls fail. Region restrictions, expired credits, and missing billing setup are the most common causes after a successful install.
Can I use Claude Code with VS Code or other editors?
Claude Code is a terminal tool, so you can run it inside the VS Code integrated terminal and let it edit files in place. Anthropic also offers a separate Claude extension for VS Code if you prefer a GUI. It is not a plugin for JetBrains or Vim in the same way, but any editor with a terminal panel can host the CLI.
Bottom line
Claude Code installation is quick and free. You pay for tokens, not the CLI. Node 18+, npm install -g @anthropic-ai/claude-code, then claude in a repo. For what it costs after install, read the price guide.
Sign in or confirm the newsletter email at https://modelsandmakers.com/perks to see apply links.