
Install Claude Code and Complete Your First Verified Session
Install Claude Code on macOS, Linux, Windows, or WSL, authenticate, inspect a repository, make a safe change, and verify it end to end.
Install Claude Code and Complete Your First Verified Session
Quick answer
Claude Code is an agentic development tool that can read a repository, edit files, run commands, and verify its work. Install it with Anthropic's native installer, run claude inside a project, authenticate in the browser, ask it to explain the project before changing anything, then make one small change and verify it with the project's tests.
The official Claude Code overview lists terminal, VS Code, JetBrains, desktop, web, and other interfaces. This course begins with the terminal because it exposes the complete workflow.
Step 1: install the CLI
Use the official command for your platform.
# macOS, Linux, or WSL
curl -fsSL https://claude.ai/install.sh | bash
# macOS with Homebrew
brew install --cask claude-code
# Windows with WinGet
winget install Anthropic.ClaudeCode
PowerShell uses a different installer:
irm https://claude.ai/install.ps1 | iex
Confirm the executable is available:
claude --version
Native installs update automatically. Package-manager installs generally require their package manager's update command. Treat copied installation commands as security-sensitive: verify the host and prefer the official quickstart.
Step 2: authenticate and choose the project boundary
Start in the repository you want Claude to access:
cd ~/projects/example-app
git status
claude
On first launch, complete authentication in the browser. Claude Code supports Claude subscriptions, Console/API accounts, and configured enterprise cloud providers. The working directory matters: it establishes the project Claude explores. Do not start from your home directory unless that broad scope is intentional.
Step 3: explore before editing
Your first prompt should produce a map, not a patch:
Explain what this repository does. Identify the runtime, main entry points,
test commands, build command, and any contributor instructions. Cite the files
you used. Do not edit anything.
Follow with a focused question:
Trace one request from the public HTTP route through validation, business logic,
and persistence. List uncertainties instead of guessing.
This establishes a habit used throughout the course: gather evidence, act, verify.
Step 4: make a bounded change
Choose a reversible task with a clear oracle:
Add a unit test for the calculator's divide-by-zero behavior. Match the existing
test style. Do not change production behavior. Run only the relevant test file
and report the exact command and result.
Review the proposed tool use and diff. In default permission mode Claude asks before sensitive actions. Never approve a command merely because it looks plausible; understand its target and blast radius.
Step 5: verify independently
After Claude reports success, inspect the evidence:
git diff --check
git diff
npm test -- calculator
git status --short
Use the equivalent commands for your stack. A green claim is not proof; command output, a clean diff, and behavior against acceptance criteria are proof.
Common installation problems
claude: command not found: restart the shell and verify the install directory is onPATH.- Windows shell syntax errors: confirm whether the prompt is PowerShell or Command Prompt.
- Authentication loops: run
/logininside Claude Code and confirm the intended account. - Claude sees the wrong files: exit, change to the repository root, and start a new session.
- Unsafe first task: begin with read-only exploration and a small test, not a deployment or migration.
Mastery check
You are ready to continue when you can launch Claude Code from a repository, explain the scope it can access, complete a read-only exploration, approve a bounded edit, and independently reproduce the verification result.
FAQ
Does Claude Code require an IDE?
No. The terminal CLI is full-featured. IDE, desktop, and web surfaces are alternative interfaces around the same core agent loop.
Should I install Claude Code globally with npm?
Follow the current official installer guidance. Anthropic now recommends native installation; older tutorials may show legacy package-manager commands.
Is Claude Code safe to run in any directory?
Its permissions reduce risk, but directory scope still matters. Start at the narrowest useful project root, inspect commands, and avoid exposing unrelated secrets.