Getting started

Install Claude Code

Install Claude Code with the recommended native installer, authenticate with the right account type, and verify the CLI works.

Use the native installer unless your organization deliberately manages Claude Code through Homebrew, WinGet, Linux packages, or npm.

Last checked on July 7, 2026. The commands below follow Anthropic's current setup docs. If an installer fails, use the official troubleshooting link at the end instead of guessing from old npm instructions.

Fast Path

Your situationUse this pathVerify it workedWatch out
macOS, Linux, or WSL userNative installerclaude --version and claude doctorRestart the terminal if claude is not on PATH.
Windows PowerShell userNative PowerShell installerclaude --versionPowerShell and CMD use different install commands.
Windows CMD userNative CMD installerclaude --versionIf PowerShell syntax errors appear, switch shells.
macOS team already using Homebrewbrew install --cask claude-codebrew list --cask claude-codeHomebrew installs do not auto-update by default.
API, CI, Bedrock, Vertex, or Foundry workConsole or provider credentials/status plus billing dashboardAPI keys can bill separately from subscriptions.
Free Claude accountUpgrade or use Console/provider accessAccount plan pageThe free Claude.ai plan does not include Claude Code access.

Requirements

Claude Code currently supports macOS 13+, Windows 10 1809+ or Windows Server 2019+, Ubuntu 20.04+, Debian 10+, and Alpine Linux 3.19+. It needs 4 GB+ RAM, an x64 or ARM64 processor, internet access, and a supported country or region.

ripgrep is usually included. If search inside Claude Code fails, troubleshoot search before assuming the install itself is broken.

Install

Native Install

macOS, Linux, and WSL:

curl -fsSL https://claude.ai/install.sh | bash

Windows PowerShell:

irm https://claude.ai/install.ps1 | iex

Windows CMD:

curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

Native installs auto-update in the background.

Homebrew

brew install --cask claude-code

Homebrew installs require manual updates unless your environment opts into package-manager auto-updates.

Authenticate

After installation, open a terminal in your project and run:

claude

Then follow the browser login prompts.

Claude Code requires Pro, Max, Team, Enterprise, Console access, or a supported third-party provider. Do not set ANTHROPIC_API_KEY just because you have a Pro or Max subscription. An API key can make terminal sessions use API billing instead of subscription usage.

Verify

claude --version
claude doctor

Inside Claude Code, check the active account and credential path:

/status

Use this before long sessions, especially if you have API keys or cloud-provider credentials in your shell.

Common Issues

SymptomLikely causeFix
claude: command not foundInstaller path was not loaded.Restart terminal, then check claude --version.
Install command returns 403 or HTML syntax errorsNetwork, proxy, or shell mismatch.Match the exact error in official install troubleshooting.
Pro or Max user sees API chargesANTHROPIC_API_KEY is set.Run /status, remove or scope the API key, and check Console billing.
Search does not work in a projectripgrep problem.Follow search troubleshooting before reinstalling.
Windows shell command failsPowerShell command was run in CMD, or CMD command was run in PowerShell.Switch to the shell that matches the command.

First Project Setup

After the CLI opens successfully, add a short CLAUDE.md to the project root:

# CLAUDE.md

## Common Commands

- npm run build: Build the project
- npm run test: Run tests
- npm run lint: Check code quality

## Project Rules

- Use TypeScript
- Follow the existing component patterns
- Do not edit generated files unless asked

Keep it short. A stale or oversized CLAUDE.md wastes context every session.

Official Sources