Lesson 1.115 min · 5 cards · 8 exercises · 1 mission

Install and your first session

Pick where to run Claude Code, install the CLI, open a session in a project and approve your first change.

Monday morning, you inherit the team's todo-api repo: a small API for to-do items, a few dozen files and a README nobody has touched in months. Your lead writes: "Get comfortable with Claude Code this week, then help me fix the bug in the delete endpoint." This lesson takes you from a machine with nothing installed to a session where Claude Code understands the repo and you approve its first change. At the end you will repeat the same steps on a real project. The todo-api repo really exists on GitHub (github.com/app-works-247/todo-api), so you can follow along step by step.

Where Claude Code runs

Claude Code is a coding agent: it reads your source code, edits files and runs commands in your project, always within the limits you set. The same engine shows up in several places:

  • The CLI, the command-line version that runs in a terminal. It has the most features, and it is the only one you can use from scripts.
  • The Code tab in the Claude desktop app, for people who prefer a graphical interface: visual diffs and several sessions side by side. The app has Claude Code built in, so you don't need the CLI for it.
  • The VS Code extension (VS Code 1.94.0 or later). It carries its own copy of the CLI for the chat panel; to type claude in VS Code's terminal you still install the CLI.
  • The JetBrains plugin (IntelliJ, PyCharm, WebStorm and others). The plugin only connects your IDE to Claude Code: it runs claude in the IDE's terminal, so the CLI must be installed first.

You don't have to pick just one. Settings, project memory and MCP servers are shared between the places Claude Code runs on the same machine, so you can work in the terminal in the morning and in VS Code after lunch without losing anything. This course uses the CLI as its reference because every feature is there.

To use Claude Code you need a paid Claude plan (Pro, Max, Ultra, Team or Enterprise) or a Claude Console account.

Installing the CLI

First check your machine: macOS 13 or later, Windows 10 version 1809 or later, Ubuntu 20.04, Debian 10 or Alpine 3.19 or later; at least 4 GB of RAM and an internet connection.

On macOS, Linux and WSL, the recommended way is the native install:

curl -fsSL https://claude.ai/install.sh | bash

On Windows, open PowerShell and run:

irm https://claude.ai/install.ps1 | iex

The installer shows no progress while it downloads, so don't worry if the screen sits still for a while. When it finishes, open a new terminal window and check:

claude --version

A version number followed by (Claude Code) means you are done.

You can also install with Homebrew (brew install --cask claude-code) or WinGet. The difference worth remembering: the native install updates itself in the background, Homebrew and WinGet do not. With Homebrew you run brew upgrade claude-code yourself from time to time. If you are new to this, the native install is the easier choice.

On Windows, install Git for Windows too, so Claude Code can use Bash. Without it, Claude Code uses PowerShell as its shell.

Your first session

A Claude Code session always belongs to a folder. Go to your project folder and type claude. For your first week, add --permission-mode manual; the next section explains why.

cd ~/projects/todo-api
claude --permission-mode manual

The first time, Claude Code asks you to sign in and opens a browser to do it. You sign in once; later, type /login inside a session to switch accounts.

When the session opens, three details sit above the input box: the Claude Code version, the model in use and the working folder. Glance at the working folder every time. Opening a session in the wrong folder is the most common beginner mistake, and Claude works on whichever folder you started in.

Now ask something in plain words:

what does this project do?

You don't paste any code. Claude opens and reads the files it needs, then sums them up. You can keep going: which technologies the project uses, where the program starts, how the folders are organised. For todo-api, this is the quickest way to find the file with the delete endpoint before you touch the bug.

A good habit: compare the answer with what you already know. If Claude gets something wrong that you are sure about, ask a more precise question or point it at the right file.

Your first change

Try something small, for example:

add a short "How to run" section to the README

Claude finds the right file and drafts the change. Whether it asks before writing depends on the session's permission mode.

In recent versions of Claude Code (2.1.283 and later), a session started in a terminal begins in auto mode: Claude acts on its own with safety checks running in the background, and the first time you see a notice at the top of the session. Auto mode suits long tasks once you trust how Claude works. While you are learning, you want to see each change before it happens, which is why you started with --permission-mode manual. In Manual, Claude can read files freely but has to ask you before it edits one.

Then you see exactly which lines are added and which are removed. Read all of it before choosing Yes. If something is off, decline and say what you want instead; Claude will try again.

Press Shift+Tab at any time to switch between modes. Lesson 1.3 covers each mode and when to use it.

Commands worth remembering

There are two groups: commands you type in the terminal, before a session, and commands you type inside a session.

In the terminal:

  • claude: open an interactive session.
  • claude "fix the build error": open a session and send a first request right away.
  • claude -p "explain this function": ask one question, print the answer and exit. Handy when you only need a quick answer.
  • claude -c: continue the latest session in the current folder.
  • claude -r: pick an earlier session to reopen.

Inside a session:

  • /help: list the commands available. Typing / also shows commands and skills.
  • /clear: start a new conversation when you move on to something else. You can bring the old one back with /resume.
  • /exit, or Ctrl+D twice: quit.

Two small keys as well: Tab completes the command you are typing, and the ↑ key brings back what you typed before.

When something goes wrong

You type claude and the terminal says the command isn't found. Usually the install folder isn't on the PATH of the terminal window you had open. Open a new window and try again. If it still fails, the "Troubleshoot installation" page in the docs shows how to fix the PATH on each system.

On Windows you see "The token '&&' is not a valid statement separator". You are in PowerShell but pasted the command meant for CMD. The other way round, "'irm' is not recognized" means you are in CMD. Check the prompt: PS at the start means PowerShell.

Claude answers about a different project. Check the working folder shown above the input box. Quit, cd into the right folder and start again.

The next lesson is about handing work to Claude: which context to give, and how to write "done when…" criteria so you get back exactly what you need.

Practice lesson 1.1

5 flashcards, 8 exercises checked right on the page, 1 mission on your machine.

Start practice

Related reference

Type to search the reference, templates and lessons.