Guides

Getting Started with Claude Code

This guide walks you through installing Claude Code, signing in, and running your first task — from a blank terminal to editing real code in a few minutes.

Prerequisites

  • Node.js 18 or newer (check with node --version).
  • A Claude Pro or Max subscription, or an Anthropic API key for pay-as-you-go.
  • A terminal — macOS, Linux, or Windows (WSL recommended on Windows).

Step 1: Install Claude Code

Install the CLI globally with npm:

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

Then start it from inside any project folder:

cd your-project
claude

Step 2: Sign in

The first time you run claude, it prompts you to authenticate. Sign in with your Claude account (Pro or Max) to use your subscription, or paste an API key to bill usage to the Anthropic Console. You only need to do this once per machine.

Step 3: Run your first task

With Claude Code open in your project, just describe what you want in plain English:

> explain what this project does and how it’s structured
> add input validation to the signup form and write a test for it

Claude Code will read the relevant files, propose changes, and — after you approve — edit files and run your tests. Review each diff before accepting. To plan a larger change before any edits happen, use plan mode.

Step 4: Add a CLAUDE.md file

Create a CLAUDE.md file in your project root with the essentials Claude Code should always know — how to run the app, test and lint commands, and coding conventions. It’s read at the start of every session and dramatically improves results. More in best practices.

Step 5: Set up your IDE (optional)

Install the official VS Code or JetBrains extension to see Claude Code’s edits as inline diffs and launch it from your editor. The terminal and IDE experiences share the same engine, so you can switch freely.

Useful first commands

  • /help — list available commands.
  • /clear — reset the conversation/context for a fresh task.
  • /model — switch the Claude model (e.g. a flagship model for hard tasks).
  • /init — generate a starter CLAUDE.md for your project.

Next steps

Once you’re comfortable, level up with Claude Code best practices, connect your tools via MCP, and review pricing & usage limits so sessions don’t hit a wall mid-task.

Frequently Asked Questions

How do I install Claude Code?

Install it globally with npm: run "npm install -g @anthropic-ai/claude-code", then type "claude" inside any project folder to start. You need Node.js 18 or newer.

Does Claude Code work on Windows?

Yes. It runs on macOS, Linux, and Windows; on Windows, running it inside WSL (Windows Subsystem for Linux) gives the smoothest experience.

How do I sign in to Claude Code?

On first run it prompts you to authenticate — sign in with your Claude Pro or Max account to use your subscription, or paste an Anthropic API key to use pay-as-you-go billing.

What is a CLAUDE.md file?

CLAUDE.md is a small project file with conventions, commands, and context that Claude Code reads at the start of every session, so it follows your project’s rules without being told each time.

Explore the Claude Code guide