Claude Code is Anthropic's command-line interface for working with Claude directly in your terminal. Not a chatbot. Not a plugin. A full development partner that reads your files, edits your code, runs commands, and remembers context across sessions.
This guide covers the three things you need to get productive fast: installation, the memory system, and the commands that matter.
Step 01Installation and first run
Claude Code runs anywhere Node.js does. One command installs it globally:
npm install -g @anthropic-ai/claude-code
claude --version
On first run, Claude Code will ask you to authenticate with your Anthropic API key. After that, you launch it by typing claude in any project directory:
cd ~/projects/my-app
claudeclaude "explain the auth flow in this project"
That's it. No IDE extensions to configure, no Docker containers to spin up. Type claude and start working.
Step 02The memory system: CLAUDE.md
This is what separates Claude Code from a regular AI chat. It has a persistent memory system built around CLAUDE.md files — markdown files that get loaded automatically every session.
Three layers of memory
| File | Scope | Use For |
|---|---|---|
| ~/.claude/CLAUDE.md | Global (all projects) | Your preferences, tools you use, communication style, global rules |
| project/CLAUDE.md | Per-project (checked in) | Architecture, conventions, tech stack, deployment workflow, team rules |
| .claude/CLAUDE.md | Per-project (personal) | Your notes about this project that shouldn't be in the repo |
Every time you start a session, Claude Code reads all three. This means you never have to repeat yourself. Put your preferences in the global file once, and they apply everywhere.
The fastest way to improve Claude Code is to write a good CLAUDE.md. It's the difference between a tool that asks questions and one that already knows the answers.
— Dovito Engineering
What belongs in CLAUDE.md
A good project CLAUDE.md includes:
- Tech stack — framework, database, ORM, deployment target
- Key commands — how to build, test, deploy, lint
- Architecture decisions — why things are the way they are
- File structure — where to find what
- Conventions — naming, formatting, patterns to follow
- Rules — things Claude should never do (e.g., "never force push to main")
# My Project ## Stack Next.js 15, TypeScript, Drizzle ORM, Neon PostgreSQL ## Commands npm run dev # Start dev server npm run build # Production build npm run test # Run tests ## Rules - Never modify migration files directly - Always use the existing auth middleware - Prefer server components over client
Auto-memory with /memory
Beyond CLAUDE.md, Claude Code can save notes to a memory directory that persists across sessions. Use the /memory command to save something you want it to remember:
# Tell Claude to remember something "Remember that the staging database is on a 2-hour delay from production" # Claude saves it to ~/.claude/projects/<project>/memory/
These memories are loaded every session. Over time, Claude Code builds a detailed understanding of your project, your team, and how you like to work.
Step 03Commands that matter
Claude Code has a handful of slash commands. Most of them you'll never use. Here are the ones that matter:
| Command | What It Does |
|---|---|
/help |
Show all available commands and keyboard shortcuts |
/clear |
Reset conversation context (keeps memory) |
/compact |
Summarize conversation to free up context window |
/cost |
Show token usage and estimated cost for the session |
/resume |
Continue from a previous session's conversation |
/vim |
Toggle vim-style keybindings for the input |
The ! prefix: run shell commands
Type ! before any command to run it in your shell without leaving Claude Code:
! npm run test
! git status
! docker ps
The output lands in the conversation context, so Claude can analyze test failures, git diffs, or error logs inline.
Keyboard shortcuts
These save more time than any command:
| Key | Action |
|---|---|
Esc |
Cancel current generation |
Tab |
Accept a file edit suggestion |
Shift+Tab |
Cycle through permission modes |
Ctrl+C |
Interrupt and return to input |
Up Arrow |
Recall previous message |
Step 04MCP servers: extending Claude Code
MCP (Model Context Protocol) servers give Claude Code access to external tools. A database, a CMS, a deployment pipeline, a project management system — anything with an API can become a set of tools Claude can call directly.
create_article with the title, content, and metadata — and here it is, published.
MCP servers are configured in ~/.claude/.mcp.json:
{ "mcpServers": { "my-cms": { "command": "node", "args": ["./dist/index.js"] } } }
Once configured, the tools appear automatically. No imports, no setup code. Claude knows what's available and when to use it.
Step 05Practical patterns
Here's how experienced users actually work with Claude Code day-to-day:
SummaryGetting started in 5 minutes
The whole setup:
Install it. Write a CLAUDE.md for your project. Learn the six commands above. That's the crash course.
Everything else — MCP servers, custom skills, hooks, subagents — builds on these fundamentals. Get them right first, and Claude Code becomes the most productive tool in your stack.
If you want to see how we use Claude Code to run an entire consulting operation — content creation, project management, client delivery — get in touch.