Claude Code basics

Install and first use of Anthropic’s coding CLI/agent — vs Claude chat; link to official docs.

Claude Code is Anthropic’s agentic coding tool: it can read a codebase, edit files, run commands, and work across your project. It is not the same as pasting code into Claude chat. Chat is a conversation; Claude Code is a development agent that lives next to your files (terminal, IDE, desktop, or web).

Official source of truth: Claude Code docs and the quickstart. Install steps below match those pages; if anything drifts, trust the official site.

Claude chat vs Claude Code

Claude chat Claude Code
Best for Writing, explaining, brainstorming Editing a real repo, running commands
Where it runs Browser / app chat Terminal, IDE, desktop, or web coding UI
Sees your project Only what you paste Can explore files you allow in the project

Open a terminal and run the command for your system. Prefer the native installer (auto-updates). Alternatives: Homebrew, WinGet — see the install / setup docs.

macOS, Linux, WSL:

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

Windows PowerShell (prompt often shows PS C:\):

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

Windows CMD (prompt often shows C:\ without PS):

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

Then open a new terminal and verify:

claude --version

You should see a version number (and usually “Claude Code”). We don’t hard-code a version here — it changes often.

Also useful:

  • macOS Homebrew: brew install --cask claude-code (manual upgrades; see docs)
  • Windows WinGet: winget install Anthropic.ClaudeCode
  • Desktop app / VS Code / JetBrains: linked from the overview if you prefer not to live in the terminal

Stuck? Troubleshoot install. On native Windows, Git for Windows is recommended so Bash-style tools work smoothly.

Basic usage

cd /path/to/your/project
claude

On first launch you’ll usually log in via the browser (subscription or Console). You can finish reading this lesson without installing; installing is optional practice.

Common first asks (after it starts):

  • “What’s the structure of this repo?”
  • “Where is authentication handled?”
  • “Explain this error: …” (paste a stack trace)

One-shot style (non-interactive) appears in the docs as claude -p "…". Learn interactive first.

Safety habits

  • Review diffs before you accept edits or commits — you’re still the author.
  • Don’t paste secrets (API keys, passwords, private keys, customer data) into prompts or logs.
  • Prefer a small test repo for your first session.
  • Treat tool use like agentic workflows: plan → act → observe → verify.

See also: Glossary — Claude Code.

Takeaway

Claude Code = coding agent in your project. Install via the official native script for your OS, run claude in a folder, ask about the repo, and review every change.

Try this

Without pasting any secrets: open the quickstart, skim install + “first session,” and write three questions you’d ask Claude Code about a repo you know.