Claude Code requires Node.js 18 or later. Run
node --version to check. See Installation for full platform-specific requirements.Step 1: Install Claude Code
- npm
- npx (no install)
Step 2: Authenticate
Runclaude for the first time in any directory. Claude Code will prompt you to authenticate.
- Claude.ai (Pro / Team)
- Anthropic API key
Claude Code will open a browser window to sign in with your Claude.ai account. Complete the OAuth flow and return to the terminal. Your token is stored in the system keychain and refreshed automatically.
Step 3: Open a project
Navigate to any code project and launch Claude Code:CLAUDE.md file exists at the project root, Claude reads it as background context before your first message.
Step 4: Ask Claude to do something
Type a task in plain English and press Enter. Claude will plan the work, show you what it intends to do, and execute it step by step. Here are a few tasks to try:Step 5: Review and continue
After Claude completes a task, you can:- Ask follow-up questions — Claude retains full context from the current session.
- Request changes — Tell Claude what to adjust and it will iterate.
- Run
/status— Check context window usage and which model is active. - Run
/cost— See token usage and estimated cost for the session.
Common workflows
Continue the most recent session
If you close the terminal and come back later, resume the last session in your project:Run a one-shot task without the REPL
Use--print (or -p) to run Claude non-interactively and get output on stdout:
--print mode — only use it in trusted directories.
Initialize project memory
Ask Claude to generate aCLAUDE.md file that captures important context about your project:
CLAUDE.md to the root. On future sessions it reads this file automatically.
Switch models
claude-sonnet-4-6) or an alias (sonnet, opus).
Key keyboard shortcuts
| Shortcut | Action |
|---|---|
Enter | Send message |
Shift+Enter | Insert a newline without sending |
Ctrl+C | Interrupt the current operation |
Ctrl+L | Clear the terminal |
Up / Down | Navigate message history |
Ctrl+R | Search message history |
Esc | Cancel the current input |
What’s next
Installation
Full install guide for macOS, Linux, and Windows, including Node version managers and enterprise auth options.
Introduction
Conceptual overview of how Claude Code works — tools, sessions, permissions, and auth.
Sessions
Learn how to resume, compact, and manage conversation sessions.
Configuration
Customize Claude Code behavior with settings files and environment variables.