Skip to main content

Prerequisites

Steps

1

Install Claude Code

Install the package globally with npm:
npm install -g @anthropic-ai/claude-code
2

Navigate to your project

Change into the directory you want to work in:
cd your-project
3

Launch Claude Code

Start the interactive REPL:
claude
4

Authenticate

Inside the REPL, run the login command to sign in with your Anthropic account:
/login
This opens an OAuth 2.0 flow in your browser. Once you complete it, your credentials are stored securely (on macOS, in the Keychain).
5

Try your first task

Ask Claude something about your codebase:
Explain the main entry point of this codebase
Claude will read the relevant files and respond with an explanation.

Your first coding task

Once you’re authenticated, try any of these prompts to get a feel for what Claude Code can do:
Find all TODO comments in this project and summarize them
Refactor the largest function in this file to be more readable
Write a unit test for the login function
Create a git commit for the changes in my working tree

Common first commands

/doctor

Diagnose and verify your Claude Code installation and settings. Run this if something seems wrong.

/help

List all available slash commands with their descriptions.

/config

View and modify Claude Code settings such as the model, permission mode, and theme.

/memory

Manage persistent memory that Claude carries across sessions.
The first time Claude Code invokes a tool (such as running a shell command or writing a file), it will prompt you for permission before proceeding. You can allow or deny each action, and configure how permissions are handled going forward via /config.

Build docs developers (and LLMs) love