Claude Code is not a code autocomplete tool. It is an agentic coding assistant — a program that can read your entire project, understand its architecture, make multi-file edits, run terminal commands, write and execute tests, create pull requests, and carry on a conversation about all of it in plain English. If you have spent time with GitHub Copilot or Cursor, Claude Code occupies a different category: less about line-by-line suggestions and more about delegating entire tasks to an AI colleague who can see everything you can see.

This guide covers everything you need to get from zero to productive: installation on every major platform, authentication options, your first real session, the essential commands, and the workflows that experienced Claude Code users rely on daily. By the end, you will have a working setup and a clear mental model of how to use it effectively.

What Claude Code Can Do

Before diving into setup, it is worth being precise about Claude Code's capabilities, because the marketing language around AI coding tools tends toward vagueness. Claude Code can: read and understand your entire codebase without you manually adding context; edit files across multiple directories in a single operation; run shell commands, build scripts, and test suites; interact with Git — creating branches, writing commit messages, resolving merge conflicts, and opening pull requests; search the web for documentation; and maintain persistent memory about your project across sessions through a special file called CLAUDE.md.

It is available in five environments: the terminal CLI (the most powerful and flexible), VS Code, JetBrains IDEs, a desktop application, and a web interface. All five connect to the same underlying engine, so your configuration, CLAUDE.md files, and MCP server connections work across all of them. This guide focuses on the terminal CLI, which unlocks the full feature set.

Step 1: Installation

Installation is a single command on macOS, Linux, and Windows Subsystem for Linux. Open your terminal and run:

bash
curl -fsSL https://claude.ai/install.sh | bash

On native Windows, use PowerShell:

powershell
irm https://claude.ai/install.ps1 | iex

Or Windows CMD:

cmd
curl -fsSL https://claude.ai/install.cmd -o install.cmd && install.cmd && del install.cmd

If you prefer a package manager, Homebrew works on macOS and Linux (brew install claude), and WinGet works on Windows (winget install Anthropic.Claude). Native installations update automatically in the background, so you will always be on the latest version without any manual intervention. Linux users on Debian, Fedora, RHEL, or Alpine can also install via apt, dnf, or apk respectively — check the official documentation for the repository configuration.

One note for Windows users: Git for Windows is strongly recommended. Without it, Claude Code falls back to PowerShell as its shell tool, which limits some capabilities. WSL users do not need Git for Windows separately.

Step 2: Authentication

Claude Code requires an account. When you run the claude command for the first time, you will be prompted to log in. You have four authentication options:

The simplest option for individual developers is a Claude subscription — Pro, Max, Team, or Enterprise. These plans give you access to Claude Code as part of your existing subscription with no additional API costs. The Max plan is particularly well-suited for heavy Claude Code usage, as it includes higher usage limits.

If you prefer pay-as-you-go pricing, a Claude Console account (Anthropic's API platform) works via pre-paid credits. On first login, Claude Code automatically creates a dedicated workspace in the Console for centralized cost tracking, which is useful for teams that want to monitor AI spending.

Enterprise users can authenticate through Amazon Bedrock, Google Vertex AI, or Microsoft Foundry, which routes Claude Code through your existing cloud provider agreement. This is the preferred option for organizations with data residency requirements or existing cloud commitments.

bash
claude
# You will be prompted to log in on first use

/login
# Use this command to switch accounts later

Once authenticated, your credentials are stored locally and you will not need to log in again. To switch accounts or authentication methods later, use the /login command from within any Claude Code session.

Step 3: Your First Session

Navigate to any project directory and start Claude Code:

bash
cd /path/to/your/project
claude

You will see a welcome screen with your session information, recent conversations, and the latest Claude Code updates. The interface is a conversational terminal — you type natural language requests and Claude Code responds, asks clarifying questions, proposes changes, and waits for your approval before modifying anything.

A good first command is simply asking Claude Code to explain your project:

bash
what does this project do?

Claude Code will read your files and provide a summary. This is genuinely useful for onboarding to an unfamiliar codebase — it can explain architecture patterns, identify the main entry points, describe the data models, and answer follow-up questions about specific components. It reads your project files as needed without requiring you to manually add context.

"Claude Code always asks for permission before modifying files. You can approve individual changes or enable Accept All mode for a session when you trust the direction of the work."

— Claude Code Documentation

Step 4: Making Code Changes

The core workflow is straightforward: describe what you want in plain English, review the proposed changes, and approve or reject them. Claude Code will find the relevant files, understand the context, implement the change, and run tests if they exist. A simple example:

bash
add input validation to the user registration form

Claude Code will locate the registration form component, understand the existing validation patterns (if any), implement the validation, and show you a diff before making any changes. You can approve the change, ask for modifications, or reject it entirely. This approval loop is the key safety mechanism — Claude Code never makes changes without your explicit consent, unless you have enabled Auto-Accept mode for the session.

For larger tasks, the workflow is the same but the scope is broader. You can ask Claude Code to refactor an entire module, migrate from one framework to another, or implement a complete feature. It will break the work into steps, show you each change, and maintain context across the entire operation.

Step 5: Git Integration

Claude Code makes Git operations conversational. Instead of remembering the exact flags for git log --oneline --graph --decorate, you can just ask:

bash
what files have I changed?
commit my changes with a descriptive message
create a new branch called feature/user-auth
show me the last 5 commits
help me resolve the merge conflicts in auth.ts

When you create a pull request using the gh pr create command (or by asking Claude Code to do it), the session is automatically linked to that PR. You can return to it later using claude --from-pr <number> or by pasting the PR URL into the /resume picker. This is particularly useful for code review workflows — you can ask Claude Code to review your own changes before submitting, or to explain the changes in a PR you are reviewing.

Essential Commands Reference

These are the commands you will use every day:

claude — Start an interactive session in the current directory. This is your main entry point for all Claude Code work.

claude "fix the build error" — Run a one-time task and exit. Useful for quick fixes without starting a full interactive session.

claude -p "explain this function" — Run a one-off query and exit immediately. The -p flag (print mode) is useful for scripting and piping Claude Code output to other tools.

claude -c — Continue the most recent conversation in the current directory. Picks up exactly where you left off, with full context.

claude -r — Resume a previous conversation from a list. Useful when you have multiple ongoing sessions across different projects.

/clear — Clear the conversation history within a session. Use this when you want to start a fresh context without exiting.

/help — Show all available commands. Worth running once when you first start to see what is available.

Shift+Tab — Cycle through permission modes. The first press switches to Auto-Accept mode (Claude makes changes without asking); the second press switches to Plan Mode (Claude only reads and plans, never writes).

Plan Mode: Safe Exploration

Plan Mode is one of Claude Code's most underused features. When you activate it (Shift+Tab twice, or by starting with claude --permission-mode plan), Claude Code operates in read-only mode — it can analyze your codebase, ask clarifying questions, and produce a detailed plan, but it cannot make any changes. This is ideal for exploring an unfamiliar codebase, planning a complex refactor, or reviewing code without any risk of unintended modifications.

bash
claude --permission-mode plan

I need to refactor our authentication system to use OAuth2. Create a detailed migration plan.

Claude Code will analyze the current implementation and produce a comprehensive plan. You can refine it with follow-up questions, then press Ctrl+G to open the plan in your default text editor for direct editing before Claude proceeds. When you accept a plan, Claude Code automatically names the session from the plan content, making it easy to find later.

CLAUDE.md: Persistent Instructions

The most powerful configuration feature in Claude Code is the CLAUDE.md file. Create this file in your project root (or in ~/.claude/ for global instructions) and Claude Code will read it at the start of every session, giving it persistent context about your project without you having to re-explain it each time.

A good CLAUDE.md file typically includes: the project's purpose and architecture overview; coding conventions and style preferences; which commands to run for building, testing, and linting; any important context about the codebase that is not obvious from the files themselves; and specific instructions for how you want Claude Code to behave (for example, 'always run tests after making changes' or 'never modify the legacy/ directory without asking').

markdown
# Project: E-commerce Platform

## Architecture
React frontend + Node.js API + PostgreSQL. Auth via JWT stored in httpOnly cookies.

## Commands
- Build: pnpm build
- Test: pnpm test
- Lint: pnpm lint

## Conventions
- Use TypeScript strict mode
- All API routes must have input validation
- Write tests for any new utility functions

## Important
- Never modify the payments/ directory without explicit confirmation
- The legacy/ directory is read-only

Claude Code also supports auto-memory: if you ask it to remember something ('remember that we use Zod for all validation'), it will write that information to a memory file that persists across sessions. This is useful for project-specific conventions that emerge during development and that you want Claude Code to apply consistently going forward.

Pro Tips for Getting the Most Out of Claude Code

Be specific about what you want. 'Fix the bug' is less useful than 'There is a bug where users can submit the registration form with an empty email field — fix it and add a test.' The more context you provide upfront, the better the result and the fewer clarifying questions Claude Code needs to ask.

Let Claude explore first. For complex tasks, ask Claude Code to explain its understanding of the relevant code before making changes. This surfaces misunderstandings early and gives you a chance to correct them before any edits are made.

Use Plan Mode for big changes. Any refactor that touches more than a handful of files is a good candidate for Plan Mode. Review the plan carefully, ask questions, and only proceed when you are confident in the approach.

Keep CLAUDE.md updated. Treat it like living documentation. When you establish a new convention or make an architectural decision, add it to CLAUDE.md so Claude Code applies it consistently in future sessions.

Claude Code is most effective when you treat it like a capable colleague rather than a search engine. Give it context, ask for explanations, push back on approaches you disagree with, and iterate. The conversational interface is not a limitation — it is the mechanism that makes complex, multi-step tasks tractable.