Dashboard/Phase 1: Foundations
📖 Concept7 min10 XP

Lesson 2: Installation & Your First Conversation

Day 2 of 50 · ~7 min read · Phase 1: Foundations


The Opening Question

You've understood the why — Claude Code is an agent that can act on your code. But understanding and doing are different things.

So here's the real question: what happens the moment you type claude in your terminal for the first time?

What does Claude see? What can it do? What stops it from doing too much? And how does it even know who you are?


Discovery

Let's walk through this step by step.

Question 1: How does Claude Code know you're allowed to use it?

Before Claude Code can do anything in your terminal, it needs to authenticate. You can't just run claude and have it work on someone else's codebase.

Think about this: What are the two main ways you could prove to Claude that you have permission to ask it to code?

Pause and think. You've used online tools before. How did they know it was really you?

Here are the two paths:

Option A: Claude.ai Pro or Max account. If you have a paid Claude subscription, Claude Code can use your existing authentication. You probably already logged in on Claude.ai — Claude Code trusts that.

Option B: API key. If you don't have a paid account, you can generate an API key from Anthropic's console. It's just a long string that proves "this person is allowed to run Claude Code." You paste it in once, and Claude Code remembers it.

Which one is easier for you right now? That determines which installation path you'll follow.

Question 2: Once you're authenticated, what's the first thing Claude does?

Let's say you've installed Claude Code. You open your terminal, navigate to a project folder, and type claude.

What should Claude do first?

Think about the agentic loop from Lesson 1: read → reason → act → check. Before Claude can reason about your codebase, it needs to see it. But your codebase could be thousands of files. Should Claude read all of them?

Pause and think: If you were Claude, and you just got access to a new project, what would you need to know first?

Claude starts by asking you what you want to do. That's the conversation. You might type: "Add error handling to the database connection" or "Write a test for the login flow" or "Why is this CSS not working?"

Then Claude reads the files relevant to your request, reasons about the context, and decides what to do.

The key insight: Claude doesn't pre-load your entire codebase. It reads deliberately, based on what you ask for. That keeps the first loop fast.

Question 3: What does the first conversation look like?

Let's imagine you've installed Claude Code, you're in your project directory, and you type:

claude "Add a .gitignore file with node_modules and .env"

Or you can just type claude and have a multi-turn conversation (the more powerful approach).

What's the difference between these two ways?

The first is a one-shot command — Claude reads your project, thinks, acts, and exits. The second is a conversation where you can guide Claude, ask follow-up questions, see what it's doing, and correct course if needed.

The conversation approach is almost always better, because:

  • You can see the agentic loop in real-time
  • You can intervene if Claude misunderstands
  • Claude can ask you clarifying questions
  • You build confidence in what it's doing

When you're in a conversation, Claude shows you everything: what it's reading, what it's thinking, what it's about to do, and then what it did.

Question 4: What permission prompts will you see?

Remember from Lesson 1: Claude Code is an agent that acts only when you say so. That means permission prompts.

What kinds of things should require your approval before Claude does them?

Pause and think. You don't want Claude accidentally deleting files or exposing secrets. What's worth asking about?

Here are the categories:

  1. Reading files — Claude will tell you which files it's opening. You can see this in the conversation.
  2. Running shell commands — Claude will ask before running npm install or docker build or anything dangerous.
  3. Making edits — Claude will ask before modifying your code.
  4. Shipping changes — Pushing to git, creating pull requests, or other irreversible actions.

Most of these prompts are quick ("Does this look right?" / "Yes") but they keep you in control.


The Insight

Here's what actually happens when you type claude for the first time:

Claude Code authenticates using your existing Claude.ai Pro/Max account or an API key, opens a conversation with you in your terminal, reads the files relevant to your question (not your entire codebase), reasons about what to do, asks for permission before taking actions, executes those actions, and shows you the results in real-time.

The mental model: Claude Code isn't a black box that churns in the background. It's a conversation partner who works out loud. Every file it reads, every decision it makes, every action it takes — you see it and can interrupt.


Try It

By the end of this lesson, you'll have Claude Code installed and ready to talk to.

  1. Install Claude Code using one of these methods:
    • Easiest (Mac/Linux): Run curl -sL https://install.claude.codes/install.sh | bash
    • npm: npm install -g @anthropic-ai/claude-code
    • Homebrew (Mac): brew install claude-code
  2. Authenticate by running claude and following the prompts. You'll either log in to your Claude.ai Pro/Max account or paste an API key.
  3. Test it by navigating to a small project folder and typing claude "List the main files in this project and what they do." — let Claude read a few files and describe them back to you.

That's it. You've now experienced the read → reason → act loop once.


Key Concepts Introduced

ConceptDefinition
AuthenticationHow Claude Code verifies you're allowed to use it (Claude.ai Pro/Max account or API key)
Conversation modeMulti-turn interaction where you guide Claude and see the agentic loop in real-time
Permission promptClaude asking for your approval before taking an action (reading files, editing code, running commands)
One-shot commandRunning claude "task" as a single command, vs. entering interactive conversation mode

Bridge to Lesson 3

You've now seen Claude Code in action once. It read some files, reasoned about them, and told you what it found.

But that was a simple task. What happens when the task is more complex?

Tomorrow's question: How does Claude Code decide what to do next when there are multiple steps?

We'll dive deep into the agentic loop — the cycle that makes Claude Code autonomous. You'll learn to recognize it, anticipate it, and guide it.


← Back to Curriculum · Lesson 3 →