Claude Code Quickstart
Welcome to the Claude Code quickstart guide!
This guide will help you start using the AI-powered coding assistant in minutes. You’ll learn how to use Claude Code to complete common development tasks.
Before You Begin
Make sure you have:
- An open terminal or command prompt
- A code project to work with
- A Claude.ai (recommended) or Claude Console account
Step 1: Install Claude Code
NPM Installation
If you have Node.js 18 or higher installed:
npm install -g @anthropic-ai/claude-codeNative Installation
Homebrew (macOS, Linux):
brew install --cask claude-codemacOS, Linux, WSL:
curl -fsSL https://claude.ai/install.sh | bashWindows PowerShell:
irm https://claude.ai/install.ps1 | iexWindows CMD:
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmdStep 2: Log In to Your Account
Claude Code requires an account to use. When you start an interactive session with the claude command, you’ll need to log in:
claude
# You'll be prompted to log in on first use/login
# Follow the prompts to log in with your accountYou can log in with either:
- Claude.ai (subscription plans - recommended)
- Claude Console (API access with prepaid credits)
After logging in, your credentials are stored so you won’t need to log in again.
Step 3: Start Your First Session
Open a terminal in any project directory and launch Claude Code:
cd /path/to/your/project
claudeYou’ll see the Claude Code welcome screen with your session info, recent conversations, and latest updates. Type /help to see available commands, or type /resume to continue a previous conversation.
Step 4: Ask Your First Question
Let’s start by understanding your codebase. Try one of these:
> What does this project do?Claude will analyze your files and provide a summary. You can also ask more specific questions:
> What technologies does this project use?> Where is the main entry point?> Explain the folder structureYou can also ask about Claude’s own capabilities:
> What can Claude Code do?> How do I use slash commands in Claude Code?> Can Claude Code work with Docker?Step 5: Make Your First Code Change
Now let’s have Claude Code do some actual coding. Try a simple task:
> Add a hello world function to the main fileClaude Code will:
- Find the appropriate file
- Show you the proposed changes
- Ask for your approval
- Make the edit
Step 6: Use Git in Claude Code
Claude Code makes Git operations conversational:
> What files have I changed?> Commit my changes with a descriptive messageYou can also prompt for more complex Git operations:
> Create a new branch called feature/quickstart> Show the last 5 commits> Help me resolve merge conflictsStep 7: Fix Bugs or Add Features
Claude excels at debugging and feature implementation.
Describe what you want to achieve in natural language:
> Add input validation to the user registration formOr fix existing issues:
> There's a bug where users can submit empty forms—fix itClaude Code will:
- Locate relevant code
- Understand context
- Implement the solution
- Run tests if available
Step 8: Try Other Common Workflows
There are many ways to collaborate with Claude:
Refactor Code
> Refactor the authentication module to use async/await instead of callbacksWrite Tests
> Write unit tests for the calculator functionsUpdate Documentation
> Update the README with installation instructionsCode Review
> Review my changes and suggest improvementsEssential Commands
Here are the most important commands for daily use:
| Command | Function | Example |
|---|---|---|
claude | Start interactive mode | claude |
claude "task" | Run one-off task | claude "fix build errors" |
claude -p "query" | Run one-off query, then exit | claude -p "explain this function" |
claude -c | Continue recent conversation | claude -c |
claude -r | Resume previous conversation | claude -r |
claude commit | Create Git commit | claude commit |
/clear | Clear conversation history | > /clear |
/help | Show available commands | > /help |
exit or Ctrl+C | Exit Claude Code | > exit |
See the CLI Reference for the complete list of commands.
Beginner Pro Tips
Try saying: "Fix the login bug where users see a blank screen after entering incorrect credentials"
```
> 1. Create a new database table for user profiles
```
```
> 2. Create an API endpoint to fetch and update user profiles
```
```
> 3. Build a web page that allows users to view and edit their information
```
```
> Analyze the database schema
```
```
> Build a dashboard showing the most returned products by our UK customers
```
What’s Next?
Now that you know the basics, explore more advanced features:
Get Help
- In Claude Code: Type
/helpor ask “How do I…” - Documentation: You’re here! Browse other guides
- Community: Join our Discord for tips and support