Lesson 2Basics
Installation & Setup
Getting started
Requirements
- Node.js 18+— To run the CLI
- Git— For repository operations
- Anthropic account— For authentication
Installation
Universal method for all OS:
$ npm install -g @anthropic-ai/claude-code
Or using npx (without installation):
$ npx @anthropic-ai/claude-code
Authentication
On first launch, Claude Code will open a browser for Anthropic account login:
$ claude
Opening browser for authentication...
✓ Successfully authenticated!
Method 1: OAuth (recommended)
Automatic login via browser. Token is saved locally.
Method 2: API Key
export ANTHROPIC_API_KEY=sk-ant-...
First Run
After installation, navigate to your project folder and run Claude:
# Navigate to your project
$ cd my-project
$ claude
╭───────────────────────╮
│ Claude Code v1.x.x │
│ Ready to help! │
╰───────────────────────╯
>
IDE Integration
VS Code
- 1Open terminal in VS Code
- 2Run claude
- 3Use @ mentions for files
JetBrains
- 1Open built-in terminal
- 2Run claude
- 3Integrates with project automatically
Neovim
- 1Use :terminal
- 2Run claude
- 3Supports vim-mode navigation
Basic Configuration
Settings are stored in ~/.claude/settings.json:
{
"model": "claude-sonnet-4-20250514",
"theme": "dark",
"permissions": {
"allow_bash": true,
"allow_write": true
}
}Common Issues
"command not found: claude"
Check that npm global path is in PATH
Authentication error
Run claude --logout and authenticate again
Slow startup
First run caches dependencies, subsequent runs will be faster
Lesson Quiz
1.What is the recommended way to install Claude Code?
This lesson is part of a structured LLM course.
My Learning Path