Claude Code Quickstart Guide

Get Claude Code running on your machine in under 5 minutes! This guide covers the essentials to start your AI-powered coding journey.

πŸš€ Prerequisites

Before you begin, ensure you have:

  • Node.js 18+ and npm (or Python 3.8+ for Python installation)
  • Git installed and configured
  • A supported operating system (macOS, Linux, or Windows)
  • A terminal/command prompt
  • An Anthropic API key (get one at console.anthropic.com)

πŸ“¦ Installation

npm install -g claude-code

Option 2: Use without installation

npx claude-code

Option 3: Install via Python

pip install claude-code

Option 4: Install from source

git clone https://github.com/anthropics/claude-code.git
cd claude-code
npm install
npm link

πŸ”‘ Configuration

  1. Set your API key:

    export ANTHROPIC_API_KEY=your-api-key-here

    Or add it to your shell profile (~/.bashrc, ~/.zshrc, etc.):

    echo 'export ANTHROPIC_API_KEY=your-api-key-here' >> ~/.zshrc
  2. Verify installation:

    claude --version
  3. Initialize your project (optional):

    claude init

    This creates:

    • CLAUDE.md for project-specific instructions
    • .claudeignore for files to exclude
    • Basic configuration files

🎯 Your First Session

  1. Start Claude Code in your project directory:

    cd your-project
    claude
  2. Try these commands:

    • help - Show available commands
    • ls - List files in current directory
    • cat filename.js - View a file
    • edit filename.js - Edit a file with AI assistance
  3. Example tasks to try:

    "Add error handling to the login function"
    "Write unit tests for the user service"
    "Refactor this code to use async/await"
    "Add JSDoc comments to all functions"
    

πŸ’‘ Essential Commands

CommandDescription
claudeStart interactive mode
claude "task"Execute a single task
claude --helpShow all options
claude --model opus-4Use a specific model
claude --resumeResume last session

πŸ› οΈ Basic Configuration

Create a CLAUDE.md file in your project root for project-specific instructions:

# Project-Specific Instructions
 
- Use TypeScript for all new files
- Follow ESLint configuration
- Write tests for all new functions
- Use conventional commits

For more advanced configuration options, see the Configuration Guide.

πŸ”₯ Quick Tips

  1. Be Specific: Clear, detailed requests get better results
  2. Use Context: Reference specific files and functions
  3. Iterate: Break complex tasks into smaller steps
  4. Review Output: Always review generated code before committing

πŸ“š Next Steps

Now that you have Claude Code running:

  1. Complete the Tutorial - Learn advanced features
  2. Explore Patterns - Discover best practices
  3. Configure Hooks - Automate your workflow
  4. Try TypeScript SDK - Build custom integrations

πŸ†˜ Need Help?

πŸŽ‰ Congratulations!

You’ve successfully set up Claude Code! You’re now ready to enhance your coding workflow with AI assistance.

πŸš€ Dive Deeper

You’ve got the basics down. Here’s where to go next to become an expert:

  • Secure Your Code: As you write custom functionality, it’s crucial to understand the security implications. See our Core Hooks Security Guide for essential best practices.
  • Master the Build: Ready to build for production? Learn how to integrate with modern tools in our Modern Build Tools Integration Guide.
  • Explore the Core: Understand the fundamental building blocks of this project by reading about Our Core Philosophy.

🧭 Quick Navigation

← Getting Started | Documentation | Patterns | Workshops