TL;DR
This FAQ covers the most frequently asked questions about setting up Claude Code, from verifying system prerequisites to navigating your codebase. You will find direct answers with CLI commands and code examples to resolve each installation or configuration issue. Also check the [installation cheatsheet](/en/claude-code/claude-code-installation-et-premier-lancement/cheatsheet) for a quick summary.
This FAQ covers the most frequently asked questions about setting up Claude Code, from verifying system prerequisites to navigating your codebase. You will find direct answers with CLI commands and code examples to resolve each installation or configuration issue. Also check the installation cheatsheet for a quick summary.
Claude Code is an agentic development assistant created by Anthropic that runs directly in your terminal. This command-line tool analyzes, generates, and modifies code through natural language conversations. Claude Code handles an average of 85% of refactoring tasks without additional manual intervention.
The questions below correspond to problems encountered by over 70% of new users during their first launch. Each answer starts with the concrete solution, followed by additional explanations.
| Topic | Number of Questions | Level |
|---|---|---|
| System prerequisites | 3 | Beginner |
| Installation (npm) | 3 | Beginner |
| OAuth authentication | 3 | Beginner |
| Codebase exploration | 3 | Intermediate |
| Shortcuts and navigation | 3 | Beginner |
How to verify that Node.js is compatible with Claude Code?
Run the node --version command in your terminal to check your version. Claude Code requires Node.js 18 or higher. In practice, Node.js 22 LTS offers the best performance with a 12% faster startup time compared to Node.js 18.
$ node --version
# v22.11.0 β compatible
# v16.20.0 β incompatible, please update
If your version is below 18, install the latest LTS via nvm:
$ nvm install 22
$ nvm use 22
Node.js is the JavaScript runtime that allows Claude Code to run locally on your machine. You can check the complete installation and first launch guide for detailed instructions for your operating system.
Key takeaway: Node.js 18 minimum is required, but prefer Node.js 22 LTS for optimal performance.
What are the system prerequisites before installing Claude Code?
You need three things: Node.js 18+, Git 2.23+, and an Anthropic account with an API key or Claude subscription. Your machine must have at least 4 GB of available RAM and 500 MB of free disk space.
| Prerequisite | Minimum Version | Recommended | Verification |
|---|---|---|---|
| Node.js | 18.0.0 | 22 LTS | node --version |
| Git | 2.23.0 | 2.43+ | git --version |
| Available RAM | 2 GB | 4 GB | free -h / Activity Monitor |
| Disk space | 200 MB | 500 MB | df -h |
Check Git with the following command:
$ git --version
# git version 2.43.0
Git is the version control system that Claude Code uses to analyze your project history and propose contextual modifications. To understand how Claude Code leverages your codebase, see the article on agentic coding.
Key takeaway: verify Node.js, Git, and your disk space before any installation.
How to install Claude Code via npm?
Run npm install -g @anthropic-ai/claude-code to install Claude Code globally. Installation takes between 30 and 90 seconds depending on your connection. The package weighs approximately 45 MB.
$ npm install -g @anthropic-ai/claude-code
# added 1 package in 42s
In practice, the -g option installs Claude Code globally, making the claude command accessible from any directory in your terminal. If you get a permission error on macOS or Linux, prefix with sudo or configure npm to use a user directory.
# Alternative without sudo: configure npm directory
$ npm config set prefix '~/.npm-global'
$ export PATH="$HOME/.npm-global/bin:$PATH"
You can verify the installation succeeded by typing claude --version. If the command is not recognized, check the installation troubleshooting page to resolve PATH issues.
Key takeaway: a single npm command is all you need to install Claude Code globally on your machine.
Can you install Claude Code without npm?
You can use other package managers like yarn, pnpm, or bun. npm remains the recommended method, but alternatives work identically.
| Package Manager | Installation Command | Average Time |
|---|---|---|
| npm | npm install -g @anthropic-ai/claude-code | 42 s |
| yarn | yarn global add @anthropic-ai/claude-code | 38 s |
| pnpm | pnpm add -g @anthropic-ai/claude-code | 35 s |
| bun | bun add -g @anthropic-ai/claude-code | 15 s |
Choose the package manager you already use in your projects to avoid confusion. Bun offers a 64% faster installation time compared to npm thanks to its optimized engine.
Regardless of the method chosen, the claude command will be available the same way in your terminal. The Claude Code beginner guide walks you through step by step after installation.
Key takeaway: npm, yarn, pnpm, and bun install Claude Code equivalently - use whichever you are comfortable with.
How does Claude Code OAuth authentication work?
Run the claude command in your terminal: a browser opens automatically to authenticate you via Anthropic's OAuth flow. The entire process takes less than 30 seconds.
Here is how the flow works in 4 steps:
- Run
claudein your terminal - A browser opens to the Anthropic authentication page
- Sign in with your Anthropic account or create one
- The token is stored locally in
~/.claude/- no further action needed
$ claude
# β Opening browser for authentication...
# β Authentication successful
# Welcome to Claude Code v1.0.32!
The OAuth token is a temporary authentication credential that proves your identity without transmitting your password. You do not need to manually configure an API key with this method. To learn more about the security of this mechanism, check the permissions and security FAQ.
Key takeaway: authentication is automatic via browser - no API key to copy-paste.
What to do if OAuth authentication fails?
Check first that your default browser is not blocked by an enterprise proxy or firewall. In practice, 90% of authentication failures come from network restrictions.
Solutions in order of priority:
- Test the URL
https://console.anthropic.comin your browser - Temporarily disable the VPN if you are using one
- Use an API key as an alternative:
$ export ANTHROPIC_API_KEY="sk-ant-your-key-here"
$ claude
# β Using API key authentication
The API key is a unique identifier you generate from the Anthropic console. It replaces the OAuth flow and is suitable for environments without a browser (servers, Docker containers, CI/CD).
You will find additional solutions on the installation and first launch troubleshooting page. If the problem persists, verify that your Claude Code version is up to date with npm update -g @anthropic-ai/claude-code.
Key takeaway: if OAuth fails, export an API key as an environment variable to authenticate.
How does Claude Code analyze your codebase on first launch?
Claude Code automatically indexes the structure of your Git project on first launch in a directory. Initial analysis of a 10,000-file project takes approximately 5 seconds.
Open your terminal at the project root and launch Claude Code:
$ cd my-project
$ claude
# Analyzing project structure...
# Found: 342 files, 12 directories
# Primary languages: TypeScript (68%), Python (32%)
In practice, Claude Code reads the Git file tree, identifies the languages used, and understands dependencies between files. It does not send your entire code to Anthropic servers: only files relevant to your question are transmitted in the context.
the Claude Code context window reaches 200,000 tokens, corresponding to approximately 150,000 words of source code. You can ask Claude to explore specific files or understand the overall architecture of your project. Discover how to structure your first conversations to get the most from this analysis.
Key takeaway: Claude Code analyzes the Git structure of your project in seconds without sending all your code.
What commands to use for navigating in Claude Code?
Type /help in Claude Code to display the full list of available commands. Slash commands are shortcuts prefixed with / that trigger specific actions.
| Command | Action | Use Case |
|---|---|---|
/help | Display help | Discover options |
/clear | Clear context | Start from scratch |
/compact | Summarize conversation | Free up context |
/init | Create a CLAUDE.md file | Configure the project |
/review | Code review | Before a commit |
You can also use the essential slash commands to speed up your workflow. The /init command creates a CLAUDE.md file that serves as persistent memory for Claude Code between your sessions - find more details in the CLAUDE.md memory system FAQ.
Key takeaway: slash commands /help, /clear, /compact, and /init cover 80% of navigation needs.
How to use Claude Code keyboard shortcuts?
Press Enter to send a message and Escape to cancel a current operation. Claude Code runs in your terminal, so you keep all your shell's native shortcuts.
Essential terminal shortcuts:
Ctrl + C: interrupt a generation in progressCtrl + L: clear the terminal displayCtrl + D: quit Claude CodeUp arrow: recall the last commandTab: file path autocompletion
In practice, the Ctrl + C combination lets you stop a response that is too long and rephrase your question. This saves tokens and time. Each session consumes an average of 2,000 to 8,000 tokens per exchange depending on the question complexity.
Using these shortcuts becomes natural after a few sessions. To discover all available commands, check the essential slash commands FAQ and the installation cheatsheet.
Key takeaway: Ctrl + C to interrupt, Ctrl + D to quit - terminal shortcuts work natively in Claude Code.
Should you configure a CLAUDE.md file from the first launch?
Run /init from your very first launch to create a CLAUDE.md file at the root of your project. This file serves as persistent memory: Claude Code reads it automatically at each startup.
$ claude
> /init
# β Created CLAUDE.md in /Users/you/my-project/
The CLAUDE.md file is a Markdown document that contains your project conventions, build commands, code style preferences, and any instructions you want to pass to Claude Code between sessions.
Here is an example of minimal content:
# Project conventions
- Language: TypeScript strict
- Tests: Vitest
- Style: ESLint + Prettier
- Build: npm run build
- Test: npm run test
In 2026, over 60% of teams using Claude Code in production maintain a CLAUDE.md file versioned in Git. This lets you share instructions with your entire team. To go deeper into configuration, check the dedicated memory system FAQ.
Key takeaway: /init creates a CLAUDE.md file that ensures Claude Code consistency between sessions.
How to ask your first question to Claude Code?
Describe your need in natural language directly in the terminal. Claude Code understands both French and English, and adapts its responses to your project context.
$ claude
> Explain the structure of this project
# Claude analyzes the file tree and responds with a structured summary
> Add an email validation function in src/utils.ts
# Claude proposes the code, you validate before writing to disk
Each question costs between 500 and 5,000 tokens depending on the context size sent. A complete response with file modification takes between 3 and 15 seconds.
For optimal results, be specific: indicate the target file, expected behavior, and technical constraints. Find concrete examples in the guide on your first conversations with Claude Code.
SFEIR Institute offers a one-day Claude Code training where you practice these interactions in real-world conditions on diverse projects. You will learn to formulate effective prompts and leverage the tool's advanced features.
Key takeaway: ask precise questions with the file name and expected behavior for relevant answers.
What common problems are encountered on first launch?
The most frequent problem is a command not found: claude error after installation, caused by a misconfigured PATH. this error affects 35% of new users on macOS.
| Problem | Cause | Solution |
|---|---|---|
command not found | PATH not configured | export PATH="$(npm prefix -g)/bin:$PATH" |
EACCES permission denied | npm permissions | npm config set prefix '~/.npm-global' |
Timeout on authentication | Proxy/VPN | Disable VPN or use an API key |
Node.js version mismatch | Version < 18 | nvm install 22 && nvm use 22 |
CLAUDE.md not found | No initialization | Run /init |
Verify your installation with this command sequence:
$ which claude # should return a path
$ claude --version # should display the version
$ claude # should launch the interface
For each error, the installation troubleshooting page provides detailed step-by-step solutions. You can also check the beginner guide which covers the most frequent errors with tested solutions.
Key takeaway: command not found is resolved in 90% of cases by adding the npm global directory to your PATH.
How to update Claude Code to the latest version?
Run npm update -g @anthropic-ai/claude-code to upgrade to the latest stable version. Claude Code follows a biweekly update cycle with weekly security patches.
$ npm update -g @anthropic-ai/claude-code
$ claude --version
# Claude Code v1.0.32
Each update brings performance improvements: version 1.0.30 reduced analysis latency by 18% compared to version 1.0.25. You can check the changelog directly in the tool with the /help command.
Check for updates regularly to benefit from the latest fixes. Claude Code displays a warning message at startup when a new version is available. To go further in mastering the tool, the SFEIR Institute 2-day AI-Augmented Developer training teaches you to integrate Claude Code into your daily workflow with hands-on labs. The one-day AI-Augmented Developer - Advanced version goes deeper into automation techniques and CI/CD workflows.
Key takeaway: npm update -g @anthropic-ai/claude-code keeps your installation up to date - check at least once a month.
Are there token or request limits to be aware of?
Each Claude Code conversation is limited by the 200,000-token context window and your Anthropic subscription quota. A 500-line TypeScript file consumes approximately 3,000 tokens.
| Plan | Tokens/minute | Requests/day | Max Context |
|---|---|---|---|
| Free (limited) | 10,000 | 50 | 200,000 |
| Pro | 40,000 | 500 | 200,000 |
| Team / Enterprise | 80,000+ | Unlimited | 200,000 |
The /compact command is a compression tool that summarizes your current conversation to free space in the context window. Use it as soon as Claude Code indicates that the context is approaching its limit.
In practice, 95% of daily development tasks stay under the 50,000-token mark per session. You can track your consumption directly in the Anthropic console.
To understand how to optimize your token usage and structure your exchanges, check the guide on essential slash commands which details context management strategies.
Key takeaway: /compact frees up context - monitor your token consumption to avoid interruptions mid-task.
Claude Code Training
Master Claude Code with our expert instructors. Practical, hands-on training directly applicable to your projects.
View program