Guide

How to install Claude Code (macOS & Windows)

How to install Claude Code (macOS & Windows)

Claude Code is Anthropic's coding agent that lives in your terminal: you point it at a project, describe a task, and it greps, edits, and runs commands on its own. Getting it installed takes about five minutes — the friction is usually one of three things: the right Node version, signing in, and a Windows quirk or two. This guide walks the whole path on both macOS and Windows, then shows how to keep the agent from disappearing under your other windows once it's running.

Install npm i -g Sign in /login Open a repo claude Give it a task it works
The whole path: install once, sign in once, then it's just claude inside any repo.

Before you start: prerequisites

You need three things in place:

Install on macOS

The one-liner is a global npm install:

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

Then confirm it landed:

claude --version

If your shell can't find claude afterward, your npm global bin directory isn't on your PATH — run npm config get prefix, and make sure that folder's bin is in your PATH (add it to ~/.zshrc). Anthropic also publishes a native installer script if you'd rather not go through npm; the official install docs have the current command, which is worth checking since it changes between releases.

Install on Windows

The command is identical — run it in PowerShell or Windows Terminal:

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

Claude Code runs natively on Windows now, so for most people that's all there is to it. If you hit odd path or shell behavior, the reliable fallback is WSL (Windows Subsystem for Linux): install a distro from the Microsoft Store, then run the same npm command inside it and use Claude Code from the Linux shell. WSL was the only supported route for a long time, so most older tutorials assume it — check the official docs for the current native requirements before you go the WSL way unnecessarily.

Sign in

Launch it for the first time by just typing:

claude

On first run it'll walk you through authentication. Type /login if it doesn't prompt automatically, and a browser window opens to connect your account. Here's the one decision that matters: a Claude subscription (Pro/Max) bundles Claude Code usage into your flat monthly fee, while an Anthropic Console login bills per token against API credits. Subscription is simpler if you already pay for Claude; Console gives you finer cost control. You can switch later.

Your first run

Change into a project you don't mind it touching, start it, and give it something small:

cd my-project
claude

Then describe a task in plain English — "add a health-check endpoint and a test for it," say. Claude Code will propose edits and commands; by default it asks before running anything that changes files or executes shell commands, so you approve each step the first few times until you trust it. Start in a git repo with a clean working tree so you can always git diff what it did and roll back if needed.

Keep the agent where you can see it

Here's the thing nobody warns you about: once Claude Code is doing real work, a single task can run for minutes, and it stops mid-way to ask permission or finishes while you've tabbed away to your editor or a browser. The terminal ends up buried, and the agent sits idle waiting on you. There are a few ways to handle that — from running it in the background to wiring up notifications so you stop babysitting it.

That last problem is exactly what Backgrind is built for: it wraps the same claude CLI you just installed — your login, your history, your config — in an always-on-top overlay window that floats over whatever you're doing, and flashes only when the agent needs a decision or finishes. If you'd rather skip the install entirely, it also ships a hosted agent (Grindy) with nothing to set up. Either way the install you just did is all you need to get started from the terminal today.