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.

macOSOpen Terminal, then run the official install script.
WindowsOpen PowerShell or Windows Terminal, then run the one-line PowerShell command.
LinuxOpen any shell, then run the official install script.
Same agent on every platform. Only the terminal and the installer line differ. The npm method works on all three if you have 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 kitstarter robot standing beside an open shipping box, unpacked and ready to work
Installed is not configured. The agent is out of the box, but it has no rules yet.

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. It is the first of ten power moves most beginners never find.
  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? The simplest way is the native installer: on macOS or Linux run the install script in your terminal, on Windows run the PowerShell command. You can also install it as a global npm package with npm install -g @anthropic-ai/claude-code, which needs Node.js 22 or later. Then run claude in a project folder and log in.

Do I need Node.js to install Claude Code? Only if you use the npm install method, which requires Node.js 22 or later. The native installer and the desktop app do not require Node. If you are new to this, the native installer is the least fussy path.

Is Claude Code free? Installing it is free, but using it needs a paid Claude plan (Pro or Max) or pay-per-token API access. There is no free tier for Claude Code itself.

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 · $25 $50Read the docs