Installing Claude Code
Summary — Key Points of This Lesson
- Install Claude Code CLI via npm (
npm install -g @anthropic-ai/claude-code). Node.js 18 or higher is required. - macOS, Windows (WSL2 recommended), and Linux all use the same npm command.
- Download the desktop app from claude.com/download. It provides a GUI for the same Claude Code experience.
- After the first launch, link your Anthropic account with
claude auth login. - A paid plan (Pro or higher) is required (USD, tax not included — check the official site for the latest pricing).
目次 (7)
Prerequisites
The following are required to install Claude Code CLI.
- Node.js 18 or higher — Download the LTS version from nodejs.org
- npm — Bundled with Node.js
- Anthropic account (paid plan) — Pro, Max, Team, or Enterprise
Installation on macOS
Open a terminal and run the following commands.
# Global CLI installation
npm install -g @anthropic-ai/claude-code
# Verify the version
claude --version
# Authenticate (a browser window will open)
claude auth login
Even if you use Homebrew, it is recommended to manage the Node.js version with nvm or volta.
Source
Installation on Windows
On Windows, it is recommended to use WSL2 (Windows Subsystem for Linux 2). Native PowerShell also works, but WSL2 provides better stability for file system operations.
# Run inside WSL2 (e.g., Ubuntu)
npm install -g @anthropic-ai/claude-code
claude auth login
If WSL2 is not yet set up, refer to the official Microsoft documentation.
Installation on Linux
The process is the same as on macOS. You can install via npm regardless of your distribution.
npm install -g @anthropic-ai/claude-code
claude auth login
Installing the Desktop App
If you prefer a GUI, download the desktop app from claude.com/download. The "Code" tab inside the app is the graphical interface for Claude Code. You can use the same features as the CLI within a visual pane layout.
The integrated development environment features of the desktop app (file editor, diff view, app preview, etc.) require v1.2581.0 or later. Source
Verifying the Initial Setup
After installation, navigate to your project directory and type claude to start the agent.
cd /path/to/your/project
claude
On the first run, your project structure will be analyzed, and you may be asked whether to create a CLAUDE.md file.
Writing your project conventions and prohibited operations in this file
allows it to serve as instructions for the agent.
For More Details, Visit the Official Documentation
For changes introduced in newer versions and detailed configuration options, refer to the official documentation. This lesson is based on information as of 2026-04-24.