Claude Code 101: Your Complete Getting Started Guide
Everything you need to know to install, configure, and start building with Claude Code — from your first command to advanced workflows.
What is Claude Code?
Claude Code is an agentic command-line tool built by Anthropic that brings Claude directly into your terminal. Unlike the web chat interface, Claude Code can read and write files, execute shell commands, search your codebase, and take multi-step actions autonomously — all without leaving your development environment.
Think of it as pairing with a senior engineer who has full visibility into your project. You describe what you need, and Claude Code figures out the steps: editing the right files, running the appropriate tests, and iterating until the task is done. The core command is simply
claude.
Claude Code is fundamentally different from autocomplete tools like Copilot. Instead of suggesting the next line, it acts as an autonomous agent: it understands your intent, forms a plan, and executes it across multiple files and commands. You remain in control — every write or shell command can be reviewed and approved before it runs.
Installation & Setup
Prerequisites
- Node.js 18 or higher
- npm or yarn package manager
- An Anthropic API key (get one at console.anthropic.com)
Install Claude Code globally with npm:
npm install -g @anthropic-ai/claude-code
Once installed, authenticate with your Anthropic account:
claude auth login
# Follow the browser prompt to authenticate
# Your session is saved locally
Verify the installation worked:
claude --version
Basic Commands
Claude Code has two main modes: an interactive REPL and one-shot task execution. Here are the commands you'll use every day:
| Command | Description |
|---|---|
claude |
Opens interactive REPL session |
claude "fix the bug" |
One-shot task execution |
/help |
Show all available slash commands |
/clear |
Clear conversation history |
/compact |
Summarize conversation to save context |
/model |
Switch between Opus / Sonnet / Haiku |
/status |
Show session info and token usage |
Key Features
Claude Code is more than a chat interface. Here's what makes it genuinely powerful for development work:
1 Agentic File Editing
Claude Code can read, write, and create files across your entire project. It understands the full context — imports, exports, types, function signatures — and makes precise edits rather than regenerating entire files. Every change is shown as a diff before it's applied.
2 Tool Use & Shell Commands
Beyond editing files, Claude Code can run shell commands: execute tests, install packages, start servers, run linters, or search the web. Configure
allowedTools
in settings to auto-approve specific commands without a confirmation prompt.
3 Deep Context Awareness
Reference files directly in prompts with @filename. Combine with CLAUDE.md — a project-level context file — to give Claude persistent instructions, conventions, and architectural context that survives across sessions.
4 MCP Integration
The Model Context Protocol lets you connect Claude Code to external tools: databases, APIs, Figma, GitHub, Linear, and more. Configure MCP servers in your settings and Claude gains native access to your entire toolchain.
Tips & Best Practices
Getting the most out of Claude Code is about communication and workflow habits, not just knowing the commands:
-
1
Start with small, focused tasks — "Fix the login bug" beats "improve the whole auth system".
-
2
Use /compact aggressively — On long sessions, context fills up fast. Compact before it gets slow.
-
3
Always review diffs before confirming writes — A 3-second review prevents most surprises.
-
4
Use CLAUDE.md for persistent project context — Put your conventions and architecture decisions there so you never repeat yourself.
-
5
Be specific about file paths in prompts — "Update Button in src/components/ui/Button.tsx" beats "update the button".
-
6
Match model to task complexity — Haiku for simple edits, Opus for architecture. Sonnet is the best default.
-
7
Configure allowedTools to reduce friction — Auto-approve trusted commands like npm test. Your workflow will feel dramatically smoother.