Claude Code
authorKRIATIZ
01 · Getting started / lesson 2 of 3

Install and first session

20 minBeginner5 steps

Installation takes a few minutes. What matters more is the first session: run the agent in the right folder, create CLAUDE.md and give it a small task with a way to verify.

data and requestsproblem
Lesson stepsstep 1 of 5
  1. Install
  2. Sign in
  3. Folder
  4. /init
  5. Task
step 1 / 5how it works

One command

A curl script on macOS and Linux, PowerShell on Windows, or the npm package. Check with claude --version.

Key point

Command not found? Restart the terminal.

← → steps · space pause · R restart · ⌘K search
You will learn 7
Lesson notes

Installation

SystemCommand
macOS, Linux, WSLcurl -fsSL https://claude.ai/install.sh | bash
Windows (PowerShell)irm https://claude.ai/install.ps1 | iex
Via npm (Node.js 18+)npm install -g @anthropic-ai/claude-code

Check with claude --version. If the command isn’t found, restart the terminal so PATH updates.

Install commands occasionally change. If something doesn’t work, check the official Anthropic documentation.

Sign-in

On first run claude opens a browser to sign in. Two options:

  • A Claude account with a Pro or Max plan. Fixed price, usage limits reset on a schedule.
  • An API key from the Anthropic Console. Pay per token, convenient for teams and automation.

First run in a project

cd ~/projects/my-app
claude

Run the agent at the repository root. It sees everything in that folder and below, and doesn’t go outside without permission.

/init: your first CLAUDE.md

The /init command asks the agent to explore the project and create a CLAUDE.md with the structure, build and test commands and code style. The agent reads this file at the start of every session. Review it and fix what the agent got wrong. More in lesson 4.

Useful in-session commands

CommandWhat it does
/helplist commands
/clearstart with a clean context
/compactcompress the conversation history
/modelchoose a model
/resumereturn to a previous session
/permissionsview and change permissions

To reference a file, start with @: "look at @src/api/orders.ts". The agent then doesn’t spend steps searching.

Your first task

Start with a small task the agent can verify on its own:

Find why test_order_total fails, fix it and run the tests again.

Watch which files the agent reads, which commands it proposes and how it explains changes. It is the fastest way to understand how it thinks.

Common first-session problems

  • Wrong folder. The agent doesn’t see the project or sees too much, like your entire home directory.
  • A first task that is too big. "Rewrite the backend in Go" without a plan ends in chaos.
  • No way to verify. Without tests or a run command, the agent can’t know whether things actually work.

Today's task

Install Claude Code, run it in a real project, run /init and give it one small task with a test. Note what surprised you.

Need help with the setup?

I will install and configure Claude Code for your team: CLAUDE.md, permissions, skills and hooks for your stack.

Let’s talk
Vladyslav Koshelyev
Vladyslav Koshelyev

Developer at KRIATIZ. I build chatbots, websites and automation for businesses. Author of the course.

About the author · Telegram