ConsLabs
Claude Code
Fundamentals3 min read

Installation & Setup

Installing Claude Code, authenticating, and what happens the first time you run it on a project.

Getting Claude Code running takes a few minutes, and most of what you configure at this stage — authentication and an initial permission posture — carries forward to every session after.

Install

The most common path is a global npm install:

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

Platform-specific installers are also available for users who'd rather not depend on a Node.js toolchain just to run a CLI. Either way, the result is a single claude command on your PATH.

Authenticate

You can authenticate with either an Anthropic Console API key (billed per token, the same way the API is) or by logging in with a Claude subscription. Both work the same way once set up; the choice mostly comes down to whether you already pay for API usage elsewhere or prefer a flat subscription. The login flow is interactive — run claude and follow the prompt the first time.

First run on a project

Run claude from inside a project's root directory, not from your home folder — it scopes its understanding of "the project" to the directory it was started in (and subdirectories below it).

On a fresh project, it can scan the codebase and offer to generate a starting project memory file — a CLAUDE.md summarizing the stack, structure, and any conventions it can infer (a test command it found in package.json, a linter config, an obvious directory layout). Treat this as a draft, not ground truth: skim it, correct anything wrong, and add the project-specific knowledge it couldn't infer from the files alone, like "never touch the legacy/ directory" or "always run migrations before tests."

Choosing an initial permission posture

The first time it needs to edit a file or run a command, you'll be asked how much to allow without asking again. There's no universally correct answer here — it depends on how much you trust the specific task and codebase — but a reasonable default for a new project is to require confirmation for file edits and shell commands at first, then loosen it once you've seen how it behaves on your codebase specifically. The permission modes topic covers the full set of options and how to tune them per command.

Keeping it updated

Claude Code ships updates frequently — new tools, behavior refinements, and underlying model improvements all land this way. Re-running the install command pulls the latest version; there's no reason to pin to an old one unless you've hit a specific regression worth reporting.

With it installed, the next few topics cover the things that load automatically every session — starting with project memory.