Getting Hands OnLesson 4 of 18

Claude Code Setup

Installing Claude Code

Claude Code installs as a global npm package, giving you the 'claude' command in your terminal. It works on macOS, Linux, and Windows (via WSL), and requires Node.js 18 or later.

bashInstallation and first run
# Install Claude Code globally
npm install -g @anthropic-ai/claude-code

# Verify installation
claude --version

# Start Claude Code in your project
cd your-project/
claude
ℹ️

First Run

On first launch, Claude Code will prompt you to authenticate with your Anthropic API key. Once authenticated, it remembers your credentials and you can start using it immediately.

Understanding the Interface

Claude Code runs in your terminal as an interactive REPL. You type natural language requests, and Claude responds with actions and explanations. Every tool call Claude makes is visible to you, and you approve or deny each action.

ActionWhat HappensYour Control
Read a fileClaude requests to read a file pathAuto-approved (safe, read-only)
Edit a fileClaude shows the diff before applyingYou approve or deny the edit
Run a commandClaude shows the command firstYou approve or deny execution
Write new fileClaude shows the full contentYou approve or deny creation

You control what Claude is allowed to do

Permission Modes

You can configure Claude Code to auto-approve certain tools (like file reads and searches) while requiring manual approval for writes and commands. This balances speed with safety.

Key Takeaways

  • Install with npm install -g @anthropic-ai/claude-code, requires Node.js 18+
  • First run requires Anthropic API key authentication, credentials persist after setup
  • Claude Code runs as an interactive terminal REPL with natural language input
  • Every tool action is visible -- you approve or deny edits, commands, and file writes
  • Permission modes let you auto-approve safe operations while gating destructive ones

Check Your Understanding

Test what you learned in this lesson.

Q1.Which command installs Claude Code on your system?

Q2.When Claude Code wants to edit a file in your project, what happens by default?

Q3.What is the minimum Node.js version required for Claude Code?