Install Claude Code: Setup Guide for macOS, Linux and Windows

Installing Claude Code takes under five minutes on any modern dev machine. Node 18+ is the only hard requirement; everything else is a one-line install followed by an API key. Here is the exact path we use on every Alher Tech onboarding.

Updated: April 24, 2026

Prerequisites

You need Node 18 or newer (Node 20 recommended), a working shell (bash, zsh or fish) and either an Anthropic API key or a Claude Pro / Team subscription. On Windows we strongly recommend running inside WSL2; native Windows works but several MCP servers assume POSIX paths.

Install the CLI

Run `npm install -g @anthropic-ai/claude-code`. That ships the binary as `claude`. First run opens a browser to authenticate; after that you can launch the agent with `claude` inside any project directory.

Configure your project

Create a `CLAUDE.md` at the repo root. Write the project conventions (tech stack, architecture, do-not-touch areas). This file is loaded into every session and is the single biggest win on quality per token; teams that skip it waste 30% of their agent budget on re-learning the codebase.

Verify the install

Run `claude doctor` to confirm network, auth and MCP servers are happy. If you use hooks, add them to `.claude/settings.json` and verify with `claude --debug`. A green doctor output means you are ready to ship.

Frequently asked questions

Do I need an OpenAI or Claude subscription?

A Claude Pro, Team or Enterprise plan (or pay-as-you-go API credits) is required. Claude Code itself is free to install.

Does Claude Code work on Windows?

Yes, both natively and inside WSL2. We strongly recommend WSL2 for MCP compatibility.