Skip to main content
This guide gets you from zero to a working Claude Code session. You’ll install the package, sign in with your Anthropic account, and run your first task.
1

Install Claude Code

Install the @anthropic-ai/claude-code package globally with npm.
This makes the claude command available in your terminal. Node.js 18 or later is required.
If you see a permissions error on macOS or Linux, your npm global prefix may require sudo. Consider using a version manager like nvm to avoid this.
2

Sign in to your Anthropic account

Authenticate using the /login command. Claude Code opens a browser window for the OAuth flow.
You can sign in with a Claude Pro or Max subscription (claude.ai) or with API usage billing via the Anthropic Console. Select the method that matches your account when prompted.After you authorize in the browser, Claude Code stores your credentials securely and returns you to the terminal.
3

Navigate to your project

Change into the directory you want to work in. Claude Code uses your current working directory as the project root.
4

Start a session

Run claude with no arguments to open the interactive REPL.
You’ll see the Claude Code prompt. You can now type tasks in plain English.
5

Run your first task

Type a task at the prompt. Here are a few things to try:
Claude Code will read the relevant files, show you what it plans to do, and ask for your confirmation before making any changes.

Example session

Here is what a typical first interaction looks like:

Useful commands

Once you’re in a session, these slash commands are available:

Next steps

Installation

System requirements, platform notes, and troubleshooting

How it works

The tool system, permission model, and agent loop

Git workflows

Use Claude Code to commit, review, and manage PRs

MCP integrations

Connect Claude Code to external tools and data sources