guide
CLI CLAUDE CODE / CRASH COURSE CLAUDE CODE INSTALL MEMORY COMMANDS PROJECTS

Claude Code Crash Course: Setup, Memory, and the Commands That Matter

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.

Installation and first run

Claude Code runs anywhere Node.js does. One command installs it globally:

Terminal
npm install -g @anthropic-ai/claude-code
Terminal
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:

Terminal
cd ~/projects/my-app
Terminal
claude
Terminal
claude "explain the auth flow in this project"
Tip: Claude Code works best when launched from your project root. It automatically reads your codebase structure to understand context.

That's it. No IDE extensions to configure, no Docker containers to spin up. Type claude and start working.

The 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")
CLAUDE.md
# 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:

Claude Code
# 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.

Commands 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:

Claude Code
! npm run test
Claude Code
! git status
Claude Code
! 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

MCP 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.

Real example: This article was created using a custom MCP server connected to our CMS. Claude Code called create_article with the title, content, and metadata — and here it is, published.

MCP servers are configured in ~/.claude/.mcp.json:

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.

Practical patterns

Here's how experienced users actually work with Claude Code day-to-day:

Common Mistake Better Approach
Writing vague requests like "fix the bug"
Be specific: "the login form 400s when email has a + in it"
Starting fresh every session
Keep CLAUDE.md updated so context carries over
Approving every file change without reading
Use permission modes to control what runs automatically
Using Claude Code only for writing code
Use it for debugging, code review, git, testing, docs

Getting started in 5 minutes

The whole setup:

1
npm install
1
CLAUDE.md file
6
Commands to know

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.