Claude Code Quick Start Guide: Install, Authenticate, Run
Get Claude Code running in under 5 minutes. Covers installation on every platform, authentication options, your first commands, and essential shortcuts.
Key Takeaways#
- Install in one command — the native installer works on macOS, Linux, and WSL without Node.js.
- Three auth paths — use a Claude subscription, an API key, or an enterprise provider (Bedrock/Vertex).
- Start coding immediately —
cdinto any project and runclaudeto begin. - Slash commands save time —
/cost,/compact, and/clearare your daily drivers. - npm install is deprecated — since v2.1.15, use the native installer or a package manager instead.
System Requirements#
| Requirement | Minimum |
|---|---|
| macOS | 13+ (Ventura) |
| Linux | Ubuntu 20.04+ / Debian 10+ |
| Windows | 10+ (native or WSL2) |
| RAM | 4 GB |
| Shell | Bash, Zsh, or Fish |
| Network | Outbound HTTPS to api.anthropic.com |
Installation#
Native Installer (Recommended)#
The native installer auto-updates and does not require Node.js.
macOS / Linux / WSL:
curl -fsSL https://claude.ai/install.sh | bash
Windows PowerShell:
irm https://claude.ai/install.ps1 | iex
Windows CMD (alternative):
curl -fsSL https://claude.ai/install.ps1 | powershell -Command -
Homebrew (macOS / Linux)#
# Stable release brew install --cask claude-code # Rolling / latest brew install --cask claude-code@latest
WinGet (Windows)#
winget install Anthropic.ClaudeCode
Note:
npm install -g @anthropic-ai/claude-codeis deprecated since v2.1.15. If you previously installed via npm, uninstall it and switch to one of the methods above.
Authentication#
Claude Code supports three authentication paths. Pick the one that matches your account.
1. Claude Subscription (Pro / Max / Team)#
The default flow. It opens a browser for OAuth login.
claude auth login
2. API Key#
For pay-as-you-go usage with an Anthropic API key.
claude auth login --console
This prompts for your key in the terminal instead of opening a browser. You can also set the ANTHROPIC_API_KEY environment variable directly.
3. Enterprise — Amazon Bedrock / Google Vertex#
Set the appropriate environment variables for your cloud provider, then authenticate:
# Bedrock export CLAUDE_CODE_USE_BEDROCK=1 claude auth login # Vertex export CLAUDE_CODE_USE_VERTEX=1 claude auth login
Verify Your Auth#
claude auth status
This prints your active account type and whether your session is valid.
Your First Session#
- Navigate to a codebase:
cd ~/projects/my-app
- Launch Claude Code:
claude
- Try one of these prompts to get started:
Explain the architecture of this projectFind and fix the bug in src/auth/login.tsAdd unit tests for the calculate_total functionRefactor the API handlers to use async/await
- Use slash commands while you work:
| Command | What It Does |
|---|---|
/cost | Show token usage and spend for the session |
/compact | Compress conversation context to free up space |
/clear | Wipe the conversation and start fresh |
/help | List all available slash commands |
/model | Switch the underlying model |
/config | View or change project-level settings |
Essential Shortcuts#
| Shortcut | Action |
|---|---|
Escape | Interrupt current generation |
@file | Attach a file to your prompt (e.g., @src/main.py) |
Tab | Accept autocomplete suggestion |
Up/Down | Scroll through prompt history |
Ctrl+C | Cancel current input or running task |
Ctrl+L | Clear the terminal screen |
Next Steps#
- Project configuration — Learn how
CLAUDE.mdfiles set project-level instructions: see the CLAUDE.md guide. - Full CLI reference — Flags, subcommands, and advanced usage: see the CLI reference.
- MCP integration — Connect external tools and data sources to Claude Code.
- Hooks and automation — Run Claude Code headlessly in CI/CD pipelines.