Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Some links on this page are affiliate links: if you buy through them we may earn a commission, at no extra cost to you.

For a supported terminal installation, use Node.js 18 or newer, install Claude Code with npm, then launch it from your project directory:

npm install -g @anthropic-ai/claude-code
cd your-project
claude

This guide separates that verified terminal procedure from Windows shell choices, authentication, updates, network configuration, and the still-changing IDE, web, and desktop surfaces. The official setup information used here lists macOS 10.15 or newer, Ubuntu 20.04 or newer, Debian 10 or newer, or Windows 10 or newer through WSL or Git for Windows; at least 4 GB of RAM; an internet connection; and availability in a supported country. Bash, Zsh, or Fish are the best-supported shells. Check Anthropic’s current setup page before installing because operating-system and product requirements can change.

What you need before installing

  • Operating system: macOS 10.15+, Ubuntu 20.04+, Debian 10+, or Windows 10+ using WSL 1, WSL 2, or Git for Windows.
  • Memory: 4 GB RAM or more.
  • Runtime: Node.js 18+ available in the shell where you will run Claude Code.
  • Network: an internet connection and access from a supported country.
  • Shell: Bash, Zsh, or Fish is recommended.

Verify your runtime before changing anything:

node --version
npm --version

If the first command reports a version below 18, install or upgrade Node.js using your organization’s approved method, then open a new terminal and check again.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Install Claude Code in a terminal

Standard global npm installation

  1. Open Bash, Zsh, or Fish.
  2. Install the package globally:
npm install -g @anthropic-ai/claude-code
  1. Change to the repository or project you want Claude Code to work on:
cd /path/to/your-project
  1. Start an interactive session:
claude

The first launch normally takes you through sign-in. Keep the project directory as the working directory: Claude Code uses that location as the context for the session, subject to its permission and safety controls.

Do not use sudo with npm

Do not “fix” a global-install permission error by running sudo npm install -g. The official guidance warns that this can create permission problems and security risk. Instead, correct npm’s global prefix or use the local-install migration described below.

Check the installation

Run the built-in diagnostic command:

claude doctor

Use its output to identify the installation type, missing dependencies, or path problems before troubleshooting the project itself.

Windows: choose WSL or Git for Windows

Windows has two distinct supported routes. They are not interchangeable shells.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Route What it provides Important detail
WSL 1 or WSL 2 A Linux environment inside Windows Install and run Claude Code from the WSL distribution’s shell and filesystem context.
Git for Windows Git Bash and its Unix-like command environment Use the Bash executable supplied by Git for Windows; portable Git may require an explicit path.

WSL route

Open your WSL distribution, confirm that Node.js 18+ is installed inside WSL, and run the same npm commands shown above. A Node.js installation on the Windows side does not automatically satisfy the WSL environment.

Git Bash route

Install Git for Windows, open Git Bash, and verify Node.js and npm from that shell. If you use a portable Git installation, set CLAUDE_CODE_GIT_BASH_PATH to the full path of its bash.exe. The variable must point to the executable actually used by your installation.

Sign-in and provider choices

The setup information lists three broad authentication paths. Availability, billing, and plan inclusion can change, so confirm the current account terms when you sign in.

Route Who it suits Requirement to verify
Anthropic Console OAuth Developers using the default Anthropic account path Active billing is required.
Claude App sign-in People who already have a qualifying Claude plan The account must have a Pro or Max plan that includes access.
Amazon Bedrock or Google Vertex AI Enterprise teams using a cloud-provider account Organization configuration, credentials, regional availability, and provider billing.

Do not assume that a Claude web subscription, an Anthropic Console account, and a cloud-provider deployment have identical permissions. Select the route your organization has approved and follow its current authentication instructions.

Free tools Windows power users keep installed

One-click scans. No signup required.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Other installation methods and updates

Move away from npm’s global permission model

The setup page documents claude migrate-installer for moving from the global npm installation to a local installation. This approach is intended to avoid npm autoupdater permission issues. Run it from an existing Claude Code installation and follow the prompts it displays; the exact migration behavior can change with the release.

Native binary (alpha)

A native binary installation is described as an alpha option for macOS, Linux, and Windows through WSL. From an existing installation, the documented command is:

claude install

For a fresh setup, the guide also provides a shell installer. Because this route is alpha and platform coverage can change, use the current official instructions rather than copying an old shell command into automation.

Automatic and manual updates

Claude Code is described as auto-updating, with updates taking effect the next time it starts. You can request a manual update with:

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
claude update

After an update, run claude doctor if behavior or PATH resolution changes.

Useful commands after installation

Command Purpose
claude Start an interactive session in the current directory.
claude -p "query" Run a one-shot request in print mode.
claude -c or claude --continue Continue the latest conversation.
claude -r or claude --resume Resume a selected session.
claude update Check for and apply an available update.
claude doctor Inspect installation and environment diagnostics.

Permission and output-format flags are available in the CLI reference. Treat installation, authentication, and permission configuration as separate steps: getting the binary to start does not grant it unrestricted access to files or commands.

IDE, web, and desktop setup: what is and is not established

The terminal procedure above should not be copied to an IDE extension, a browser page, or a desktop application. The available official setup material mentions a web interface in connection with a Claude plan but does not provide a complete web setup procedure. It also does not establish current product names, operating-system support, prerequisites, or access rules for an IDE or desktop version.

Therefore:

  • Use the terminal instructions only for the Claude Code CLI.
  • For an IDE integration, follow the current instructions for that specific editor and extension; do not infer that installing the npm package installs an extension.
  • For web access, sign in through the current Claude service and verify whether your account or plan includes the relevant coding surface.
  • For a desktop application, verify whether the product is a distinct Claude surface, which operating systems it supports, and whether it provides Claude Code functionality.

These distinctions prevent a common failure: a successful CLI installation being mistaken for proof that an IDE, web, or desktop product is enabled.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Managed networks, proxies, and enterprise gateways

Proxy variables and unsupported proxy types

Claude Code uses the standard HTTP_PROXY and HTTPS_PROXY environment variables. The proxy guidance says NO_PROXY and SOCKS proxies are not supported. If your company requires a custom certificate authority, use the certificate-bundle variables documented for the current release rather than disabling TLS verification.

Allowlist destinations

Network administrators should account for these destinations listed in the proxy guidance:

  • api.anthropic.com
  • statsig.anthropic.com
  • sentry.io

Your security team should confirm whether additional endpoints are required by the version and account route you use.

LLM gateways

An LLM gateway can centralize authentication, usage tracking, cost controls, audit logging, and model routing. The documented LiteLLM example is a third-party proxy: Anthropic does not endorse, maintain, or audit LiteLLM’s security or functionality. Treat gateway configuration, credentials, and data-handling policy as your organization’s responsibility.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Troubleshooting common installation failures

“node” or “npm” is not recognized

Node.js is missing from the current shell’s PATH, or it is installed in a different environment. Install Node.js 18+ in that environment, restart the shell, and rerun node --version.

Global npm permission denied

Do not add sudo. Correct npm’s global prefix according to your platform’s configuration guidance, or install Claude Code and use claude migrate-installer to move to the local method.

“claude” is not found after installation

Check claude doctor, restart the terminal, and inspect whether npm’s global bin directory is on PATH. On Windows, confirm that you installed in WSL or Git Bash intentionally and are invoking the command in that same environment.

Authentication or billing is rejected

Confirm which route you selected: Console OAuth requires active billing; Claude App access depends on an eligible Pro or Max plan; Bedrock and Vertex require enterprise cloud configuration. Account eligibility can change, so check the current account documentation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Corporate network timeouts

Check HTTP_PROXY and HTTPS_PROXY, verify that SOCKS is not being used, install the required certificate bundle, and ask the network team to allowlist the three documented destinations. Do not work around certificate errors by turning off verification.

WSL and Windows files behave differently

Keep the installation, Node.js runtime, and project path in the same environment where possible. A command installed in Windows PowerShell is not automatically available inside WSL, and a WSL install is not automatically available in Git Bash.

Or skip the browser setup

If your goal is to capture a website for an AI workflow rather than install Claude Code itself, ScreenshotNeo provides a website screenshot API and MCP server. A single GET request returns PNG, JPEG, WebP, or PDF, while its cleanup steps can accept cookie banners and remove more than 60 known consent platforms, newsletter popups, and chat widgets before capture.

Here is a cURL request (the complete option reference is in the ScreenshotNeo documentation):

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
curl -G "https://api.screenshotneo.com/v1/shot" -d access_key=YOUR_API_KEY --data-urlencode url=https://stripe.com -o shot.webp

Python

import requests
r = requests.get("https://api.screenshotneo.com/v1/shot", params={"access_key": "YOUR_API_KEY", "url": "https://stripe.com"}, timeout=90)
open("shot.webp", "wb").write(r.content)

Node.js

const q = new URLSearchParams({ access_key: 'YOUR_API_KEY', url: 'https://stripe.com' });
const res = await fetch(`https://api.screenshotneo.com/v1/shot?${q}`);

ScreenshotNeo reports page and billing outcomes in X-Page-Verdict and X-Billed headers. Bot checks, CAPTCHAs, blank pages, timeouts, failed loads, and cache hits are not billed. Its MCP server exposes take_screenshot, get_page_info, and capture_pdf for Claude, Cursor, and other MCP clients. The Free plan includes 1,000 shots per month without a card; paid plans start at $5 for 3,000 shots, and every feature is included on every plan.

Create a free ScreenshotNeo account to get the 1,000 monthly screenshots without adding a card.

Frequently Asked Questions

Can I install Claude Code with Homebrew instead of npm?

The setup information covered here specifies npm, local migration, and an alpha native-binary route. Use the current official instructions for any additional package manager.

Does installing Claude Code automatically install an IDE extension?

No. The terminal package and an editor integration are separate surfaces; use the current instructions for the specific IDE.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Which Windows option should a team standardize on?

Choose either WSL or Git for Windows based on your tooling and policy, then keep Node.js, Claude Code, and the project in that same environment.

Where can I see whether a request was billed in ScreenshotNeo?

Inspect the response’s X-Billed header; X-Page-Verdict identifies the page outcome.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.