Prerequisites
- Node.js and npm (for installation), or Bun
- An Anthropic account
Steps
1
Install Claude Code
Install the package globally with npm:
2
Navigate to your project
Change into the directory you want to work in:
3
Launch Claude Code
Start the interactive REPL:
4
Authenticate
Inside the REPL, run the login command to sign in with your Anthropic account: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: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: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.