Module 3 of 6

Installing and Starting a Claude Code Session

This module walks through everything you need to go from "never used Claude Code" to running your first productive session: installing the CLI, authenticating, launching it in a project, and the handful of commands you'll use constantly.

Before you start: Claude Code runs in a terminal. If you've never used a terminal (Command Prompt, PowerShell, or a Unix shell), that's okay — every command below is copy-paste ready. You don't need to understand the terminal deeply to use Claude Code effectively.

Step 1 — Prerequisites

Claude Code is a command-line tool, so you'll need two things installed first:

Node.js 18 or later

Claude Code runs on Node.js. Download the LTS installer from nodejs.org and run it — it includes the npm package manager Claude Code installs through.

A terminal app

Windows: PowerShell or Windows Terminal (both pre-installed). macOS: Terminal.app or iTerm2. Linux: your default shell. Any of these will work.

Check what's already on your machine before installing anything new:

node --version
npm --version

If both commands print a version number (Node 18+), you're ready for the next step. If you see "command not found" or a version below 18, install/upgrade Node.js first.

Step 2 — Install Claude Code

With Node.js in place, install the Claude Code CLI globally via npm:

npm install -g @anthropic-ai/claude-code

This gives you a new claude command available from any terminal window, in any folder. Confirm it installed correctly:

claude --version

Corporate machine? If npm install -g fails with a permissions error, avoid sudo npm install -g — it can leave your global npm folder owned by root and cause problems later. Check with your IT/DevEx team for the approved install path (a company-managed Node version manager, an internal package mirror, or a documented workaround) instead of forcing it.

Step 3 — Authenticate

The first time you run claude, it will prompt you to sign in. Navigate to a project folder and start it:

cd path/to/your/project
claude

Claude Code will open a browser window (or print a URL) so you can log in with your Anthropic/Claude account — typically your normal work single sign-on if your organization has one configured. Once you approve access, the terminal picks up the session automatically and you're dropped into an interactive Claude Code prompt.

  • You only need to authenticate once per machine — it's remembered for future sessions.
  • If you use multiple machines, you'll authenticate separately on each one.
  • If your session ever expires or you switch accounts, running /login inside Claude Code re-triggers this flow.

Step 4 — Your first session

Claude Code works best when it's started inside the folder for the project you want help with — it reads that folder's files as context automatically. A typical first run looks like:

cd my-project
claude

You'll land in an interactive prompt where you can just type in plain English. Some safe first things to try:

Try typingWhat happens
What does this project do? Claude reads the folder and summarizes it — a good way to confirm it can see your files.
Summarize the README A low-risk, read-only request — great for getting a feel for response style.
/help Lists built-in slash commands available in this session.

Claude Code will ask for your permission before it does anything that changes files or runs commands on your machine — reading and answering questions is always safe to try first.

Step 5 — Basic usage patterns

Once you're comfortable poking around, here's the everyday loop most people settle into:

  1. Start Claude Code in your project folder with claude.
  2. Describe the task in plain language — "add a loading spinner to the login button," "explain why this test is failing," "find every place we call this API."
  3. Review what it proposes. Claude Code shows you the files it wants to change or the commands it wants to run before doing them (unless you've configured otherwise).
  4. Approve, tweak, or redirect. You can accept, ask for changes, or give it more context and try again.
  5. Exit anytime by typing exit or pressing Ctrl+C twice. Nothing is lost — you can resume the conversation later in the same folder.

A few commands worth knowing from day one:

CommandPurpose
claudeStart an interactive session in the current folder.
/helpSee available slash commands.
/clearStart a fresh conversation without restarting the app.
/login / /logoutSwitch accounts or sign out on a shared machine.
exit or Ctrl+C twiceEnd the session.

Where to go next: The Slash Commands & Skills module goes deeper on built-in and custom commands, and Writing Effective Prompts covers how to phrase requests so you get better results faster. Want to see the differences between clients hands-on first? Try the Try It playground.