Getting Started with Claude Code


AI coding assistants have gone from novelty to necessity in about two years. According to JetBrains Developer Ecosystem Research, 90% of developers now regularly use at least one AI tool at work. The tooling landscape is crowded, but one option keeps surfacing in developer conversations: Claude Code.

This tutorial walks through everything you need to go from zero to productive with Claude Code. We’ll cover installation, your first session, the core workflow, and the features that make it different from alternatives. Whether you’ve used other AI coding tools or this is your first, you’ll have a working setup by the end.

Key Takeaways

  • Claude Code runs in your terminal, not a separate IDE, working directly with your project files and git history.
  • Installation takes under five minutes with Node.js 18+ and a single npm command.
  • Features like CLAUDE.md, hooks, and MCP servers give you fine-grained control over how the agent behaves.
  • Claude Code has 91% customer satisfaction, the highest among AI coding tools (JetBrains, 2026).

What Is Claude Code?

Claude Code is a terminal-based AI coding agent built by Anthropic. It earned a 91% CSAT score and 54 NPS, the highest satisfaction rating among AI coding tools (JetBrains Developer Ecosystem Research, Apr 2026). Unlike browser-based chat interfaces, it works directly in your codebase.

The tool reads your files, understands your project structure, edits code, runs commands, and manages git operations. Think of it as a senior developer sitting in your terminal, ready to pair program.

Where Does It Fit in the Market?

The AI coding tool space is competitive. GitHub Copilot leads work adoption at 29%, while Cursor and Claude Code are tied at 18% globally (JetBrains, Apr 2026). But raw adoption doesn’t tell the full story.

When the Pragmatic Engineer Survey (Feb 2026) asked developers which tool they love most, Claude Code came out on top at 46%. Cursor followed at 19%, and GitHub Copilot trailed at 9%. Satisfaction and love are different from market share. They signal where the momentum is heading.

Why Terminal-Based?

Claude Code doesn’t lock you into a specific editor. You keep using VS Code, Neovim, JetBrains IDEs, or whatever you prefer. The agent lives in the terminal alongside your existing tools.

This approach means zero configuration for editor plugins. It also means Claude Code can do things that editor extensions can’t, like running shell commands, managing git workflows, and spawning subagents for parallel tasks.

How Do You Install Claude Code?

Installation takes under five minutes on macOS, Linux, or Windows (via WSL). You need Node.js version 18 or higher installed. That’s the only prerequisite. 84% of developers already use or plan to use AI in development (Stack Overflow Developer Survey, 2025), so odds are you’ve got the prerequisites ready.

Step 1: Install via npm

Open your terminal and run:

npm install -g @anthropic-ai/claude-code

This installs Claude Code globally so you can run it from any directory.

Step 2: Authenticate

Navigate to your project directory and launch Claude Code:

cd your-project
claude

On first launch, it will open a browser window for authentication. Sign in with your Anthropic account. If you don’t have one, you can create one during this step.

Step 3: Verify the Installation

After authentication, you should see the Claude Code REPL in your terminal. Type a simple prompt to confirm everything works:

> What files are in this project?

Claude Code will scan your directory and list the files. If you see a response, you’re good to go.

Windows-Specific Notes

Claude Code runs natively on macOS and Linux. For Windows, you’ll need WSL (Windows Subsystem for Linux). Install WSL first, then follow the same steps inside your WSL terminal:

# Inside WSL
npm install -g @anthropic-ai/claude-code

Everything else works the same.

What Does Your First Session Look Like?

Your first real session should feel like a conversation with a developer who’s just joined your team. Claude Code reads your project files to build context. 71% of agentic coding users already use Claude Code for this kind of workflow (Pragmatic Engineer Survey, Feb 2026).

Starting a Session

Navigate to your project root and type claude:

cd ~/projects/my-app
claude

Claude Code automatically reads visible files in your project directory. It understands your tech stack, file structure, and dependencies.

Basic Commands to Try

Here are practical prompts to start with:

> Explain the architecture of this project

> Find all TODO comments in the codebase

> Write tests for the user authentication module

> Refactor the database connection to use connection pooling

Each prompt triggers Claude Code to read relevant files, reason about the task, and propose changes. You review and approve each file modification before it’s applied.

The first session is where most developers get hooked. Start with something small, like asking Claude Code to explain your project structure or write a test. You’ll quickly see how it reasons about code relationships across files.

Slash Commands

Claude Code includes built-in slash commands for common operations:

/init          Create a CLAUDE.md file for your project
/compact       Condense the conversation to save context
/clear         Reset the conversation entirely
/cost          Check token usage for the current session
/help          Show all available commands

The /init command is worth running immediately. It generates a CLAUDE.md file, which we’ll cover next.

How Does the Core Workflow Function?

The core workflow follows a plan-execute-review loop. Developers report 10-30% average productivity increases with AI coding tools (multiple studies including METR). But the real gains come from understanding how to work with the agent effectively, not just throwing prompts at it.

Plan Mode

Before Claude Code makes changes, you can ask it to plan first:

> Plan how you would add pagination to the blog posts API. Don't make changes yet.

This gives you a chance to review the approach before any code is written. It’s especially useful for larger tasks where you want to guide the direction.

[UNIQUE INSIGHT] Most tutorials skip plan mode entirely. In practice, it’s one of the most valuable features. Using plan mode for complex tasks prevents the agent from going down the wrong path and burning through your context window on wasted edits.

CLAUDE.md: Your Project’s AI Instructions

The CLAUDE.md file sits in your project root and tells Claude Code how to behave. Think of it as a README specifically for the AI agent. Here’s an example:

# CLAUDE.md

## Project Overview
This is a Next.js 14 app with TypeScript and Tailwind CSS.

## Code Style
- Use functional components with hooks
- Prefer named exports over default exports
- Use Zod for runtime validation

## Testing
- Run tests with `npm test`
- Use Vitest for unit tests
- Minimum 80% coverage for new code

## Commands
- `npm run dev` - Start development server
- `npm run build` - Production build
- `npm run lint` - Run ESLint

Claude Code reads this file at the start of every session. It’s the single most impactful thing you can configure.

File Operations and Git

Claude Code can create, edit, and delete files directly. It also handles git operations:

> Create a new API route for user profiles

> Commit the changes with a descriptive message

> Create a branch called feature/user-profiles and push it

Every file change requires your approval. You’ll see a diff before anything is written to disk.

What Features Set Claude Code Apart?

Beyond the basics, Claude Code has several features that competitors haven’t matched. Claude Opus 4.5 scored 80.9% on SWE-bench Verified, leading the benchmark leaderboard (vals.ai). That raw capability translates into practical features.

MCP Servers

MCP (Model Context Protocol) servers extend Claude Code’s capabilities. They let you connect the agent to external tools and data sources. Here’s how to set one up:

Add an MCP server configuration to your project’s .mcp.json file:

{
  "mcpServers": {
    "postgres": {
      "command": "npx",
      "args": ["-y", "@modelcontextprotocol/server-postgres"],
      "env": {
        "DATABASE_URL": "postgresql://localhost:5432/mydb"
      }
    }
  }
}

Now Claude Code can query your database directly when answering questions about your data layer. Other popular MCP servers connect to GitHub, Sentry, Linear, and file systems.

Hooks System

Hooks let you run custom scripts at specific points in Claude Code’s workflow. They’re defined in your settings and can automate repetitive tasks.

Common hook use cases include:

  • Pre-edit hooks: Run linting before Claude Code modifies files
  • Post-edit hooks: Auto-format code after changes are applied
  • Notification hooks: Send alerts when long-running tasks complete
{
  "hooks": {
    "postEditCommand": "npx prettier --write {{filePath}}"
  }
}

This ensures every file Claude Code touches gets formatted automatically. No more reviewing diffs that are 90% whitespace changes.

Subagents and Parallel Execution

For complex tasks, Claude Code can spawn subagents. These are independent agents that handle subtasks in parallel. Ask Claude Code to do something like:

> Refactor all API routes to use the new middleware pattern

It might spawn separate subagents to handle each route file simultaneously. This dramatically speeds up large-scale refactoring tasks.

IDE Integrations

While Claude Code is terminal-first, it integrates with popular editors:

  • VS Code: Official extension for inline interaction
  • JetBrains IDEs: Plugin support for IntelliJ, WebStorm, and others

These integrations let you trigger Claude Code from your editor while keeping the terminal workflow available.

What Does Claude Code Cost?

Claude Code is available across several pricing tiers, making it accessible whether you’re experimenting or using it professionally. Claude Code awareness grew from 31% to 57% in just nine months (JetBrains, Apr 2026), partly because the entry price is reasonable.

Pricing Tiers

PlanPriceBest For
Pro$20/monthIndividual developers, light usage
Max 5x$100/monthDaily professional use
Max 20x$200/monthHeavy usage, teams
APIPay-per-tokenCustom integrations, CI/CD

The Pro plan at $20/month is enough to evaluate whether Claude Code fits your workflow. Most professional developers end up on Max 5x for the higher usage limits.

What Are the Best Tips for Using Claude Code?

Getting productive with Claude Code isn’t just about knowing the commands. We’ve found that workflow habits matter more than feature knowledge. Here are practical tips from real usage.

Be Specific in Your Prompts

Vague prompts get vague results. Compare these two approaches:

# Too vague
> Fix the bug

# Much better
> The /api/users endpoint returns 500 when the email field is missing.
> Add input validation using Zod and return a 400 with a descriptive error message.

The second prompt gives Claude Code enough context to produce useful code on the first attempt.

Manage Your Context Window

Claude Code has a finite context window. Long sessions accumulate context and can slow down responses. Use these strategies:

  • Run /compact periodically to condense the conversation
  • Start new sessions for unrelated tasks
  • Use /cost to monitor token usage
  • Keep CLAUDE.md focused and concise

Use CLAUDE.md Aggressively

Don’t just list your tech stack. Include your team’s conventions, common pitfalls, and preferred patterns. The more specific your CLAUDE.md file is, the less you’ll need to repeat instructions.

Review Diffs Carefully

Claude Code gets things right most of the time. But “most of the time” isn’t “every time.” Always review the proposed changes before accepting them. This is especially important for security-sensitive code and database migrations.

The biggest mistake new users make is accepting every change without review. Treat Claude Code like a pull request from a junior developer: usually correct, occasionally off-base, and always worth a second look.

Frequently Asked Questions

Does Claude Code work with any programming language?

Claude Code supports all major programming languages. It handles Python, JavaScript, TypeScript, Rust, Go, Java, C++, and many others. The underlying model, Claude Opus 4.5, scored 80.9% on SWE-bench Verified (vals.ai), a benchmark based on real-world codebases spanning multiple languages.

Can I use Claude Code offline?

No. Claude Code requires an internet connection because it sends prompts to Anthropic’s API for processing. Your code is sent to the API during sessions. Anthropic states that code sent through the API is not used for model training.

Is Claude Code free?

Claude Code isn’t free, but the Pro plan starts at $20/month. A pay-per-token API option exists for developers who want more control over costs. Usage limits increase with higher-tier plans.

How does Claude Code compare to GitHub Copilot?

They serve different workflows. Copilot focuses on inline code completion inside your editor. Claude Code is an agentic tool that reads, writes, and reasons across your entire codebase. Claude Code was rated “most loved” at 46% versus Copilot’s 9% (Pragmatic Engineer Survey, Feb 2026).

Does Claude Code replace my IDE?

No. Claude Code is designed to complement your existing IDE, not replace it. It runs in the terminal alongside whatever editor you already use. VS Code and JetBrains integrations bring Claude Code’s capabilities into your editor if you prefer that workflow.

Wrapping Up

Claude Code is a terminal-based AI coding agent that works with your existing tools rather than replacing them. Installation takes minutes, and the learning curve is gentle if you already use the terminal.

Start with the basics: install it, run /init to create your CLAUDE.md, and try a simple task like explaining your project structure. From there, explore plan mode for complex changes, set up MCP servers for external integrations, and configure hooks to automate your formatting and linting.

The developer satisfaction numbers speak for themselves. 91% CSAT and a “most loved” rating of 46% don’t happen by accident. The best way to understand why is to try it yourself.