Install & First Run

1. What you need first

  • Node.js 18 or newer — Claude Code installs through npm, which ships with Node. New to that? Our Install Node & npm chapter walks you through it in five minutes.
  • A Claude account (Pro or Max subscription) or an API key — you'll sign in on first launch.
  • A project folder — any folder with code in it. Even an almost-empty one works; the Project Memory chapters later show how to start a brand-new project from zero.

No Node? Native installers also exist that don't need Node at all — see the official install page at code.claude.com/docs for your operating system.

2. Install it globally

One command, run once, from any folder:

Install Claude Code

Terminal
$ npm install -g @anthropic-ai/claude-code
In VS Code
  1. Open VS Code
  2. Press Ctrl+` (the backtick key, above Tab) to open the built-in terminal
  3. Paste the command and press Enter

The -g flag installs it machine-wide, so the claude command works in every project — not just this one.

Verify the install

Terminal
$ claude --version
In VS Code
  1. In the same terminal, type the command and press Enter

A version number means you're ready. If the command isn't found, close and reopen the terminal first.

3. Start it inside your project

This is the rule beginners trip over most: always start Claude Code from the project folder. The agent reads and edits the files where it's launched — start it in the wrong place and it's working on the wrong world.

Start a session

Terminal
$ cd path/to/your/project
$ claude
In VS Code
  1. Use File → Open Folder… and choose your project
  2. Open the built-in terminal (Ctrl+`) — it already starts in that folder
  3. Type claude and press Enter

Opening the project folder in VS Code first means the terminal is always in the right place — one less thing to think about.

4. Log in once

The first launch asks you to log in (the /login command). Sign in with your Claude account — a Pro or Max subscription — or paste an API key. It's remembered, so future sessions go straight in.

5. Say your first thing

There's no syntax to learn. Type plain English and press Enter. Two kinds of input exist: anything starting with / is a command to the tool itself (like /login), and everything else is a message to Claude. For your very first message, ask a question instead of assigning a task — you'll watch how the agent explores your project, with zero risk to your files:

A good first message
Look around this project and tell me, in beginner terms:

1. What is this project and what does it do?
2. How is it organized — what are the main folders and files?
3. What commands do I use to run it locally?

Don't change any files yet — just explain.

Claude will read your files and report back. That little briefing — your own project explained to you — is the moment most people get what an agent is.

Up next: plug Claude Code into VS Code properly — live diffs of every change — and set the two safety guardrails every beginner should have before an AI touches their repo.

FAQ

Frequently Asked Questions

How do I install Claude Code?
Run npm install -g @anthropic-ai/claude-code in any terminal (needs Node.js 18+), then verify with claude --version. Native installers that don't need Node exist too — see the official docs at code.claude.com/docs.
Do I need Node.js first?
For the npm install route, yes — Node 18 or newer, which includes npm. Our Install Node & npm chapter covers it in five minutes. Alternatively, use the native installer for your OS from the official install page.
How do I log in?
The first launch prompts you (the /login command): sign in with your Claude account — Pro or Max subscription — or paste an API key. It's remembered for future sessions.
Why must I start claude inside my project folder?
Claude Code works on the files where it's launched. Start it in the wrong folder and it explores the wrong project. Opening your project in VS Code first means the built-in terminal always starts in the right place.