Claude Code is Anthropic’s AI coding agent that runs in your terminal — you give it a task in plain English and it reads your project, edits files, runs commands, and hands back a result you review. This guide walks through how to use Claude Code from a standing start: install it, connect an account, and get real work done without getting lost.
What you need first
You’ll want Node.js installed (for the npm route), a terminal, and a Claude account. Claude Code comes with a Claude Pro or Max subscription, or you can run it against the Anthropic API and pay per token. Either works — pick whichever matches how much you expect to use it.
How to install Claude Code
The quickest path is npm:
npm install -g @anthropic-ai/claude-codeThat installs the claude command globally so you can run it from any project. Anthropic also ships native installers and package-manager options (Homebrew, WinGet, signed Linux repos) if you’d rather not use npm — the official Claude Code docs list the current options for macOS, Windows, and Linux. Once it’s installed, cd into a project and run claude to start. The first run walks you through signing in.
Your first task
Open a project folder and launch it:
cd my-project
claudeNow just describe what you want in plain language — “explain how auth works in this app,” or “add input validation to the signup form and update the tests.” Claude Code reads the relevant files first, then tells you what it plans to do. It edits files and can run commands (installing a package, running your test suite), showing you each change as a diff you approve. Start small on a real repo so you get a feel for how it proposes changes before you turn it loose on anything big.
The core workflow: plan, act, review
The habit that makes Claude Code click is treating it like a fast junior who shows their work. For anything non-trivial, let it plan first — it lays out the steps before touching code, so you can correct course cheaply. Then it acts, making edits and running commands. Then you review the diffs and either accept or push back. You stay the reviewer; it does the typing. Reading the diffs matters — that’s where you catch a wrong assumption before it ships.
Features worth knowing early
A few things separate “I tried it once” from “I use it daily”:
- Subagents. Claude Code can spin up background agents for side jobs — a code review, a long search — so your main session keeps moving while they run.
- MCP (Model Context Protocol). Connect external tools and data sources so the agent can reach your database, issue tracker, or docs. New to this? Our beginner’s guide to MCP explains it.
- Slash commands. Built-ins like a code-review command run structured tasks on demand instead of you re-explaining them each time.
- It runs where a GUI can’t. Because it’s terminal-native, you can call it from scripts, git hooks, and CI.
A few tips to save yourself pain
Commit before big changes so you can roll back cleanly. Be specific — “fix the bug” gets vague results; “the signup form accepts empty emails, add validation and a test” gets a real fix. Keep tasks scoped; a focused request beats one giant instruction. And watch your usage: agentic runs burn tokens quickly, so a heavy session can move faster than your plan’s limits expect.
Where to go next
Once you’re comfortable, the natural question is whether an editor-based tool suits you better — that’s the Claude Code vs Cursor debate. For the wider landscape, see our best AI coding tools in 2026 roundup, and the Coding with AI hub for what’s new each week.
Last updated: July 2026 · Geek Source Codes editorial team. Commands and install paths can change — the official Claude Code documentation is the source of truth.