Free Guide

How to Set Up Claude Code CLI

by Sanskar Tiwari · @sanskarr.tiwari

Claude Code is Anthropic's AI coding agent that lives right in your terminal — it reads your codebase, writes & edits code, and runs commands for you. Here's the 5-minute setup.

The whole thing in one line: install one npm package, run claude in your project, sign in, and start describing what you want. That's it — no config, no boilerplate.

Want it as a PDF (and future guides)? Drop your email — I'll send it over. No spam.

Setup in 4 steps

1

Check you have the basics

Prereqs
  • Node.js 18 or newer (run `node -v` to check; grab it from nodejs.org if missing).
  • A terminal — Terminal/iTerm on Mac, or PowerShell / WSL on Windows.
  • A Claude account: a Pro/Max subscription OR an Anthropic API key.
2

Install Claude Code

Install
  • One command: `npm install -g @anthropic-ai/claude-code`
  • That installs the `claude` command globally so you can run it from any project.
  • Verify with `claude --version`.
3

Open it in your project

Start
  • In your terminal: `cd your-project` then just type `claude`.
  • First run asks you to sign in — pick your Claude subscription (easiest) or paste an API key.
  • You're now in an agent that can read your whole codebase.
4

Give it your first task

Build
  • Just describe what you want in plain English — "add a dark mode toggle", "fix this bug", "build me a landing page".
  • It reads files, makes a plan, edits code, and runs commands — you approve as it goes.
  • Tip: press Shift+Tab to enter Plan mode first if you want it to think before touching anything.

Once you're in — level up

Add a CLAUDE.md

Run `/init` and Claude writes a project guide it reads every session — your conventions, commands, and gotchas.

Use slash commands

`/clear` to reset context, `/review` to review a PR, and custom commands you define yourself.

Plug in MCP servers

Connect tools like your database, Figma, or Sentry so Claude can act on them directly.

Let it run real commands

It can run your tests, start your dev server, and screenshot the result to verify its own work.

You're set up if…

  • `node -v` shows 18 or higher.
  • `claude --version` prints a version number.
  • You signed in (subscription or API key) on first run.
  • You ran `claude` inside an actual project folder.
  • You tried one real task and approved its edits.
  • You ran `/init` to give it a CLAUDE.md.

One habit that changes everything: start every task in Plan mode (Shift+Tab). Let Claude lay out the plan, tweak it, then let it run. You'll ship way more, way faster.

Get the PDF + future guides

Drop your email and I'll send the printable PDF — plus the next guides as I make them.