Skip to content
ANISH
SINGH.
0%
Back to Refinery
setupCC

Claude Code CLI Setup.

Complete Claude Code CLI setup — Mac and Windows, zero to shipping in one page.

Reel coming soon

Claude Code CLI Setup

What this fixes
  • No idea where to start with Claude Code
  • Installation errors nobody explains
  • Authentication confusion
  • Can't open or start projects

Prerequisites

You need three things before you start: Node.js 18 or newer, a terminal app, and an Anthropic account at console.anthropic.com.
Check your Node version
$node --version
Install Node via HomebrewmacOS

If you don't have Node.js yet

$brew install node
Install Node via wingetWindows

If you don't have Node.js yet

$winget install OpenJS.NodeJS.LTS

Install Claude Code

One command. Takes about 30 seconds.
Install globally
$npm install -g @anthropic-ai/claude-code
Verify installation
$claude --version

Authenticate

Run claude in any directory. It opens your browser to sign in with your Anthropic account. Once you approve, the CLI stores the token locally. You only do this once.
Start authentication
$claude

Open an existing project

Navigate to your project folder and run claude. On first run it reads your codebase, picks up any CLAUDE.md instructions, and is ready to work.
Open a project
$cd your-project && claude

Start a new project

Create a folder, open Claude Code inside it, and tell it what to build. It handles the rest — scaffolding, dependencies, file structure.
Create and open new project
$mkdir my-project && cd my-project && claude

Recommended first config

Once inside Claude Code, run /config to set your preferred theme and model. Run /help to see all available commands. The defaults work fine — tweak later as you learn the tool.
Open configuration
$/config
See all commands
$/help

Common setup errors

Most setup issues fall into four buckets.
Node version too old — update itmacOS

You need Node 18+. Check with node --version.

$brew upgrade node
npm permission error on MacmacOS

If you get EACCES errors during install

$sudo npm install -g @anthropic-ai/claude-code
Auth token expired

Just run claude again — it re-authenticates automatically

$claude
Next up

Want more resources?

Follow me on Instagram. New reels every week with a keyword in the caption.

Browse all resources