How to install Claude Code (and set it up so it behaves)

Installing Claude Code takes about two minutes. Setting it up so it does not guess, overbuild, and make a mess takes about five more. Almost everyone skips the second part.

The kitstarter robot with a download arrow, standing in for installing Claude Code

Claude Code is an AI coding agent that runs in your terminal. It reads your files, writes code, and runs commands, all from plain-language instructions. Getting it installed is quick. Getting it installed well, so it behaves like a careful builder instead of an eager one, is the part that decides whether you love it or fight it. We will do both.

Before you install

You need two things: a terminal (Terminal on macOS, PowerShell or Windows Terminal on Windows, any shell on Linux), and a paid Claude plan or API access. Installing is free, but Claude Code has no free tier for actually running it. If you plan to use the npm method below, you also need Node.js 22 or later.

Install Claude Code (pick one)

Option A, the native installer (easiest, no Node needed). On macOS or Linux, run the official install script from your terminal. On Windows, run the one-line PowerShell command from the docs. This is the least fussy path and the one to pick if you are new.

Option B, npm (if you already live in Node). With Node.js 22 or later installed, run:

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

Either way, once it is installed you start it the same way. Move into your project folder and run:

claude

It will walk you through logging in on first launch. That is the whole installation. You now have an AI agent in your terminal.

The 5 minutes everyone skips

Here is where most people stop, and it is exactly why so much AI output ends up messy. Out of the box the agent optimizes for producing output: it guesses what you meant, writes the biggest version, and calls things done before running them. Three quick moves fix the defaults.

Plan firstShift+Tab
Write rulesCLAUDE.md
Stay lean/clear /compact
Three habits that turn a reckless agent into a careful one.
  1. Use plan mode. Press Shift+Tab until the input says plan. The agent proposes the whole change without editing a file, and you approve first. Two minutes here saves hours of it building the wrong thing.
  2. Write a CLAUDE.md. Add a short CLAUDE.md file to your project with a few behavior rules: ask before building, make the smallest change that works, prove it runs. It loads every session, so you set the tone once.
  3. Keep the context lean. Use /clear between unrelated tasks and /compact before a big one, so it stays fast and never hits prompt is too long.

The one-command version

Writing those rules well takes iteration, so if you would rather not, that is exactly what kitstarter is. After Claude Code is installed, run:

npx kitstarter-cli

It drops in a tuned CLAUDE.md and a set of commands that make the agent ask before it builds, stay lean, and not look AI-made, for Claude Code, Codex, and Antigravity. You get the careful-builder setup without writing the rules yourself. Install Claude Code, then install the behavior. That is the whole calm path.

Common questions

How do I install Claude Code? Use the native installer (macOS/Linux script or the Windows PowerShell command), or npm install -g @anthropic-ai/claude-code with Node 22+. Then run claude and log in.

Do I need Node.js? Only for the npm method. The native installer does not need it.

Is Claude Code free? Installing is free; running it needs a paid Claude plan or API access.

Install it, then install the behavior

Run npx kitstarter-cli after Claude Code and your agent asks first, stays lean, and stops looking AI-made from session one.

Get the kit · $29Read the docs