3

Claude Code

Claude Code: Getting Started

A step-by-step guide to installing and using Claude's coding assistant

Claude Code is an AI that helps you write software. Instead of a chat window in your browser, it lives in your terminal (the text-based command interface on your computer) and works directly with your project files. You describe what you want in plain English, and it reads your code, writes new code, runs commands, and fixes bugs. Don't worry if you've never used a terminal before — we'll walk through it.

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 + Space to open Spotlight, type Terminal, and press Enter.
  • Windows: Press the Windows key, type PowerShell, and press Enter.
The terminal might look intimidating at first, but you only need a handful of commands. You won't break anything by typing the wrong thing — the worst that happens is an error message.

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 .pkg file and follow the installer
  • Windows: Run the downloaded .msi file 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.
Node.js also installs npm (Node Package Manager) — a tool that lets you install programs built by other developers. We'll use it in the next step.

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 -g means "install globally" — it makes Claude Code available from anywhere on your computer
If you get a "permission denied" error on Mac, try adding 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 claude and 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")
Think of CLAUDE.md as a persistent system prompt for your codebase. You write it once and Claude remembers it every time.
Try this now

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