Cheatsheet10 min read

Installation and First Launch - Cheatsheet

SFEIR Institute

TL;DR

This cheatsheet gathers all the commands and shortcuts to install Claude Code, authenticate, and explore a codebase in minutes. Keep this practical reference at hand to configure your environment without friction and launch your first AI-assisted development sessions.

This cheatsheet gathers all the commands and shortcuts to install Claude Code, authenticate, and explore a codebase in minutes. Keep this practical reference at hand to configure your environment without friction and launch your first AI-assisted development sessions.

Claude Code is a command-line development agent created by Anthropic that integrates directly into your terminal to analyze, modify, and generate code. The recommended way to install it is the native installer, a self-contained binary that auto-updates and does not require Node.js. You also need Git and an active account. This installation and first launch cheatsheet serves as a quick reference covering essential commands, from setup to navigating your project.

Claude Code runs on macOS 13+, Linux, and Windows. On Windows you can install it natively on Windows 10 1809+ (PowerShell or CMD) or run it through WSL2. The installation usually takes only a few minutes on a standard connection.

SFEIR Institute trainings

Claude Code Training

1 day · Fundamentals

View program

AI-Augmented Developer

2 days · Intermediate

View program

What are the system prerequisites for installing Claude Code?

Before any installation, verify that your machine has the required tools. The native installer needs no runtime of its own, so Node.js is not a prerequisite for Claude Code. It is required only if you choose the npm install path. Check the complete installation checklist to make sure nothing is missed.

PrerequisiteMinimum VersionVerification CommandExpected Result
SystemmacOS 13.0+, Ubuntu 20.04+, Windows 10 1809+ (native) or WSL2uname -aDarwin / Linux
GitRecommended (for git integration; Git for Windows recommended on native Windows so the Bash tool works)git --versiongit version 2.x
Node.js18+ (required ONLY for the npm install method)node --versionv18.x.x or newer
RAM4 GB minimumfree -h (Linux)>= 4 GB available
Disk space500 MB freedf -h>= 500 MB

You also need an account to authenticate: a Claude Pro, Max, Team, or Enterprise subscription, a Claude Console account, or a supported cloud provider (Amazon Bedrock, Google Vertex AI, or Microsoft Foundry).

To resolve common issues, the installation troubleshooting guide details each error case.

Key takeaway: Git and a supported account are the real prerequisites. Node.js 18+ matters only if you install through npm, not for Claude Code itself.

How to install Claude Code?

The recommended method is the native installer: a self-contained binary that auto-updates and requires no Node.js. Open your terminal and run the command for your platform:

# macOS / Linux / 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

Then verify the installation:

claude --version
MethodCommandNode.js requiredAuto-update
Native installer (recommended)`curl -fsSL https://claude.ai/install.sh \bash (or irm https://claude.ai/install.ps1 \iex` on Windows)NoYes
Homebrew (macOS / Linux)brew install --cask claude-codeNoNo (run brew upgrade claude-code)
WinGet (Windows)winget install Anthropic.ClaudeCodeNoNo (run winget upgrade Anthropic.ClaudeCode)
Linux package managersapt, dnf, apk (Debian/Ubuntu, Fedora/RHEL, Alpine)NoVia the package manager
npm (alternative)npm install -g @anthropic-ai/claude-codeYes (Node.js 18+)No (run claude update or reinstall)

Homebrew and WinGet are first-class alternatives if you already manage software through them. On Linux you can also install through your distribution's package manager (apt for Debian/Ubuntu, dnf for Fedora/RHEL, apk for Alpine):

# macOS / Linux with Homebrew
brew install --cask claude-code

# Windows with WinGet
winget install Anthropic.ClaudeCode

If you prefer npm, it remains a secondary alternative and is the only method that requires Node.js 18+:

# Alternative: npm (requires Node.js 18+)
npm install -g @anthropic-ai/claude-code

# Update a native install
claude update

Installation is quick on a standard connection.

For a step-by-step guide with screenshots, check the installation and first launch tutorial which covers each step in detail.

Key takeaway: prefer the native installer (curl -fsSL https://claude.ai/install.sh | bash or irm https://claude.ai/install.ps1 | iex). It auto-updates and needs no Node.js. Homebrew, WinGet, and npm are alternatives.

How to authenticate and configure the OAuth flow?

On first launch, Claude Code triggers an OAuth authentication flow in your browser. Simply run claude in your terminal:

# First launch - opens the browser automatically
claude

# If the browser does not open, copy the displayed URL
# and paste it manually into your browser

Here is how the process works in practice:

  1. Run claude in your terminal
  2. The browser opens to the Anthropic login page
  3. Sign in with your Anthropic account (email or Google SSO)
  4. Authorize access for Claude Code
  5. The terminal confirms authentication with a success message
  6. Your token is stored locally in ~/.claude/
Auth CommandDescriptionUsage
claudeInteractive authenticationFirst launch
claude auth loginConnect or reconnect (or /login in session)Expired token
ANTHROPIC_API_KEY=sk-ant-... claudeUse an API keyCI/CD, scripts

Your credentials are stored locally after login. In practice, you generally won't need to re-authenticate unless you log out or switch accounts with /login.

For CI/CD environments, use an environment variable rather than the interactive flow:

export ANTHROPIC_API_KEY="sk-ant-..."
claude --print "your prompt"

The tips for your first conversations guide explains how to get the most out of your session once authenticated.

Key takeaway: the OAuth flow is automatic on first claude. Your credentials are stored locally so you rarely need to log in again, and the ANTHROPIC_API_KEY variable lets you bypass interactive authentication.

What are the essential commands for first launch?

Here are the most common commands to know from your very first launch. This table serves as your installation and first launch cheatsheet with essential commands.

CommandDescriptionExample
claudeLaunch Claude Code in interactive modeclaude
claude "prompt"Send a single promptclaude "explain this file"
claude --printNon-interactive mode (stdout output)claude --print "list the TODOs"
claude --modelChoose the modelclaude --model claude-sonnet-4-6
claude --verboseEnable detailed logsclaude --verbose
/configManage configuration in session/config (alias /settings)
claude updateUpdate a native installclaude update
claude mcpManage MCP serversclaude mcp list

Navigate to your project directory first, then launch Claude Code:

cd ~/my-project
claude
# Claude automatically analyzes the project structure

Claude Code does not index the entire codebase at startup. It reads files on demand based on your questions, so launch is fast regardless of project size.

The essential slash commands reference goes deeper into each command available in the interactive session. You can also check the slash commands cheatsheet for a quick overview.

Key takeaway: claude alone is enough to get started. Add --print for scripting and --verbose to diagnose a problem.

How to explore and understand your codebase with Claude Code?

Once in an interactive session, Claude Code automatically analyzes your codebase. Ask your questions in natural language to navigate the code.

ActionExample PromptResult
Overview"Describe the architecture of this project"Structure, frameworks, dependencies
Find a file"Where is the Header component defined?"File path and contents
Understand a function"Explain the processOrder function"Line-by-line explanation
Find a bug"Why is this test failing?"Analysis and fix suggestion
Analyze dependencies"List all npm dependencies"Parsed package.json
Summarize changes"What does the latest commit contain?"Commented diff

In practice, Claude Code reads files on demand. It does not index the entire codebase at startup: it explores contextually based on your questions.

Internal slash commands enhance exploration. Use /init to create a CLAUDE.md file that stores your project context:

# In the interactive Claude Code session
> /init
# Generates a CLAUDE.md with the detected architecture

The CLAUDE.md memory system lets you permanently customize Claude Code's behavior on your project. The more precise your CLAUDE.md, the more relevant the responses.

In practice, a well-maintained CLAUDE.md file significantly reduces token consumption per session.

Key takeaway: ask your questions in natural language, and use /init to create a CLAUDE.md file that remembers your project context between sessions.

Which keyboard shortcuts should you master for efficient navigation?

Keyboard shortcuts speed up your workflow in the interactive Claude Code session. Memorize these combinations to boost your productivity.

ShortcutActionContext
EnterSend messageSingle line
Shift + EnterNew line (native only in supported terminals; run /terminal-setup otherwise)Multi-line message
\ + Enter or Ctrl + JNew line (works in any terminal)Multi-line message
Ctrl + CCancel current generationDuring a response
Ctrl + DQuit Claude CodeEnd of session
Ctrl + LRedraw screen (refreshes the display without clearing the conversation)Recover a garbled display
TabPath autocompletionFile reference
Up / DownNavigate prompt historyReuse a prompt
Ctrl+RReverse search through historyWhile typing
Escape (2x)Clear input draft, or open the rewind menu (when prompt is empty)Anytime

You can also use slash commands directly in the session to control behavior:

Slash CommandActionDescription
/helpDisplay helpCommand list
/clearReset contextNew conversation
/compactCompress contextFree up tokens
/modelSwitch modelSwitch from Opus to Sonnet
/costView consumptionTokens and estimated cost
/permissionsManage permissionsFile read/write

In practice, the /compact command summarizes the conversation to free up context, with the actual reduction varying by session, so you can continue a long session without losing coherence.

The permissions and security cheatsheet details how to configure file permissions. Also check the essential slash commands tips for advanced usage.

Key takeaway: Ctrl + C to cancel, Ctrl + D to quit, /compact to free context. These three shortcuts cover the bulk of everyday navigation needs.

Should you configure advanced settings from the first launch?

Some settings are worth adjusting from the very first session to optimize your experience. Configure at minimum the default model and file permissions.

In an interactive session, use slash commands to adjust your settings:

# Change the model in session
claude> /model

# Open configuration (theme, etc.) in session
claude> /config
SettingDefault ValueRecommendationHow to change
ModelThe current default Sonnet modelSonnet for daily use, Opus for complex tasks/model in session
ThemeSystemPer preference/config in session
LanguageEnglishFrench if desiredInterface adapts to the prompt

The default model is plan-dependent: Sonnet 4.6 on Pro and Team Standard, Opus 4.8 on Max, Team Premium, Enterprise, and API. The Claude Sonnet 4.6 model offers an optimal performance/cost ratio for the vast majority of daily development tasks, while the Opus model excels at complex refactoring and architecture tasks.

If you want to go deeper into configuration, the commands reference for your first conversations covers the advanced options available in the interactive session.

Key takeaway: configure the default model and read permissions from the first session - you will save time on every subsequent interaction.

How to go further after installation?

Once Claude Code is installed and configured, you can leverage the full potential of the tool. Here are the recommended next steps to progress.

  1. Create your CLAUDE.md file with /init to anchor the project context
  2. Explore slash commands with /help to discover advanced features
  3. Test multi-file mode by requesting a refactoring across 2-3 files
  4. Configure MCP servers to connect external tools (databases, APIs)
  5. Automate with --print mode in your CI/CD scripts

In practice, developers trained at SFEIR Institute report significant gain from the first week of using Claude Code in their daily workflow.

To master Claude Code in real-world conditions, the Claude Code training from SFEIR Institute offers an intensive one-day session with hands-on labs covering installation, configuration, and advanced use cases. If you want to integrate Claude Code into a complete AI-assisted development workflow, the 2-day AI-Augmented Developer training covers all tools and methodologies.

Experienced developers can directly access the one-day AI-Augmented Developer - Advanced training to deepen prompt engineering techniques and multi-agent orchestration.

Key takeaway: installation is just the beginning. Invest 15 minutes in configuring CLAUDE.md and permissions to turn Claude Code into a true development copilot.

Recent articles about Claude

Claude Code Training

This topic is covered in Module 2 of our Claude Code training

Claude Code Installation and Configuration

1-day training • 60% hands-on labs • Expert instructors

View full program