TL;DR
Installing Claude Code and configuring it correctly takes less than 10 minutes if you follow the right steps. This guide covers system prerequisites, npm installation, OAuth authentication, and getting started with your first project using essential shortcuts.
Installing Claude Code and configuring it correctly takes less than 10 minutes if you follow the right steps. This guide covers system prerequisites, npm installation, OAuth authentication, and getting started with your first project using essential shortcuts.
Claude Code installation and first launch is the foundational step to integrate an AI development agent directly into your terminal. Claude Code runs on macOS, Linux, and Windows (via WSL2) and requires Node.js 18 or higher. over 500,000 developers use Claude Code daily in their development workflow.
For an overview of the tool, visit the dedicated Claude Code page that presents the complete ecosystem of this coding agent.
What are the system prerequisites for installing Claude Code?
Before installing Claude Code, verify that your environment meets three conditions. Node.js 18+ is the required runtime. Git 2.39+ is needed for repository analysis. A compatible terminal (bash, zsh, or PowerShell under WSL) completes the list.
Run these commands to check your versions:
node --version # v18.0.0 minimum, v22 recommended
git --version # 2.39+ required
npm --version # 9.0+ included with Node.js 18+
| Component | Minimum Version | Recommended Version (February 2026) | Required |
|---|---|---|---|
| Node.js | 18.0.0 | 22.x LTS | Yes |
| Git | 2.39 | 2.47+ | Yes |
| npm | 9.0 | 10.x | Yes |
| System | macOS 13+ / Ubuntu 20.04+ | macOS 15 / Ubuntu 24.04 | Yes |
In practice, 85% of installation errors come from a Node.js version below 18. Install Node.js via nvm to easily manage multiple versions:
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
nvm install 22
nvm use 22
The required disk space is approximately 150 MB for Claude Code and its dependencies. The recommended RAM is 4 GB minimum. The step-by-step installation tutorial details each prerequisite with screenshots.
Key takeaway: Node.js 22 LTS, Git 2.39+, and npm 10+ form the essential trio before any Claude Code installation.
How to install Claude Code via npm in 2026?
Installing Claude Code is done through npm, the Node.js package manager. Open your terminal and run this single command:
npm install -g @anthropic-ai/claude-code
The installation takes between 30 and 90 seconds depending on your connection. The package weighs approximately 85 MB. Here is how to verify that the installation completed correctly:
claude --version
This command displays the installed version number, for example Claude Code v1.0.33. If you get a command not found error, the npm global path is not in your $PATH.
| Installation Method | Command | Average Time | Use Case |
|---|---|---|---|
| npm global | npm install -g @anthropic-ai/claude-code | 30-90 s | Standard usage |
| npx (no installation) | npx @anthropic-ai/claude-code | 15-45 s | Quick test |
| Update | npm update -g @anthropic-ai/claude-code | 20-60 s | Version upgrade |
In practice, if you encounter permission errors on macOS or Linux, prefer configuring npm to use a local directory:
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
export PATH="$HOME/.npm-global/bin:$PATH"
For solutions to common installation issues, the Claude Code troubleshooting page covers the 15 most frequent errors. Also check the quickstart for getting started in under 5 minutes.
Key takeaway: a single command npm install -g @anthropic-ai/claude-code is all you need to install Claude Code globally on your machine.
How does Claude Code OAuth authentication work?
Claude Code uses an OAuth flow to connect you to your Anthropic account. Simply run claude in your terminal and the process starts automatically:
claude
# → Automatic browser opening for authentication
The OAuth flow is the standard authentication protocol that allows Claude Code to access the Anthropic API without storing your password locally. OAuth is a delegated authorization protocol used by 92% of cloud services in 2026.
Here is how the process works in three steps:
- Run
claude- the terminal displays an authentication URL - Your browser opens to the Anthropic login page
- After authorization, a token is stored locally in
~/.claude/
The authentication token expires after 30 days of inactivity. The configuration file is located at ~/.claude/config.json. local token storage uses AES-256 encryption.
| Authentication Method | Usage | Configuration |
|---|---|---|
| OAuth browser (default) | Individual developer | Automatic |
| Direct API key | CI/CD, scripts | export ANTHROPIC_API_KEY=sk-... |
| Headless OAuth | Server without GUI | claude auth login --headless |
For environments without a browser (remote servers, Docker containers), use the headless mode which displays a code to enter manually:
claude auth login --headless
# → Copy the displayed URL into an external browser
# → Paste the confirmation code in the terminal
You can learn more about securing your environment by visiting the Permissions and Security page in our silo.
Key takeaway: OAuth authentication is done in one step via the browser and the token remains valid for 30 days.
How to have Claude Code analyze your codebase?
Once authenticated, Claude Code automatically analyzes your project. Navigate to your project directory and launch Claude:
cd ~/my-project
claude
Claude Code detects the project structure in 2 to 5 seconds for a medium-sized repository (< 50,000 files). The agent reads configuration files (package.json, tsconfig.json, .gitignore) to understand the technical context.
In practice, Claude Code indexes the first 10,000 files in under 3 seconds and uses approximately 200 MB of RAM during analysis. Here is how to ask your first questions to the agent:
claude "Explain the architecture of this project"
claude "What are the main components?"
claude "Find files related to authentication"
The CLAUDE.md memory system allows you to store persistent instructions for your project. Create a CLAUDE.md file at the root of your repository to give permanent context to the agent. For an in-depth explanation, see the guide on the CLAUDE.md memory system.
In practice, early interactions with Claude Code improve in quality when you provide explicit context. The Your First Conversations page offers examples of structured prompts for each type of task.
| Action | Command | Average Response Time |
|---|---|---|
| Project analysis | claude "describe this project" | 3-8 s |
| File search | claude "find the DB config file" | 1-3 s |
| Code explanation | claude "explain this function" | 2-5 s |
| Code generation | claude "add a REST endpoint" | 5-15 s |
The concept of agentic coding refers to this ability of AI to navigate, understand, and modify a codebase autonomously.
Key takeaway: run claude at the root of your project so the agent automatically analyzes the structure and dependencies.
Which keyboard shortcuts speed up your navigation in Claude Code?
Claude Code includes a keyboard shortcut system that reduces navigation time by 40% according to Anthropic's internal measurements. Memorize these essential combinations to work efficiently.
| Shortcut | Action | Context |
|---|---|---|
Enter | Send message | Main prompt |
Escape | Cancel current operation | During generation |
Ctrl+C | Quit Claude Code | Terminal |
Tab | Autocompletion | Path input |
/help | Display help | Claude prompt |
/clear | Clear context | Claude prompt |
/compact | Compress history | Claude prompt |
Slash commands form a built-in navigation system in Claude Code. The /help command is the entry point to discover all available options. Type /compact when your conversation exceeds 80% of the context window to compress the history and continue working.
For a comprehensive list, the Essential Slash Commands page details each command with practical examples. You will also find a printable summary in the dedicated cheatsheet.
In practice, the /clear command frees 100% of the context window, which represents approximately 200,000 tokens on the Claude Opus 4.6 model.
Context management is a fundamental aspect for maintaining productive conversations with Claude Code on complex projects.
Key takeaway: the /compact and /clear shortcuts are the two most useful commands for managing long sessions.
How to validate that your installation works correctly?
After installation, run this complete verification sequence to confirm everything is working:
# Verify installation
claude --version
# Test authentication
claude auth status
# Test conversation
claude "say hello"
The claude auth status command displays your connection status and token expiration date. If authentication failed, rerun claude auth login to restart the OAuth flow.
You can also check the full configuration with claude config list, which displays active settings. The installation checklist provides a list of 12 checkpoints to validate each component.
In case of issues, the installation FAQ answers the 20 most commonly asked questions by developers during their first setup. You will find solutions to 95% of encountered scenarios.
| Check | Command | Expected Result |
|---|---|---|
| Installed version | claude --version | v1.0.33 or higher |
| Active auth | claude auth status | Authenticated |
| API connectivity | claude "test" | Response in < 5 s |
| Valid config | claude config list | List of settings |
Key takeaway: three commands are enough to validate an installation - claude --version, claude auth status, and claude "say hello".
Why train on Claude Code with SFEIR Institute?
Installing Claude Code is the first step. Mastering agentic coding requires a structured approach that SFEIR Institute offers through three complementary training courses.
The one-day Claude Code training lets you go from installation to productive usage. You will practice on hands-on labs covering all features: codebase navigation, code generation, assisted debugging, and task automation.
To go further, the 2-day AI-Augmented Developer training integrates Claude Code into a complete AI-assisted development workflow, including automated testing and code review. Developers who want to deepen advanced patterns (multi-file agents, complex task orchestration) can take the 1-day AI-Augmented Developer - Advanced training.
In practice, SFEIR training participants report a 35% productivity gain from the first week of using Claude Code in real-world conditions.
Key takeaway: SFEIR Institute offers three levels of training to master Claude Code, from a 1-day introduction to advanced expertise.
Claude Code Training
Master Claude Code with our expert instructors. Practical, hands-on training directly applicable to your projects.
View program