Practical guides

How to install and get started with Claude Code: a step-by-step guide

Requirements, installation on macOS, Linux and Windows, first session, plans and VS Code or JetBrains integration: Claude Code according to Anthropic's official documentation.

By ·

Claude Code is Anthropic's coding agent: it reads your project, proposes changes and runs commands from the terminal, an IDE, the desktop app or the web. This guide follows the official documentation; every command was checked against it on 2026-10-20. For usage figures and plans, see the Claude Code tool page.

Before you start

Install Claude Code

The native installer is Anthropic's recommended method; it updates itself in the background.

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

The installer shows no progress while it downloads. Then open a new terminal. Two alternatives exist, without auto-updates by default:

brew install --cask claude-code
winget install Anthropic.ClaudeCode

The claude-code Homebrew cask follows the stable channel (about a week behind, skipping releases with major regressions); claude-code@latest gets every release as soon as it ships. Signed apt, dnf and apk repositories are also available for Debian, Fedora, RHEL and Alpine.

With npm: the package requires Node.js 22 or later and installs the same native binary. Anthropic advises against sudo npm install -g (permission issues and security risks).

npm install -g @anthropic-ai/claude-code

Windows notes

Claude Code runs natively on Windows or inside WSL. The native install does not need Administrator rights. Git for Windows is optional: when present, Claude Code uses Git Bash for its Bash tool; otherwise it uses PowerShell. Sandboxing (isolated command execution) is only supported with WSL 2. In WSL, install and launch claude from the Linux terminal, not from PowerShell.

Verify the installation

claude --version

The command prints a version number followed by "(Claude Code)". If your shell says claude cannot be found, the install directory is not on your PATH yet. For a fuller check, without starting a session:

claude doctor

Your first session

Move into a project and start the agent:

cd /path/to/your/project
claude

On first use, Claude Code opens your browser to log in; credentials are then stored. If the ANTHROPIC_API_KEY environment variable is set and you approve it, the login step is skipped. With a Console account, a "Claude Code" workspace is created automatically for cost tracking.

Start with simple questions, for example:

what does this project do?

Then a small change. Claude Code shows the edit and asks for approval depending on the session's permission mode; Shift+Tab cycles through the modes.

add a hello world function to the main file

Essential commands, from Anthropic's quickstart:

Cost and plans

Claude Code is included in Claude's paid plans (Anthropic, verified 2026-10-20):

With a Console account, usage is billed per token. Anthropic says that across its enterprise deployments the average cost is around $13 per developer per active day and $150-250 per developer per month, staying below $30 per active day for 90% of users (Anthropic). The /usage command shows the session's consumption; for Pro and Max subscribers, usage is included in the plan. To compare these plans with other agents, see our guide Choosing a coding agent by budget.

Integrate Claude Code with your IDE

VS Code and Cursor: the official extension requires VS Code 1.94.0 or later and a paid Claude or Console account, with no API key needed (Anthropic). Open the Extensions view (Cmd+Shift+X on Mac, Ctrl+Shift+X on Windows and Linux), search for "Claude Code" and install. The extension bundles its own copy of the CLI; to run claude in the integrated terminal, install the CLI as well. Other VS Code forks (Devin Desktop, Kiro) use the Open VSX registry.

JetBrains (IntelliJ IDEA, PyCharm, Android Studio, WebStorm, PhpStorm, GoLand): the plugin does not bundle the CLI. Install the CLI first, then the Claude Code plugin from the JetBrains Marketplace, and restart the IDE (Anthropic). Run claude in the integrated terminal, or type /ide in a session started from an external terminal. Cmd+Esc (Mac) or Ctrl+Esc (Windows and Linux) opens Claude Code from the editor.

Update and uninstall

Native installs update themselves. To update right away:

claude update

With Homebrew: brew upgrade claude-code; with WinGet: winget upgrade Anthropic.ClaudeCode. To remove a native install on macOS, Linux or WSL:

rm -f ~/.local/bin/claude
rm -rf ~/.local/share/claude

Going further

Sources

Key takeaway: Claude Code installs with one command on macOS, Linux and Windows, but needs a paid Claude plan or a Console account; the VS Code extension bundles the CLI, the JetBrains plugin does not.

Spotted an error in this article? Report it · Our corrections policy

The OrigoTech newsletter

A sourced weekly digest of AI tool news.

Read next