01 · Installation
Two ways in. Pick the desktop app if you want to see what is happening; pick the terminal if you already live there. If you work in VS Code, the extension belongs to the desktop track and this module covers it. Either way you end with a working install pointed at a folder you are allowed to break.
Before you start
- You will be able to
- Install the Claude desktop app or the VS Code extension, sign in, get onto the Claude Code side, open your practice folder, and confirm the whole chain works.
- You need
- macOS or Windows, and permission to install an application — or VS Code 1.94 or later, if you would rather use the extension
- A Claude account with Claude Code included — see What kind of account below
- The
claude-coursefolder from module 0 - Git 2.28 or later. Two later modules also want Node and SQLite — the preflight below tells you what you have
- Starting state
- Nothing installed. If a previous attempt left a half-working install, the troubleshooting table at the end of this module clears it before you start again.
What kind of account
Claude Code needs an account that includes it. There is more than one route, and it is worth knowing which one you are on:
- A paid Claude plan — Pro, Max, Team or Enterprise. This is the route the course assumes, because it is the simplest.
- Console or API access, billed as credits rather than a subscription.
- A supported enterprise provider, if your employer routes Claude through one.
The free chat tier does not include Claude Code. Check this before you install rather than halfway through. The current list is on the setup page.
Worth repeating from module 0: this course is free, using Claude Code is not.
Download the app
Go to claude.com/download and take the build for your platform. You do not need administrator rights for a normal install on either platform.
On a Mac
- Open the downloaded
.dmg. - Drag the Claude icon into your Applications folder.
- That is the whole installation.
On Windows
- Run the downloaded
.exe. - Step through the installer.
- Claude ends up in your Start menu on its own.
If you already work in VS Code
There is a third way in, and for a lot of people it is the right one: the Claude Code extension, which puts the same thing inside the editor you already have open. It installs in VS Code and in VS Code forks such as Cursor. Everything else in this track applies to it — the panel, the diffs, the permission mode, the slash commands are all the same — so read the desktop track and use the extension. Nothing later in the course depends on which of the two you picked.
- You need VS Code 1.94 or later, and the same kind of Claude account described above.
- Press
Cmd+Shift+Xon a Mac orCtrl+Shift+Xon Windows and Linux to open the Extensions view, search for Claude Code, and install the one published by Anthropic — the identifier isanthropic.claude-code. It is also on the Visual Studio Marketplace, and on Open VSX for editors that do not use Microsoft's marketplace. - Open it from the Claude icon in the editor toolbar or the activity bar, or from the Command Palette —
Cmd+Shift+P/Ctrl+Shift+P, then type Claude Code. If the extension does not appear at all after installing, run Developer: Reload Window from the same palette. - Sign in on first open, exactly as described below. Then open your
claude-coursefolder as the VS Code workspace — in the extension, the folder you have open is the working directory, so there is no separate folder control to find.
The extension carries its own copy of Claude Code for the panel. That does not give you a claude command in VS Code's integrated terminal — for that you need the standalone install from the terminal track below. The two happily coexist.
Your starting permission mode may not be the same as in the standalone app; on Pro, Max and Team plans the extension typically starts in Auto. The instruction is the same either way: find the mode control at the bottom of the prompt box, read what it says, and set it yourself.
The current install steps and the full list of what the extension adds are in the VS Code documentation.
Preflight: what else the course expects
You will not type shell commands on this track, so ask instead. Do it in your first session, once the folder is open:
Check whether git, node, npx, sqlite3 and jq are installed on this machine, and print each version. Just report — do not install anything.
| Tool | Needed for | If it is missing |
|---|---|---|
git, version 2.28 or later | Everything from module 2 onwards | Get it. The course is built on it. Older than 2.28 has no git init -b main; module 2 gives you the two-command replacement. |
jq | Module 10, throughout. Hooks receive JSON on standard input and jq is how the scripts read it | Install it before module 10, not during: brew install jq, apt install jq, or jqlang.github.io. There is no workaround in that module; every hook example uses it. |
node and npx | The formatter hook in module 10, and every MCP example in module 14 | Install Node when you reach either. Both modules make sense read without it; neither exercise runs without it. |
sqlite3 | The practice database in module 14 — the one exercise there that needs no account anywhere | Already on macOS. On Windows and Linux install it then, or skip that exercise and read the rest. |
| A browser | Looking at what you built, in every module | You have one. |
Only git is a blocker for the course as a whole. The rest are needed by one or two modules each, and each of those modules repeats the requirement in its You need box — this list exists so you find out now rather than forty minutes into module 10 with a hook that silently does nothing.
If a row is missing and you would rather not install it today, that module is still worth reading: the reasoning in it is the part that transfers, and the commands will still be there next month.
Two later modules put you in a terminal even on this track: module 9 has you run a git command before embedding it in a skill, and module 10 needs a shell to make a hook script executable. Both give you the exact commands. Knowing now that you have git is most of what those need.
Signing in
Open the app. You get a welcome screen with a sign-in choice: email, or Google. If you already have a Claude account, use that one, since your plan is attached to it.
What happens next is a normal browser round trip. Your browser opens, you sign in, you grant the desktop app access, and the browser tells you that you can go back to the app. It is a one-time step. Next launch, you are already in.
After signing in you land in Claude Chat, the ordinary assistant. That is not Claude Code. Use the switcher at the top of the window to move over to Claude Code. Do it once and the app remembers where you were.
What you should be looking at
Once you are on the Code side, the window has three parts you will use constantly: a list of sessions, the conversation where you type, and a control showing the current permission mode. Layouts change between releases, so treat these sketches as things to find rather than positions to memorise — the labels are what stay put, not the coordinates.
Opening your project folder
Claude Code works with one folder open — its working directory. That is where it reads and writes by default, and it is the folder shown in the session.
- Use the folder control at the top of the window, or press
Cmd+Oon a Mac,Ctrl+Oon Windows. - Choose the claude-course folder you made in module 0.
- Open it.
From here on you never have to open individual files yourself. Claude opens what it needs when it needs it.
Opening a folder is not a sandbox. It sets the default place Claude works and the default scope of your permission rules. It does not, by itself, make anything outside that folder unreachable: Claude Code supports adding further directories, shell commands can name any path your user account can reach, and the operating system's own permissions are a separate layer again. There is a real sandboxing feature, and it is documented separately; it is not what choosing a folder does.
So the protection you actually have in this module is: a sensible default location, permission prompts you read, and a practice folder whose contents you would not mind losing. That is enough for a course. It is not enough to justify pointing your first sessions at your home directory or a client project.
When macOS or Windows asks something broad — Claude wants access to your Documents folder — that is the operating system's grant, and it really is that broad. It is not a restatement of the folder you picked.
Set the permission mode deliberately
Before your first request, find the permission-mode control and look at what it says. Which mode a new session starts in depends on your plan and your settings, so the honest instruction is not "it will say Manual" — it is "check, and set it yourself".
For this module and the next, put it on the mode that asks before acting (it is usually labelled Manual or Ask). You want the prompts while you are learning what they mean. Module 7 covers all the modes properly and the current list is in the permission modes documentation.
What an approval looks like
You will meet this in module 2, but it is worth recognising before you meet it. When Claude wants to change a file, it shows the change and stops:
Confirm the whole chain
Which folder are you working in? List what is in it.
You should get the path to claude-course and a listing containing hello.html from module 0. That single answer confirms the install, the sign-in, the folder and the read permission all at once.
If the folder is right but the listing is empty, you have opened a different claude-course — check the full path in the answer against where you actually saved the file.
Troubleshooting
These are the ones that actually happen on a first install. If a previous attempt left something half-working, start at the last row.
| Symptom | Cause | What to do |
|---|---|---|
| Sign-in completes in the browser but the app stays on the sign-in screen | The browser could not hand control back | Close the app completely and reopen it — the credential is usually already stored. If it is not, sign in again and leave the browser tab open until the app says it is done. |
| You type and nothing happens to your files | You are on the Chat side, not the Code side | Use the switcher at the top of the window (marked 1 in the sketch above), then re-open your folder. |
The folder control does not offer claude-course | It is somewhere other than where you think | Find it in Finder or File Explorer first and note the full path. On a Mac, Cmd+Ctrl+C with the folder selected copies its path. |
| macOS refuses to open the app: Claude cannot be opened | It is still in the disk image, or quarantined | Drag it into Applications first and open it from there. Do not run it from the mounted .dmg. |
| macOS keeps asking for your login password, or sign-in does not persist between launches | The Keychain entry cannot be written or read | Answer Always Allow if prompted. If it repeats every launch, open Keychain Access, search for Claude, delete the entry, and sign in once more. |
| The app opens into a project you do not recognise | It reopened the last folder you used | That is the intended behaviour. Open claude-course again; it will remember that one next time. |
| A previous install is in the way, or things behave oddly for no clear reason | A half-finished install, a stale settings file, or two installs at once | Start a session and run /doctor. It checks the installation, finds duplicate or leftover installs and settings files it cannot parse, reports what it found, and asks before changing anything. |
In VS Code, the same list applies with one addition: if the panel is missing after installing the extension, run Developer: Reload Window from the Command Palette before trying anything else.
Where you are now
Installed, signed in, on the Code side, with the practice folder open and a permission mode you chose on purpose. In module 2 you start giving Claude work, and you commit the result.
You have finished when
- The app opens on the Claude Code side, not the chat side
- The folder name shown in the session is
claude-course - Asking which folder am I working in? returns that folder's path
- You can name which permission mode the session is in
If it goes wrong
| What you see | What to do |
|---|---|
| Sign-in is refused | Check the plan on the account you used. If your organisation manages Claude, you may need it enabled for you rather than upgraded. |
| The VS Code panel never appears after installing the extension | Run Developer: Reload Window from the Command Palette. If it is still missing, confirm you installed the one published by Anthropic, anthropic.claude-code. |
| You are typing into Claude Chat and nothing happens to your files | You are on the wrong surface. Use the switcher at the top of the window to move to Claude Code, then re-open your folder. |
| The app cannot open the folder | Confirm the folder exists and that you can open it in Finder or File Explorer. macOS may also need you to grant the app access to Documents the first time; that grant is an operating-system permission and is broader than the folder you picked. |
On your own
Close the app entirely, re-open it, and get back to a session in claude-course without following the steps above. If you cannot, the thing you had to look up is the thing to write down — that is what module 5's project memory file is for.
Before you start
- You will be able to
- Install the Claude Code CLI, verify it with two commands, sign in, and start and leave your first session.
- You need
- macOS, Linux, or Windows with Git Bash or WSL (this track uses Bash, not PowerShell)
- A Claude account with Claude Code included — see What kind of account below
- The
claude-coursefolder from module 0 - Git 2.28 or later. Two later modules also want Node and SQLite — the preflight below tells you what you have
- Starting state
- Nothing installed. If a previous attempt left a half-working install, the troubleshooting table at the end of this module clears it before you start again.
What kind of account
Claude Code needs an account that includes it, and there is more than one route:
- A paid Claude plan — Pro, Max, Team or Enterprise. This is the route the course assumes.
- Console or API access, billed as credits.
- A supported enterprise provider, if your employer routes Claude through one.
The free chat tier does not include Claude Code. The current list is on the setup page. This course is free; using Claude Code is not.
Which shell you are typing in
This track uses Bash. Every command below, and in every later terminal module, is written for Bash or zsh.
- macOS — the built-in Terminal runs zsh. Nothing to do.
- Linux — your terminal runs Bash or zsh. Nothing to do.
- Windows — install Git for Windows and use Git Bash, or use WSL. Native PowerShell is a different language:
grep,head,wc, single-quoted arguments and shell scripts with a#!line do not work there unchanged, and even&&behaves differently across PowerShell versions. Claude Code itself runs fine on Windows; it is the surrounding commands in this course that assume Bash. The supported arrangements are listed under set up on Windows.
There is the shell you type in, and the shell Claude uses when it runs a command for you. They are usually the same on macOS and Linux and are often not the same on Windows. When something works for Claude but not for you, or the reverse, this is the first thing to check.
The terminal, in four commands
If you have barely used a terminal, this is genuinely all you need for the course.
$ pwd # which folder am I in? $ ls # what is in it? $ cd some-folder # go somewhere else $ mkdir new-one # make a folder
Install on macOS, Linux, WSL or Git Bash
$ curl -fsSL https://claude.ai/install.sh | bash
The script picks the right build for your system, installs it under ~/.local/bin, and adds that directory to your PATH by editing your shell profile. It installs into your home directory, so a normal install needs no administrator password — if something asks for one, stop and find out why. Under a minute, normally.
Install on Windows without WSL
If you are using Git Bash rather than WSL, the PowerShell installer is the one that places the binary. Run it in an ordinary PowerShell window — administrator is not required:
> irm https://claude.ai/install.ps1 | iex
irm fetches the install script and iex runs it. Windows may ask whether you really want to execute a script from the internet; that prompt is expected. Then close PowerShell, open Git Bash, and do everything else in this course there.
Check it twice
$ claude --version $ claude doctor
The first prints a version number. The second checks the installation itself — where the binary came from, whether more than one install is fighting, and how your settings resolve. Run it now while everything is fresh, so that when you run it after a problem you know what a healthy report looks like.
Command not found almost always means the shell has not picked up the new PATH. Open a new terminal before assuming the install failed.
You will meet the word twice in this course, and the difference is where you type it.
claude doctor— typed at your shell prompt, with no session running. It prints installation diagnostics and stops. Read-only: it tells you things, it does not change them. This is the one to reach for whenclaudeitself is misbehaving./doctor— typed inside a session. It is a much larger checkup: it covers the same installation health, and also looks at your settings files, skills, MCP servers, plugins and hooks, and can fix what it finds. It reports first and asks before changing anything.
Same subject, different scope, and only the second one can act. When this course says to run one of them, it means that one.
Preflight: what else the course expects
Run this now. It takes ten seconds and it tells you which later modules you can run rather than only read. A command not found here is information, not a failure:
$ git --version $ node --version $ npx --version $ sqlite3 --version $ jq --version
| Tool | Needed for | If it is missing |
|---|---|---|
git, version 2.28 or later | Everything from module 2 onwards | Get it. The course is built on it. Older than 2.28 has no git init -b main; module 2 gives you the two-command replacement. |
jq | Module 10, throughout. Hooks receive JSON on standard input and jq is how the scripts read it | Install it before module 10, not during: brew install jq, apt install jq, or jqlang.github.io. There is no workaround in that module; every hook example uses it. |
node and npx | The formatter hook in module 10, and every MCP example in module 14 | Install Node when you reach either. Both modules make sense read without it; neither exercise runs without it. |
sqlite3 | The practice database in module 14 — the one exercise there that needs no account anywhere | Already on macOS. On Windows and Linux install it then, or skip that exercise and read the rest. |
| A browser | Looking at what you built, in every module | You have one. |
Only git is a blocker for the course as a whole. The rest are needed by one or two modules each, and each of those modules repeats the requirement in its You need box — this list exists so you find out now rather than forty minutes into module 10 with a hook that silently does nothing.
If a row is missing and you would rather not install it today, that module is still worth reading: the reasoning in it is the part that transfers, and the commands will still be there next month.
Sign in
$ claude auth login
Your browser opens, you sign in, you approve access for the CLI, and the terminal confirms it. The credentials are stored locally, so this is a one-time step. claude auth logout is the reverse. Starting claude without signing in first will also walk you through it. The full command list is in the CLI reference.
Sessions: the thing to get right on day one
This is the single most misunderstood part of the CLI, so read it before you type anything else.
| You run | What actually happens |
|---|---|
claude | An interactive session opens. You type messages at its > prompt until you leave. |
claude "some question" | The same interactive session, with that text sent as the first message. It does not answer and exit. |
claude -p "some question" | One answer, printed to standard output, then it exits. This is the one to use in pipes and redirects. |
claude -c | Continue the most recent session in this directory. |
claude --resume | Pick an earlier session from a list and continue it. |
So a session is a place you are in, not a command you run repeatedly. Two consecutive claude "…" invocations do not share a conversation; two messages inside one session do.
Your first session
$ cd ~/Documents/claude-course $ claude
The prompt changes. From here you are talking to Claude, not to your shell — the blocks below use > for that.
> Which directory are you working in? List what is in it. > What is in hello.html?
The second question works because both messages are in the same session. Now leave:
> /exit
You are back at your shell prompt, where git, ls and everything else lives. Getting comfortable moving between those two prompts is most of what makes this track feel natural. To come straight back to the conversation you just left:
$ claude -c
One-shot mode, for pipes
When you want an answer in a file or on the end of a pipe, use -p. Without it you are opening an interactive session with a pipe attached, which is not what you meant:
$ claude -p "Explain what hello.html does" > notes.md
One thing to know about -p: there is nobody there to answer a permission prompt. If the task needs an approval you have not pre-authorised, it does not stop and ask y/n — it fails or refuses. Module 7 is about deciding those things in advance, which is what makes non-interactive runs usable.
The working directory is whatever you were in
Claude Code takes the directory you started it from as its project. That is convenient and it is also how people end up running a session somewhere they did not intend.
$ pwd $ claude
Make pwd a reflex before starting a session, in the same way you check the address on an envelope.
Troubleshooting
These are the ones that actually happen. claude doctor diagnoses most of them for you; the table is here so you can recognise what it is telling you.
| Symptom | Cause | What to do |
|---|---|---|
claude: command not found | Your running shell has not read the profile the installer edited | Open a new terminal window and try again. This fixes it far more often than anything else. |
| Still not found in a new terminal | ~/.local/bin is not on your PATH | Check with echo $PATH. If it is missing, add export PATH="$HOME/.local/bin:$PATH" to ~/.zshrc (macOS) or ~/.bashrc (Linux, Git Bash), then open a new terminal. |
| A version number prints, but it is not the one you just installed | An older install is shadowing the new one — usually an npm global install | which -a claude lists every one on your PATH, in the order the shell will pick them. Remove the one you do not want (npm uninstall -g @anthropic-ai/claude-code for the npm copy) and open a new terminal. |
claude doctor reports unparseable settings | A stray comma or quote in a settings.json you edited | It names the file. Fix the JSON — cat file | python3 -m json.tool will point at the character. A broken file takes out every rule in it, not just the line you got wrong. |
| Sign-in opens the browser and nothing comes back | The callback could not reach the CLI, usually a headless or remote machine | Run claude auth login again and follow the fallback the terminal prints. On a machine with no browser at all, sign in where you do have one and use the code it gives you. |
| It asks you to sign in again every session | The credential store is not persisting — on macOS, the Keychain | Answer Always Allow to the Keychain prompt. If it repeats, open Keychain Access, search for Claude, delete the entry and run claude auth login once more. |
grep, ls or a quoted argument behaves strangely on Windows | You are in PowerShell or CMD, not Git Bash | Open Git Bash and run the same command there. Claude Code itself is fine on Windows; the surrounding commands in this course assume Bash. |
| Everything works, but a session starts in the wrong project | claude takes the directory you launched it from | Not a fault. pwd before claude, every time. |
The VS Code extension gives you a panel inside the editor instead of a prompt in a window. It is closer to the desktop track than to this one, and if that appeals, switch tracks — nothing is lost, both build the same project. You can also keep both: the extension carries its own copy for the panel, and the standalone install you just made is what gives you claude in VS Code's integrated terminal.
Where you are now
A verified install, signed in, and a session you can open, use, leave and resume. Module 2 does real work in it — and commits the result, so that from here on you always have a way back.
You have finished when
claude --versionprints a version numberclaude doctorreports no failuresclaude auth logincompleted and a session started without asking you to sign in again- You typed a message inside a session, got an answer, and left the session back to your shell prompt
If it goes wrong
| What you see | What to do |
|---|---|
claude: command not found | Close the terminal and open a new one first — the installer edits your shell profile and the running shell has not read it. Still missing? Check that ~/.local/bin is on your PATH, then re-run the installer. |
claude doctor reports a broken or duplicate install | Follow what it prints. A common cause is an older npm-based install shadowing the native one; remove the one you are not using and re-open the shell. |
Commands like grep or ls are not recognised on Windows | You are in PowerShell or CMD. This track expects Git Bash or WSL. Open one of those and run the same command there. |
On your own
From your home directory, start a session, ask which directory are you working in?, leave it, then cd into claude-course and do the same. The two answers should differ. Knowing that Claude Code takes the directory you started it from is the single most common source of confusion on this track.
Kept in this browser only. Nothing is sent anywhere.