Home / A structured installation
Installing, signing in and the first launch
The native Claude Code installer updates itself, signing in happens through a Pro, Max, Team, Enterprise or Console subscription rather than an API key forgotten in the environment, and claude doctor returns a read only diagnosis before any fix.
Four commands install Claude Code depending on the operating system, but only one updates itself. On macOS, Linux and WSL, the native command is curl -fsSL https://claude.ai/install.sh | bash. On PowerShell, it is irm https://claude.ai/install.ps1 | iex. Anthropic's documentation, checked on 2 September 2026, states that native installations update themselves automatically in the background to stay on the latest version.
Three other methods, without automatic updates
Homebrew installs Claude Code through brew install --cask claude-code, with two possible channels depending on the chosen cask, the stable version or the latest one, but neither updates itself. WinGet, on Windows, offers winget install Anthropic.ClaudeCode, the same applies. npm installs the global version through npm install -g @anthropic-ai/claude-code, and since Claude Code version 2.1.198 the package requires Node.js 22 or newer, without this being a hard block on an older version: npm shows an EBADENGINE warning during installation, but it still completes and claude works anyway, since the package downloads a native binary that does not use Node.js at runtime. These three methods suit a situation where a package manager already exists on the machine and must stay the single source of truth for what is installed there, at the cost of a manually relaunched update.
Signing in through the subscription, not through a forgotten key
Claude Code requires a Pro, Max, Team, Enterprise or Console account, the free Claude.ai plan does not open this access, according to the same documentation, which adds an alternative distinct from the subscription, a third party API provider such as Amazon Bedrock, Google Cloud Agent Platform or Microsoft Foundry. An ANTHROPIC_API_KEY already present in the machine's environment is neither ignored nor used silently: Claude Code asks once to approve it, instead of opening a browser for subscription based sign in. Launch the first call from the project folder you want Claude to read, the sign in prompt appears at that moment, before the first reply.
# macOS, Linux, WSL
curl -fsSL https://claude.ai/install.sh | bash
# Windows, PowerShell
irm https://claude.ai/install.ps1 | iex
# Diagnostic en lecture seule, sans ouvrir de session
claude doctor
The first reflex after installation
The claude doctor command, or its alias /checkup from inside a conversation, checks the state of the installation, duplicates, PATH problems, unreadable settings files, and offers a fix only after reporting what it found. From the terminal, it stays read only and does not start any session. It is the most reliable starting point for judging a setup before building anything on top of it, rather than guessing from an isolated error message. The module map places this first element, the engine installed and connected, before the other six.
Four installation methods, side by side
| Installation method | Update | Scope | Prerequisite |
|---|---|---|---|
| Native installer (curl / irm) | Automatic, in the background | Current user account on the machine | No package manager required |
| Homebrew (macOS) | Manual, through brew upgrade | Depends on the chosen cask, stable or latest | Homebrew already installed on the machine |
| WinGet (Windows) | Manual, through winget upgrade | Current Windows account | WinGet already installed on the machine |
| npm global | Manual, through npm update -g | Scope of the machine's Node package manager | Node.js 22 or newer since version 2.1.198, not a hard block, EBADENGINE warning otherwise |
An administrator installs Claude Code on a machine with the curl command given by the documentation, then launches claude for the first time from his project folder. The sign in prompt offers several options, and he chooses his existing Pro account.
Write in one sentence what this situation establishes, and in one sentence what it does not establish.
What this establishes: This situation establishes that the sign in happened through a subscription account rather than an API key, since it is the Pro account option that was chosen at the prompt.
What this does not establish: It does not establish that Claude Code has already updated itself since this installation, nor the exact version now running on this machine.
The three most common miscalibrations
- Too broad This situation proves that the native installer updates itself on this machine, since the curl command was used for the installation.
- Too narrow This situation shows nothing more than the name of the folder the claude command was launched from.
- Beside the point This situation shows that the administrator's machine runs a system compatible with the curl command rather than the irm command.
- The native installer updates itself automatically in the background, while Homebrew, WinGet and npm each require an update command relaunched by hand.
- A Claude Code account requires a Pro, Max, Team, Enterprise or Console subscription, the free Claude.ai plan does not open this access.
- An ANTHROPIC_API_KEY already present in the environment is neither ignored nor used silently, it triggers a single approval request instead of opening the browser.
- The claude doctor command returns a read only diagnosis without starting a session, and its alias /checkup triggers the same check from inside a conversation.
- Since version 2.1.198, npm asks for Node.js 22 or newer without this being a hard block: on an older version, installation still completes behind an EBADENGINE warning.
Run claude doctor in your terminal right now and note the first three lines it displays, before fixing anything: this is your measured starting point for the rest of the map.
Every datable claim in this lesson links here to the public text behind it. A source that does not open proves nothing.
- Claude Code, native installation, automatic update and alternative methods consultée le 2026-09-02
- Claude Code, command reference, claude doctor and its /checkup alias consultée le 2026-09-02