Getting Started with Claude Code
By the end of this lesson you will have Claude Code installed, running, and will have built your first project with it.
LEARNING OBJECTIVES
- 1. Understand what Claude Code is and how it differs from chatbots
- 2. Install Claude Code and launch your first session
- 3. Use essential slash commands (/help, /model, /clear, /compact)
- 4. Build a working project using only natural language
What is Claude Code?
Claude Code is an AI coding agent that lives in your terminal. Unlike chatbots that generate text you copy-paste, Claude Code reads your files, edits your code, runs your tests, and executes shell commands directly in your project. It is a teammate, not a clipboard.
It sees your entire codebase, understands context across files, and makes changes surgically. You describe what you want in plain English and it does the work.
| Feature | AI Chatbot | Claude Code |
|---|---|---|
| Code delivery | Copy-paste from chat | Writes directly to files |
| File access | None | Full project read/write |
| Run commands | No | Yes — tests, builds, git |
| Context | Single conversation | Entire codebase |
| Workflow | You do the work | Agent does the work |
Installing Claude Code
Pick the method that matches your system:
- macOS (Homebrew):
brew install claude-code - npm (any platform):
npm install -g @anthropic-ai/claude-code - Quick run (no install):
npx @anthropic-ai/claude-code
After installing, run claude in any project directory to start a session.
Try This: Install and Launch Claude Code
You should see the Claude Code CLI interface with a prompt ready for your input.
Your First Session
Open your terminal, navigate to a project folder, and type claude. You will see an interactive CLI where you type natural language instructions. Try these essential slash commands:
/helpSee all commands
/modelSwitch Haiku/Sonnet/Opus
/clearReset conversation
/compactCompress context
Build Something Immediately
Do not just read about it. The best way to learn is by doing. Copy the prompt below and paste it directly into Claude Code.
Try This: Build a Todo App
Claude creates a working todo.html file you can open in your browser with full add/complete/delete functionality.
Key Concepts
Context Window
How much code Claude can "see" at once. Larger projects need smart file selection. When the window fills up, use /compact to compress.
Tools
Claude Code uses 5 core tools: Read (view files), Write (create files), Edit (modify files), Bash (run commands), Grep (search code).
Permissions
You approve or deny each tool use. Trust builds over time. You can configure auto-approval for safe tools in settings.
Models
Haiku = fast and cheap. Sonnet = balanced. Opus = deep reasoning. Start with Sonnet, switch to Opus for architecture decisions.
Knowledge Check
1 of 3What makes Claude Code different from a regular AI chatbot?
Key Takeaways
- ✓Claude Code is an agent, not a chatbot — it reads, writes, and executes directly in your project
- ✓Install with npm, Homebrew, or npx — then type "claude" to start
- ✓Four essential commands: /help, /model, /clear, /compact
- ✓Three model tiers: Haiku (fast), Sonnet (balanced), Opus (deep)
- ✓The fastest way to learn is to build something immediately