TL;DR
If you've been using a chat assistant in a browser tab and copy-pasting code back and forth, Claude Code is a different shape of tool: it runs in your terminal (or IDE, desktop app, and browser), reads your whole codebase, edits files, and runs commands for you. This guide gets you from zero to a working first session and gives you a lookup table for everyday tasks.
Key points:
- Claude Code is an agentic coding tool that works directly in your project, not a copy-paste chat window.
- Install it, run
claude, log in, and let it read your codebase, no manual context-pasting required.
- It always asks permission before editing files, and saves conversations locally so you can resume them.
- The mental shift from chat: describe the outcome in plain language and let Claude find files, make edits, and run tests.
Before you begin
Prerequisites: A terminal, a code project to work in, and a Claude subscription (Pro, Max, Team, or Enterprise), a Claude Console account, or access through a supported cloud provider.
Time required: About 15 minutes for first session.
Outcome: Claude Code installed, authenticated, and making its first reviewed code change.
What changes when you move from a chat tab
A browser chat assistant works on text you paste in and gives text back. Claude Code, per its overview docs, is an agentic coding tool that "reads your codebase, edits files, runs commands, and integrates with your development tools." Three practical differences matter on day one:
- No manual context-pasting. Claude Code reads your project files as needed. You don't have to paste files or describe your folder layout, just ask your question in the project directory.
- It acts, with your approval. Instead of returning a snippet for you to apply, Claude Code finds the right file, shows the proposed change, and asks before writing it.
- Sessions persist. Conversations are saved locally, so a task can span multiple sittings. You resume instead of re-explaining.
It also runs in more places than a terminal: the same engine backs the VS Code and JetBrains extensions, a desktop app, and the web at claude.ai/code. Your CLAUDE.md, settings, and MCP servers carry across all of them.
Step 1: Install and start your first session
Pick an install method that does not pipe a remote script into your shell. The Quickstart documents Homebrew (macOS) and WinGet (Windows), plus Linux package managers:
# macOS (Homebrew). 'claude-code' tracks the stable channel.
brew install --cask claude-code
# Windows (WinGet, run in PowerShell)
winget install Anthropic.ClaudeCode
# Linux: install via apt, dnf, or apk
# See https://code.claude.com/docs/en/setup#install-with-linux-package-managers
Then start a session inside any project and log in when prompted:
cd /path/to/your/project
claude
On first run you'll be prompted to log in (the browser flow for a subscription or Console account). After that your credentials are stored and you won't log in again. Inside the session, type /help to list commands or /login to switch accounts.
Note on updates: Homebrew and WinGet installs do not auto-update. Run brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode periodically for the latest features and security fixes.
Step 2: Let Claude read the codebase, then make a change
The fastest way to feel the difference from a chat tab is to ask Claude to explain your project, then have it make a real edit. These prompts are straight from the Quickstart and Common Workflows recipes:
# Understand the project (Claude reads files itself)
give me an overview of this codebase
what technologies does this project use?
explain the main architecture patterns used here
# Make a reviewed change
add a hello world function to the main file
# Use Git conversationally
what files have I changed?
commit my changes with a descriptive message
create a new branch called feature/quickstart
When you ask for a change, Claude Code finds the file, shows the proposed edit, and asks for approval before writing. Press Shift+Tab to cycle permission modes, including a plan mode that proposes changes without touching disk until you approve.
If you want to seed persistent project instructions, ask Claude about setting up a CLAUDE.md file (a markdown file in your project root that Claude reads at the start of every session) to record coding standards and architecture decisions.
Common tasks mapped to Claude Code
If your instinct from a chat tool is to paste code and ask "how do I do X," here is the Claude Code equivalent. All prompt patterns below are documented in the Common Workflows and Quickstart guides.
| What you want to do |
Claude Code workflow |
| Understand an unfamiliar codebase |
cd into the project, run claude, ask give me an overview of this codebase |
| Find where a feature lives |
find the files that handle user authentication |
| Fix a bug from an error |
I'm seeing an error when I run npm test, then ask for and apply a fix |
| Refactor legacy code |
refactor utils.js to use modern JavaScript features while maintaining the same behavior |
| Add tests |
add tests for the notification service, then run the new tests and fix any failures |
| Review your own changes |
review my changes and suggest improvements |
| Create a pull request |
create a pr for my changes |
| Update docs |
add JSDoc comments to the undocumented functions in auth.js |
| Include a specific file in context |
Explain the logic in @src/utils/auth.js (use @ to reference files/dirs) |
| Work from a screenshot or mockup |
Drag/drop or paste an image, then Generate CSS to match this design mockup |
| Run a one-off query without a session |
claude -p "explain this function" |
| Continue your last conversation |
claude --continue (or /resume inside a session) |
| Pick from past conversations |
claude --resume (shell) |
| Review changes before any edits |
claude --permission-mode plan, or press Shift+Tab mid-session |
| Pipe shell output into Claude |
git log --oneline -20 | claude -p "summarize these recent commits" |
Essential commands cheat sheet
# Shell commands (run from your terminal)
claude # Start interactive mode
claude "task" # Run a one-time task
claude -p "query" # Run one-off query, then exit
claude -c # Continue most recent conversation here
claude -r # Resume a previous conversation
# Session commands (run inside Claude Code)
/clear # Clear conversation history
/help # Show available commands
/exit # Exit Claude Code (or Ctrl+D)
Prompting habits that transfer (and ones to drop)
The general "be specific" habit from chat tools carries over, the Quickstart's pro tips reinforce it: "fix the login bug where users see a blank screen after entering wrong credentials" beats "fix the bug." A few Claude-Code-specific habits:
- Let Claude explore before editing. Ask
analyze the database schema first; you don't need to hand it the file.
- Break big tasks into numbered steps in a single message; Claude works through them in order.
- Use
@ references instead of pasting file contents, it pulls in the file (and nearby CLAUDE.md context) directly.
- Drop the "here's my code" preamble. In the project directory, Claude already has access; describe the goal instead.
- Type
/ to see all available commands and skills, and use Tab for completion and ↑ for history.
Troubleshooting
Common first-run issues
Login or authentication problems: Make sure you have a Claude subscription, Console account, or supported cloud-provider access. Re-run /login inside a session to re-authenticate; credentials are stored after a successful login.
claude: command not found after install: Open a new terminal so your PATH refreshes, then run claude again. If you installed via Homebrew or WinGet, confirm the install completed without errors.
"No conversation found to continue": claude --continue only resumes a session that exists in the current directory. Use claude --resume to pick from a list, or start a fresh session with claude.
Claude won't edit a file: By design it asks before modifying files. Approve the proposed change, or switch out of plan mode with Shift+Tab if you're in a review-only mode.
On an outdated version: Homebrew and WinGet installs don't auto-update. Run brew upgrade claude-code or winget upgrade Anthropic.ClaudeCode.
Working safely from day one
- Review before approving. Claude Code asks permission before modifying files. Read the diff it shows before saying yes, especially for wide-reaching refactors.
- Be deliberate with automation. "Accept all" mode and non-interactive
claude -p runs in scripts or CI skip the per-change prompt, useful, but reserve them for steps you trust.
- Know what it reads and stores. Claude Code reads project files to build context and saves conversation history locally so you can resume sessions. Treat a project directory you point it at as in-scope.
Next steps
Once your first session works, go deeper with the official guides:
- Best practices and common workflows for everyday patterns.
- The overview for using Claude Code across VS Code, JetBrains, desktop, and web with shared settings.
- Ask Claude itself: it has access to its own docs, so try
what are the limitations of Claude Code? or how do I use MCP with Claude Code?
Explore more in the guides collection.