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.
# Install Claude Code globally
npm install -g @anthropic-ai/claude-code
# Verify installation
claude --version
# Start Claude Code in your project
cd your-project/
claudeFirst 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.
| Action | What Happens | Your Control |
|---|---|---|
| Read a file | Claude requests to read a file path | Auto-approved (safe, read-only) |
| Edit a file | Claude shows the diff before applying | You approve or deny the edit |
| Run a command | Claude shows the command first | You approve or deny execution |
| Write new file | Claude shows the full content | You 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?