Getting Started

Getting Started with Claude Code

Install Claude Code, configure your project, and run your first session.

Install Claude Code

Claude Code is a CLI tool that runs in your terminal. Install it with one command:

macOS / Linux (recommended):

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

Windows (PowerShell):

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

Via npm (requires Node.js 18+):

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

You will need a Pro, Max, Team, Enterprise, or Console account to authenticate. The free Claude.ai plan does not include Claude Code. You can also bring your own provider via Amazon Bedrock, Google Vertex AI, or Microsoft Foundry.

First Run

Navigate to any project directory and type claude to start an interactive session:

bash
cd my-project
claude

Claude will open a browser window for authentication on first run. After that, it analyzes your project structure and begins an interactive conversation. Try these first commands:

text
give me an overview of this codebase
what does @src/index.ts do?

Configure CLAUDE.md

Create a CLAUDE.md file in your project root to give Claude persistent context. You can auto-generate one:

text
/init

Or create it manually with the essentials:

CLAUDE.md
# Project: MyApp

## Build & Test

- npm run dev # start dev server
- npm test # run tests
- npm run lint # lint check

## Architecture

- React 18 + TypeScript frontend
- Express API at /api/v1
- PostgreSQL via Prisma ORM

## Conventions

- Functional components with hooks
- Named exports, kebab-case files
- Tests colocated in __tests__/

Keep it concise. For every line, ask: if I remove this, will Claude make a mistake? If not, remove it. See the CLAUDE.md deep guide for advanced patterns.

Add Your First Skill

For reusable workflows, create a skill instead of growing CLAUDE.md:

.claude/skills/review/SKILL.md
---
name: review
description: Use when reviewing current changes before a commit or PR.
---

Review the current changes for:
- Potential bugs and edge cases
- Security vulnerabilities
- Performance issues
Suggest concrete fixes with file paths.

Skills are auto-discovered and load only when relevant. See Skills for the full pattern.

Understand Permissions

Claude Code uses a layered permission system. Press Shift + Tab to cycle the default three modes:

  • default — Claude asks before every write or shell command.
  • acceptEdits — File edits and common filesystem commands run without prompting.
  • plan — Claude explores via reads and shell, but won't edit your source.

Three more modes (auto, dontAsk, bypassPermissions) are opt-in — see Permissions & Security.

Launch directly in a mode:

bash
claude --permission-mode plan          # read-only exploration
claude --permission-mode acceptEdits   # auto-approve edits

See Permissions & Security for the full picture including per-command allow/deny rules.

Session Naming & Resume

Name sessions you'll want to return to:

bash
claude --name "auth-refactor"    # set a name at launch (-n for short)

Resume later by name or pick from a list:

bash
claude --resume "auth-refactor"  # resume by name (-r for short)
claude --continue                # resume most recent (-c for short)

Create an isolated parallel worktree when you want to experiment safely:

bash
claude --worktree

Use /memory to inspect persistent context and /agents to manage subagents.

Want to try it yourself?

AgentWay's AI tutor can walk you through this concept step by step. Just ask a question to start.
Start a conversation

Why does CLAUDE.md matter so much?

Context configuration is a core agent-development skill. Understanding how LLMs handle the context window explains why a concise, well-structured CLAUDE.md dramatically improves output quality.

Learn context window fundamentals in Agent Basics

Related Reading

Continue with practice

You have finished the core ideas of Getting Started with Claude Code.

If you want to turn the idea into something reusable, continue practicing on AgentWay.