How to install Claude Code
Claude Code is Anthropic’s terminal coding agent. These steps match the install path the community used in 2026. Treat the vendor site as source of truth for version pins.
- Prereq: Node.js 18+. Run
node -v. Install Node first if that fails. - Install the CLI:
npm install -g @anthropic-ai/claude-code. If corporate TLS blocks npm, use the official installer — do not substitute a random mirror package name. - Check the binary:
claude --versionshould print a version. If not, put npm’s global bin on PATH. - Sign in: run
claudeand complete device auth with an Anthropic account. Do not commit API keys. - Open a repo:
cd your-repo && claude. Scope it to that tree; keep secrets in ignore files.
Verify
In an empty folder, start claude and ask it to list files. Success = it lists the folder and does not touch paths outside it. On Windows use WSL2; do not mix Git Bash with the system npm.
MCP catalog (readable without login): /en/mcp/. Cursor vs Copilot: comparison table.