Skip to main content
Getting Started

Prerequisites and installation

  • Tutorial
  • Tooling

Install Claude Code in minutes. Prerequisites (Node.js 18+, terminal, Anthropic account), npm installation, API key or Max authentication, and common error troubleshooting.

Prerequisites

Before installing Claude Code, make sure you have these three things. If any of them are missing, don't worry, we explain everything below.

Node.js 18 or higher

Claude Code runs on Node.js, the JavaScript engine that executes code server-side. You need version 18 at minimum (version 22 LTS is recommended).

Download it from nodejs.org (ouvre un nouvel onglet) or use a version manager like nvm.

The nodejs.org/download page provides an official Windows installer (.msi) and a binary distribution. For most users the Windows installer is the easiest path.

A terminal

Claude Code lives in the terminal. On macOS, use Terminal or iTerm2. On Windows, use PowerShell or WSL (Windows Subsystem for Linux). On Linux, any terminal emulator will do.

A Claude subscription

The simplest and most cost-effective option: a Claude Pro, Max, or Team subscription from claude.com (ouvre un nouvel onglet). Pro already includes Claude Code, Max adds 5× or 20× the capacity of Pro, and Team is designed for teams with a shared workspace.

If you prefer paying exactly for usage (very occasional use), you can instead create an API key on console.anthropic.com (ouvre un nouvel onglet). See the Authentication section below for both methods.

Check your Node.js version

Open your terminal and type the following command:

Installing Claude Code

Installation takes a single command. Open your terminal and run:

This command installs Claude Code globally on your machine. This means the claude command will be available from any folder on your system.

Verify the installation

After installation, verify everything works:

If the command is recognized and shows a version number, the installation was successful.

Authentication

On first launch, Claude Code will ask you to authenticate. Two methods are available.

Method 1: API key (pay-as-you-go)

This is the most flexible method. You only pay for what you use.

1

Generate an API key

Go to console.anthropic.com (ouvre un nouvel onglet), sign in, then go to API Keys and click Create Key. Copy the generated key (it starts with sk-ant-).

2

Set the environment variable

Add your API key to your shell configuration file:

# Add this line to your ~/.bashrc or ~/.zshrc
export ANTHROPIC_API_KEY="sk-ant-your-key-here"
# Reload your configuration
source ~/.bashrc # or source ~/.zshrc
3

Launch Claude Code

Navigate to a project folder and run the claude command. Authentication will be automatic thanks to the environment variable.

Method 2: Claude Max / Pro / Team subscription

If you have a Claude subscription (Max, Pro, or Team), you can use Claude Code without a separate API key.

1

Launch Claude Code

Simply run the claude command in your terminal:

claude
2

Choose the authentication method

Claude Code presents two options. Select Claude App:

? How would you like to authenticate?
> Claude App (Max subscription)
Anthropic Console (API key)
3

Sign in through your browser

A browser opens automatically. Sign in with your Claude account. Once authenticated, go back to the terminal, Claude Code is ready.

Plan comparison

Extract from claude.com/pricing on May 9, 2026. Pro includes Claude Code, Max adds 5x or 20x the Pro capacity. For up-to-date numbers, open claude.com/pricing.

Essai gratuit

Gratuitcrédit de démarrage inclus

Pour tester Claude Code avant de vous engager. Crédit offert à l'inscription.

  • Crédit d'essai à l'inscription
  • Accès à Claude via clé API
  • Facturation à l'usage après le crédit
  • Pas d'abonnement requis
  • Idéal pour découvrir l'outil
Créer un compte
Recommandé pour commencer

Claude Max

~20 €par mois

L'abonnement idéal pour une utilisation régulière de Claude Code. Accès inclus sans clé API séparée.

  • Accès illimité à Claude Code
  • Pas de clé API à gérer
  • Claude.ai web inclus
  • Annulation à tout moment
  • Idéal pour un usage quotidien
S'abonner à Claude Max

Claude Code API

À l'usageselon la consommation

Pour les développeurs qui préfèrent payer exactement ce qu'ils consomment, sans abonnement fixe.

  • Paiement à l'utilisation
  • Clé API nécessaire
  • Contrôle fin des coûts
  • Intégration dans des scripts
  • Idéal pour des usages ponctuels
Voir les tarifs API

Les prix sont indicatifs et peuvent varier. Consultez anthropic.com/pricing pour les tarifs officiels.

Troubleshooting: common errors

"command not found: node" or version too old

Node.js is not installed or your version is outdated.

# Install nvm (Node.js version manager)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
# Restart the terminal, then:
nvm install 22
nvm use 22
# Verify
node --version
# v22.x.x

"EACCES: permission denied"

npm doesn't have permissions to install global packages.

Solution 1: Configure the npm prefix (recommended)

mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc
# Re-run the installation
npm install -g @anthropic-ai/claude-code

Solution 2: Use nvm

If you use nvm, permission issues are handled automatically.

"command not found: claude"

The terminal can't find the claude command after installation.

# Check where npm installs global packages
npm config get prefix
# The bin/ subfolder of that path must be in your PATH
# If you configured ~/.npm-global:
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrc

If you closed and reopened your terminal after installation and the problem persists, verify that npm's bin folder is in your PATH variable.

"API key not found" or "Invalid API key"

# Check that the variable is set
echo $ANTHROPIC_API_KEY
# If nothing shows, the variable isn't configured
# Check your shell configuration file
cat ~/.bashrc | grep ANTHROPIC
# Make sure the key starts with sk-ant-
# and hasn't been revoked on console.anthropic.com

Next steps

Claude Code is installed and you're authenticated. Let's configure your environment to get the most out of the tool.