Claude

Getting Started: Installing, Configuring, and Running Your First Claude Code Session

Before Claude can help you build anything, it needs to run somewhere. This post covers installation, your first session, and the handful of concepts — working directory, permission modes, slash commands — that everything else in this series builds on.

What Claude Code actually is

Claude Code is Anthropic’s official coding agent. At its core it’s a CLI tool that runs in your terminal, inside a project directory, with direct access to read and write files and run shell commands on your machine — under your control. The same underlying agent is also available as a VS Code / JetBrains extension and a desktop app, but the CLI is the most direct way to understand how it actually works.

Installing it

npm install -g @anthropic-ai/claude-code

You’ll need Node.js installed first. Once it’s installed, navigate to a project folder and start a session:

cd my-project
claude

The first time you run it, you’ll authenticate with your Anthropic account. After that, every time you run claude inside a folder, that folder becomes the working directory — the project Claude can see and act on.

The working directory matters more than you’d think

Claude doesn’t have some global view of your entire filesystem. It operates on the project you opened it in, the same way you would if you sat down at a new machine with just a terminal and that one folder. This is a feature, not a limitation — it keeps sessions scoped, predictable, and safe.

If you need to work across multiple projects, you either run separate sessions per project, or explicitly grant access to another folder when you need it.

Your first real prompt

Resist the urge to test it with something trivial like “write a hello world.” Instead, try something closer to real work:

Explain the structure of this codebase and how the main
request flow works, from the entry point to the database.

Watch what happens: Claude will start reading files, searching for patterns, and building an explanation grounded in your actual code — not a generic answer. That’s the difference between a chatbot and an agent with tools.

Permission modes: the safety layer

Every action Claude wants to take — editing a file, running a command — passes through a permission layer. There are a few modes worth knowing from day one:

  • Default mode — Claude asks before anything that changes your files or runs a command. Best for your first weeks.
  • Plan mode — Claude researches and proposes a plan before touching anything, useful for larger or riskier changes.
  • Accept-edits mode — file edits proceed automatically, but higher-risk actions still ask.
  • Bypass mode — nothing is asked. Reserve this for sandboxes, containers, or work you’d never mind losing.

If you’re teaching students, start everyone in default mode. Trust is something you build up as you see how the agent behaves, not something you grant on day one.

Slash commands worth knowing immediately

Command What it does
/help Lists available commands and gets you unstuck
/clear Starts a fresh conversation, clearing prior context
/init Generates a CLAUDE.md file documenting your project (covered in Post 3)

A habit to build from day one

After every change Claude makes, look at the diff before you move on. Not because Claude is usually wrong — it usually isn’t — but because the review habit is the entire safety net of this workflow, and it’s much easier to build the habit now than to retrofit it later.

Next: how Claude actually explores and understands a codebase it’s never seen before — which explains why the working-directory model from this post matters so much.