Claude Code · Series · Part 1 of 8
Meet Claude and set it up: the interfaces, the first session, and choosing a model
Every time I start work on a project with an AI assistant, I catch myself explaining the same things again: how to build it, which folders matter, which style we follow. This eight-part series is about ending that habit with one small file called CLAUDE.md. Before the file makes sense, though, you need the basics, so Part 1 covers what Claude is, the official ways to use it, how to install it, how much freedom to give it, and how to pick a model.
- Check your account. Claude Code needs a Claude Pro, Max, Team or Enterprise subscription, or a Claude Console account. The free claude.ai plan does not include it. It also has to be available in your country.
- Open a terminal. Never used one? Follow the official terminal guide for new users, or use the desktop app, which needs no terminal.
- Install and check it. One command from section 3, then
claude --version. - Pick a small project in git and create a branch first (
git switch -c try-claude), so anything Claude changes can be undone. - Start it. Run
cd your-project, thenclaude, and sign in when the browser opens. - Ask before you change. Try “what does this project do?” and read the answer.
- Try one tiny change, such as “add a comment to the main file”. Read the permission prompt, then choose Yes.
- Know how to stop. Esc interrupts Claude while it works.
/exit, or Ctrl+D twice on an empty prompt, quits.
Section 3 and section 4 explain each step, and the “Stay safe on day one” list is worth reading before you approve anything.
Words you will see
| Word | In plain words |
|---|---|
| Prompt | The message you type to Claude. |
| Token | A small chunk of text, roughly three-quarters of a word. Limits and costs are counted in tokens. |
| Context window | The amount of text Claude can look at at once: your messages, the files it read, and its own replies. When you start a new session it is empty. |
| Session | One conversation with Claude Code, from when you run claude until you exit or clear it. |
| CLAUDE.md | A text file in your project that Claude reads at the start of every session, so you do not have to repeat yourself. |
| Model | The AI behind Claude. Bigger ones think harder but are slower and cost more. |
- Part 1 (this one): what Claude is, the official interfaces, setup, first session, safety, manual and plan modes, changing the model and settings.
- Part 2: why Claude forgets, what
CLAUDE.mdis, where it lives, how to write a good one, and the.claudefolder. - Part 3: how the file saves tokens, helps you onboard onto a new project or feature, and the mistakes to avoid.
- Part 4: the Claude API, every model published so far, and the official links in one place.
- Parts 5 to 8 (advanced): day-to-day prompting, git and troubleshooting; extending Claude with MCP, subagents and plugins and choosing a surface; automation, CI and team setup; and Claude beyond code with a learning path.
1. What is Claude?
Claude is a family of AI models made by Anthropic. You give it text (and, for some uses, images or files), and it writes text back: answers, explanations, summaries, and code. Under the hood it is a large language model, the same kind of “very fancy autocomplete” I described in my Android AI chat post. It reads your input as tokens, and writes a reply one token at a time.
Two names get mixed up, so let me separate them:
| Name | What it is |
|---|---|
| Claude | The model family, the “brain”. It comes in several sizes, from small and quick to large and capable. |
| Claude Code | A coding assistant built on those models. It can read your project, edit files, and run commands, with your permission. This series is about it. |
A normal chat window is like texting a smart friend: they only know what you paste in. Claude Code is more like a teammate sitting at your computer: it can open the files itself, search the code, run the tests and show you the result. The catch is that this teammate arrives with a blank memory every morning. Fixing that is the whole point of this series.
2. The official ways to use it
Claude Code is not tied to one window. Anthropic ships it in several places, and they share the same engine, so a habit you learn in one carries over to the others.
| Interface | Good for |
|---|---|
| Terminal (CLI) | The original and most complete experience. Type claude inside your project folder. |
| VS Code and JetBrains extensions | Stay in your editor, see proposed changes as diffs next to your code. |
| Desktop app | A standalone window if you prefer not to live in a terminal. |
| Web (claude.ai/code) | Start work from a browser, no local setup for quick tasks. |
Features and install steps change often. Treat the official Claude Code documentation (also see the quickstart) as the source of truth, and use this post for the ideas behind it.
3. Installing Claude Code
Before you install
- An account that includes Claude Code: a Claude Pro, Max, Team or Enterprise subscription, or a Claude Console account billed by usage. Cloud accounts on Amazon Bedrock, Google Cloud or Microsoft Foundry also work. The free claude.ai plan does not include Claude Code. See Claude pricing for current plans.
- A supported computer: macOS 13 or later, Windows 10 (1809) or later, Ubuntu 20.04+, Debian 10+ or Alpine 3.19+, with at least 4 GB of RAM and an internet connection.
- A supported country. If the installer says the app is unavailable in your region, see Anthropic's supported countries.
- A project folder to work in, ideally one under git.
New to the terminal? The official terminal guide for new users shows how to open one on macOS, Linux and Windows and paste a command. If you would rather skip it altogether, the Claude Code desktop app runs Claude Code without a terminal (see the overview).
Pick the install command for your system
| System | Command | Notes |
|---|---|---|
| macOS, Linux, WSL | curl -fsSL https://claude.ai/install.sh | bash | The recommended native installer. It updates itself in the background. |
| Windows, PowerShell | irm https://claude.ai/install.ps1 | iex | Your prompt starts with PS C:\. Press Win+X and pick Windows PowerShell or Terminal. |
| Windows, CMD | curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd | Your prompt starts with C:\ (no PS). Running the PowerShell command here fails with “irm is not recognized”. |
| Homebrew (macOS) | brew install --cask claude-code | Follows the stable channel. Does not auto-update: run brew upgrade claude-code. |
| WinGet (Windows) | winget install Anthropic.ClaudeCode | Does not auto-update: run winget upgrade Anthropic.ClaudeCode. |
| npm | npm install -g @anthropic-ai/claude-code | Needs Node.js 22 or later. Never use sudo with it. |
Debian, Ubuntu, Fedora, RHEL and Alpine users can also install through apt, dnf or apk; the steps are in the official setup guide. On native Windows, Git for Windows is recommended but optional: without it, Claude Code uses PowerShell as its shell tool. The installer shows no progress while it downloads, so leave the window open until it says Claude Code was installed.
Check that it worked
Open a new terminal window and run:
claude --version
It prints a version number followed by (Claude Code). For a fuller health check of your install and settings, run claude doctor. To update by hand later, run claude update.
If you see “command not found: claude”
This is the most common first-day problem. It means the folder where the installer put claude is not on your PATH yet (the list of folders your terminal searches for commands). The installer prints the exact fix under “Setup notes”; otherwise use the one for your shell, then open a new terminal and try again:
# macOS (zsh)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc
# Linux (bash)
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
# Windows (PowerShell)
$currentPath = [Environment]::GetEnvironmentVariable('PATH', 'User')
[Environment]::SetEnvironmentVariable('PATH', "$currentPath;$env:USERPROFILE\.local\bin", 'User')
If it still is not found, check that the file ~/.local/bin/claude exists; if not, the install did not finish. Two other common messages: syntax error near unexpected token '<' means the installer address returned a web page instead of a script, so retry or install with Homebrew; and on Windows 'irm' is not recognized means you are in CMD rather than PowerShell. The official installation troubleshooting guide matches every error message to a fix.
Start it and sign in
- Go to your project. Claude Code works relative to the folder you start it in, so this matters.
cd ~/projects/my-app - Start it.
claude - Sign in. The first run opens your browser to log in with your Claude or Console account. Your credentials are stored, so you will not need to do this again. Type
/logininside a session to switch accounts.
4. Your first session
Once you run claude, you get a prompt. You type in plain language. A good first message is not “write me a feature”, it is a question that lets Claude look around:
> What does this project do, and how do I run it?
● I'll look at the project files first.
Read(README.md)
Read(app/build.gradle.kts)
Search(pattern: "MainActivity")
● This is an Android app that shows a list of notes.
• UI is in app/src/main/java/.../ui/ (Jetpack Compose)
• Data is stored with Room in .../data/
• Run it with ./gradlew installDebug
> _
Notice what happened. You did not paste any code. Claude chose which files to read. In Manual mode, whenever it wants to edit a file or run a command, it asks for your permission first. Other modes ask less, and you can change mode at any time.
Claude wants to run a command
./gradlew testDebugUnitTest
1. Yes
2. Yes, and don't ask again for this command
3. No, and tell Claude what to do differently
How to stop, interrupt and quit
| You want to | Do this |
|---|---|
| Stop Claude while it is working | Press Esc. Double-tap Esc or type /rewind to go back to an earlier point in the conversation and code. |
| Leave Claude Code | Type /exit, or press Ctrl+D twice on an empty prompt. |
| Start a fresh conversation | Type /clear. |
| Come back to the last conversation | Run claude -c (most recent) or claude -r (pick one). |
You cannot click in the terminal. Use the arrow keys to move around and press Enter to choose an option.
Stay safe on day one
- Work on a git branch. Run
git switch -c try-claudefirst and commit anything you care about. Then every change Claude makes can be reviewed withgit diffand undone. - Stay in Manual mode while you learn. Check the status bar under the prompt. Newer versions may start in auto mode, so press Shift+Tab until it says manual.
- Read each permission prompt. Look especially at shell commands. Choose “No” and tell Claude what to do differently if you are not sure.
- Be careful with “don’t ask again”. Allow narrow, safe commands such as your test command, never broad ones.
- Start with questions or plan mode, not edits, in a project you do not know.
- Keep secrets out of reach. Do not paste passwords or keys into chat, and add deny rules for files like
.env(Part 2). - Avoid “skip all permission checks” options such as
--dangerously-skip-permissions. The docs reserve them for isolated containers and virtual machines. - Check your workplace rules. What Claude reads is sent to Anthropic's servers to be processed. If the code is your employer's, make sure using an AI tool on it is allowed.
5. Slash commands worth knowing
Typing / at the prompt opens a menu of commands that control the session itself rather than talk to the model. These are the ones I use most. The full list is in the official commands reference:
| Command | What it does |
|---|---|
/help | Shows help and the available commands. |
/init | Creates a starter CLAUDE.md for the project. |
/memory | Edit your CLAUDE.md files, turn auto memory on or off, and view its entries. |
/model | Switches the model. It also saves your choice as the default for new sessions; with no argument it opens a picker, where s switches for this session only. |
/plan | Enters plan mode straight from the prompt, for example /plan fix the login bug. |
/clear | Starts a new conversation with an empty context. The old one is saved and can be reopened with /resume. |
/compact | Summarises the conversation so far to free up space. You can add focus instructions. |
/context | Shows what is using your context window, including which memory files loaded. |
/resume | Reopens an earlier conversation by name or from a picker. |
/usage | Shows session cost and plan usage. /cost is an alias. How to read it is in Part 3. |
/config | Opens settings: theme, model and other preferences. |
6. Manual, auto-accept and plan mode
Earlier you saw Claude ask before running a command. That is one of several permission modes, which decide how much Claude may do without asking. The official documentation lists six: Manual (config value default), accept edits (acceptEdits), plan, auto (a second model reviews actions instead of you), dontAsk (for locked-down CI) and bypassPermissions (for isolated containers only). This section covers the three you will switch between most, plus where auto fits. Full reference: Choose a permission mode.
It depends on your version. According to the docs, from Claude Code v2.1.283 the built-in starting mode for interactive terminal and VS Code sessions is auto; on earlier versions it was Manual (or auto on some plans). The status bar under the prompt always shows the current mode, for example “manual mode on”, “accept edits on” or “plan mode on”. If you want to review every action, switch to Manual with Shift+Tab or start with claude --permission-mode default.
Manual mode: you approve each action
Reading files is allowed, but most actions that change your project or machine, or reach the network, need a yes. It is slower, but you see every edit before it lands. It is the right choice for your first sessions, for production code, and whenever you do not yet trust the task.
If a prompt keeps repeating for something safe, such as running your tests, add it to the allow list in your settings (section 8) instead of switching everything off.
Accept edits: fewer interruptions
Claude creates and edits files in your working folder without asking, and also runs common file commands such as mkdir, touch, mv, cp and sed there. Anything else, including other shell commands and paths outside the project, still prompts. You review the result afterwards in your editor or with git diff. It suits well-defined work on a git branch where everything can be undone.
Plan mode: think first, change nothing
In plan mode Claude researches and proposes changes without making them. It reads files, can run shell commands to explore, and writes a plan, but it does not edit your source. Edits stay blocked until you approve the plan.
> Add an offline fallback when the online model is unreachable.
● Read(app/engine/EngineSelector.kt)
Read(app/chat/ChatViewModel.kt)
● Proposed plan
1. Add a reachability check in EngineSelector
2. If online fails before any text arrives, switch to local
3. Show a one-line notice in the chat
4. Add unit tests for the three cases
1. Yes, and use auto mode
2. Yes, manually approve edits
3. No, keep planning (tell Claude what to change)
⏸ plan mode on (shift+tab to cycle)
Why it matters: a plan is cheap to correct, and code is not. Catching a wrong assumption in step 2 of a plan costs you one sentence. Catching it after twenty edited files costs a lot of tokens and time. It is my default for anything touching several files, for new features, and for any code I do not know well. Two handy extras from the docs: press Ctrl+G to open the plan in your text editor and edit it before Claude proceeds, and use the opusplan model alias (section 7) to plan with the largest Opus model and then execute with Sonnet.
Ways to enter it:
# press Shift+Tab until the status bar says "plan mode on"
# or type /plan, optionally with a task
/plan fix the login bug
# or start there
claude --permission-mode plan
To make plan mode the default for a project's terminal sessions, set "defaultMode": "plan" under permissions in .claude/settings.json.
Plan mode controls what Claude may do, not what it remembers. The plan lives in the conversation and is gone when you close the session or run /clear. If tomorrow continues the work, ask Claude to save the plan to a file such as docs/features/my-feature.md and link it from CLAUDE.md (Part 3).
Where is the switch? In the terminal it is Shift+Tab (⇧ + Tab on a Mac). In the VS Code extension you click the mode indicator at the bottom of the prompt box, where the labels are Manual, Edit automatically, Plan, Auto and Bypass permissions. The desktop app has its own mode selector. If a shortcut does nothing in your terminal, see the official docs on customizing keyboard shortcuts.
And auto mode?
In auto mode a separate classifier model reviews each action and blocks the risky ones, so you get far fewer prompts without switching checks off completely. It needs a supported model and can be turned off by an organisation. It is convenient for long tasks, but while you are learning, Manual or accept edits teach you more about what Claude is doing.
| Situation | Mode I would pick |
|---|---|
| First day with Claude Code, or unfamiliar project | Manual |
| Big or vague change across many files | Plan, then Manual or accept edits |
| Small, clear edit with tests to catch mistakes | Accept edits |
| Exploring or reviewing code, no changes wanted | Plan |
| Long, well-defined task you will check at the end | Auto, if available |
Plan mode and CLAUDE.md work well together. The notes tell Claude your commands and conventions, so the plan it writes matches how your project actually works (Part 2).
7. Changing the model
Claude comes in different sizes. A larger model reasons better about hard problems but is slower and uses more of your usage allowance. A smaller one is quick and cheap, and is plenty for simple edits, renames and questions. Matching the model to the job is one of the easiest ways to work faster and spend less. The official cost guidance says Sonnet handles most coding tasks well and costs less than Opus, so keep Opus for complex architectural decisions and multi-step reasoning.
There are four ways to choose. They are listed in priority order, so if two disagree, the earlier one wins:
> /model
Select model
✓ 1. Default (recommended for your plan)
2. Opus long-running coding and knowledge work
3. Sonnet best mix of speed and intelligence
4. Haiku fastest, high-volume tasks
s to switch for this session only.# 1. Inside a session (also saved as your default for new sessions)
/model sonnet
# 2. When you start Claude Code (this launch only)
claude --model sonnet
# 3. Environment variable (sessions started with it)
export ANTHROPIC_MODEL=sonnet
# 4. Saved in a settings file (see section 8)
{ "model": "sonnet" }
Short aliases save you from remembering long model IDs. According to the official model configuration docs:
| Alias | Meaning |
|---|---|
sonnet, opus, haiku | The latest version of each family. On the Anthropic API today that is Sonnet 5.5, Opus 5.5 and Haiku 5.5. |
fable | The Fable family (currently Fable 5.1). It is never the default model. |
best | The most capable model available to you: Fable where available, otherwise Opus. |
opusplan | Opus while in plan mode, Sonnet while executing the plan. A good fit for section 6. |
sonnet[1m], opus[1m] | Variants with a 1M-token context window. |
default | Clears your override and goes back to your account's default. |
“Latest” depends on where you run Claude: on Amazon Bedrock, Google's platform or Microsoft Foundry the aliases can point to older versions. To pin an exact version for repeatable results, use a full model name such as claude-opus-5-5. Model names change often, so run /model to see what your account offers today.
The current lineup, every model still available, and the retired ones, with their API IDs and retirement dates, are in Part 4, section 3. For Claude Code, you mostly need the aliases above and the /model picker.
Two related controls: the effort level (adjustable in /model or with /effort) trades reasoning depth for speed and cost on models that support it, and the model you pick also applies to subagents that inherit your session's model.
8. Settings files and where they live
Beyond the model, you can save preferences such as permissions, the default model and environment variables in settings.json files. The three levels you will use most are below, and the more specific one wins. (The docs also describe settings from the command line and organisation-managed settings, which sit above all three.)
{
"model": "sonnet",
"permissions": {
"allow": ["Bash(./gradlew test *)"],
"deny": ["Read(./.env)"]
}
}That small file says: use Sonnet by default, let Claude run the Gradle tests without asking each time, and never read the .env file. The /config command can edit many of these for you. The full list of keys and the precedence order are in the official settings documentation.
Notice that settings configure behaviour. They do not tell Claude anything about your project. For that, we need a different kind of file.
9. What comes next
You can now install Claude Code, talk to it, approve its actions, and switch models. But close the session and open a new one, and Claude has forgotten everything you taught it. That is not a bug; it is how language models work. In Part 2 we fix it with CLAUDE.md. Part 3 shows how that saves tokens and speeds up onboarding, and Part 4 covers the Claude API, the full model list and the official links.
| Term | In plain words |
|---|---|
| Claude | Anthropic's family of AI models. |
| Claude Code | A coding assistant that works inside your project folder. |
| CLI | Command-line interface: using a program by typing in a terminal. |
| PATH | The list of folders your terminal searches for commands. “command not found” usually means the install folder is missing from it. |
| Slash command | A /something command that controls the session. |
| Model alias | A short name like sonnet that points to the current version. |
| Permission mode | How much Claude may do without asking: manual, accept edits, plan, auto and others. |
| Plan mode | A mode where Claude explores and proposes a plan, and does not edit your source until you approve. |
| settings.json | A file that stores your preferences, at user, project or local level. |