Claude Code
Claude Code: Getting Started
A step-by-step guide to installing and using Claude's coding assistant
What's a terminal?
A terminal (also called "command line" or "command prompt") is a text-based way to control your computer. Instead of clicking icons, you type commands. It looks like a black or white window with a blinking cursor. Every computer has one built in.
- Mac: Press
Cmd + Spaceto open Spotlight, type Terminal, and press Enter. - Windows: Press the
Windows key, type PowerShell, and press Enter.
Step 1: Install Node.js
Claude Code is built with a technology called Node.js — it's a free program that runs JavaScript code on your computer. You need to install it first (one time only).
- Go to nodejs.org in your browser
- Download the LTS version (the one labeled "Recommended for Most Users")
- Mac: Open the downloaded
.pkgfile and follow the installer - Windows: Run the downloaded
.msifile and follow the installer. Check the box that says "Automatically install necessary tools" if you see it. - To verify it worked, open your terminal and type:
node --version - You should see a version number like
v20.x.x. If you see an error, try closing and reopening the terminal.
Step 2: Install Claude Code
Now that you have Node.js, you can install Claude Code with one command in your terminal:
- Type this and press Enter:
npm install -g @anthropic-ai/claude-code - Wait for it to finish (might take 30–60 seconds)
- The
-gmeans "install globally" — it makes Claude Code available from anywhere on your computer
sudo at the beginning: sudo npm install -g @anthropic-ai/claude-code — it will ask for your computer password.Step 3: Start Claude Code
- In your terminal, navigate to a project folder. For example:
cd ~/Documents/my-project - Type
claudeand press Enter - The first time, it will open your browser to sign in with your Anthropic account
- Once signed in, you're back in the terminal with Claude Code ready to go
cd stands for "change directory" — it's how you navigate folders in the terminal. ~ means your home folder (like /Users/yourname on Mac or C:\Users\yourname on Windows).Step 4: Try it out
Now you can talk to Claude Code in plain English. Here are some good first things to try:
- "What does this project do?" — Claude reads your files and gives you a summary
- "Create a simple webpage that says Hello World" — it creates the files for you
- "There's a bug — the button doesn't work when I click it" — it investigates and proposes a fix
- Claude Code shows you what it plans to change and asks for your approval before writing anything
Essential commands to know
While chatting with Claude Code, these built-in commands are helpful:
/help— see everything Claude Code can do/clear— start a fresh conversation/compact— if the conversation gets long, this summarizes it to free up space/cost— see how much you've spent this session
The CLAUDE.md file
If you create a file called CLAUDE.md in your project's main folder, Claude Code reads it automatically at the start of every session. It's like leaving a note for Claude about your project.
- What technology your project uses
- Coding conventions you follow ("use single quotes" or "write tests for every new function")
- Things to avoid ("don't modify the database schema" or "the auth system is fragile — be careful")
Install Node.js and Claude Code following the steps above. Navigate to any folder on your computer and type claude. Ask it "What files are in this folder?" to see it in action. Then try: "Create a simple HTML page with a button that counts how many times you've clicked it."