Install in one line
The native installer is the recommended way to install Claude Code. It installs the claude command and keeps it up to date automatically.
curl -fsSL https://claude.ai/install.sh | bashirm https://claude.ai/install.ps1 | iexPrefer a package manager? Homebrew works too (brew install --cask claude-code), but then you update it yourself. Verify the install with:
claude --version
claude doctor # checks your install and configurationSign in and open a project
Claude Code works on the folder you start it in. Always cd into your project first:
cd ~/code/my-app
claudeThe first run opens a browser to sign in with your Claude subscription or Console account. You can switch accounts later with /login.
Clone any small open-source repo and practice there. Reading an unfamiliar codebase is one of the best first uses of Claude Code, and you can't break anything that matters.
Your first three prompts
Start by exploring before you change anything. Good first prompts:
give me an overview of this codebase
how is authentication handled here? point me to the key files
what's the command to run the tests, and do they pass right now?Then make a small, checkable change:
Notice what Claude did after editing: it ran the command to prove the change works. You'll want that pattern everywhere.
Shortcuts that make you fast
| Input | What it does |
|---|---|
/ | Slash commands and skills: /help, /clear, /compact, /model… |
@ | Mention a file or folder to pull it into context: @src/auth/session.ts |
! | Shell mode: runs a command directly and adds its output to context |
| Esc | Interrupt Claude (work so far is kept) |
| Esc Esc | With an empty prompt: open the rewind menu |
| Shift+Tab | Cycle permission modes |
| Ctrl+R | Search your prompt history |
| Ctrl+V | Paste an image, such as a screenshot of a bug |
? | On an empty prompt: shortcut help |
You want Claude to look at a specific file, src/app.ts. What do you type in the prompt to reference it?
Starting, continuing, resuming
claude # new interactive session
claude "explain this repo" # start with a prompt
claude -c # continue your most recent conversation here
claude -r # pick an earlier session to resumeInside a session, /resume opens the same session picker. Sessions are saved locally, so closing your terminal doesn't lose your work.
Check your understanding
Which folder does Claude Code work on?
claude. Always cd into the project first.What does the ! prefix do in the prompt?
Which command continues your most recent conversation in the current folder?
-c / --continue picks up your latest session there. -r / --resume lets you choose an older one.After making a change, what's the habit you want Claude to show?
What does pressing Esc twice on an empty prompt do?