Claude Code Tutorial: Install It, Log In, and Ship Your First Task — Cesar Ayala
← All posts

Claude Code Tutorial: Install It, Log In, and Ship Your First Task

Claude Code is Anthropic's agentic coding tool that reads your repo, edits files, and runs commands from your terminal, IDE, desktop, or the web. Install it with `curl -fsSL https://claude.ai/install.sh | bash`, run `claude` in your project, and log in through the browser. It requires a Pro, Max, Team, Enterprise, or Console account.

What Claude Code is and where it runs

Claude Code is Anthropic’s agentic coding tool that reads your repo, edits files, and runs commands straight from your terminal, IDE, desktop app, or the web. Install it with curl -fsSL https://claude.ai/install.sh | bash, run claude inside your project, and log in through the browser. It needs a paid plan (Pro, Max, Team, or Enterprise) or an Anthropic Console account. The free Claude.ai plan does not include it.

The important mental model: Claude Code is not autocomplete. You describe a task in plain language, and it plans the work, edits across multiple files, runs commands, and checks its own output before handing it back to you. It works with git, so it can stage, commit, branch, and open pull requests. If you’re weighing it against an AI-native editor, see Claude Code vs Cursor.

The same engine ships in four places, and they share configuration. Whether you run it in the terminal (CLI), inside VS Code or JetBrains, in the Desktop app, or on the web, your CLAUDE.md, your settings, and your connected MCP servers carry across all of them. Learn it once in the terminal and everything you configure follows you into the IDE. The official docs treat the terminal as the reference surface, so that is where this tutorial starts.

Terminal (CLI)
IDE (VS Code / JetBrains)
Desktop app
Web

Install Claude Code: the native one-liner (plus Homebrew, WinGet, and npm)

The recommended install is the native installer. It has no Node.js dependency and it auto-updates in the background, so you are always on a recent build.

On macOS, Linux, or WSL:

curl -fsSL https://claude.ai/install.sh | bash

On Windows, in PowerShell:

irm https://claude.ai/install.ps1 | iex

If you prefer a package manager, both are first-class. Homebrew on macOS:

brew install --cask claude-code

WinGet on Windows:

winget install Anthropic.ClaudeCode

There is also an npm route if you already live in the Node ecosystem. It requires Node.js 18 or newer, and you should not run it with sudo:

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

Upgrading the npm install later is one command:

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

A quick note on system requirements so you do not hit a wall mid-install: macOS 13+, Windows 10 (1809+), or Ubuntu 20.04+/Debian 10+; at least 4 GB of RAM; an internet connection; and a Bash, Zsh, PowerShell, or CMD shell. On Windows, installing Git for Windows is recommended so Claude Code’s Bash tool works natively.

Start Claude Code and log in from your browser

Once it is installed, there is no separate setup wizard. Move into a real project and start the tool:

cd your-project
claude

On the first run, Claude Code prompts you to log in and opens your browser to complete authentication. You approve the session there, come back to the terminal, and you are in. From that point on you are talking to it in plain language inside your project directory, and it already sees your files.

Because it runs where your code lives, the first thing worth doing is nothing dramatic. Ask it to explain the repo, or to find where a specific behavior is implemented. That gives you a feel for how it reads a codebase before you let it change anything.

Verify your install with claude –version and claude doctor

Two commands confirm everything is wired up correctly. Check the version first:

claude --version

If something feels off later, whether it is auth, the shell integration, or a missing dependency, run the built-in diagnostic:

claude doctor

claude doctor inspects your environment and reports problems with clear guidance, so reach for it before you start hunting through config files by hand.

  1. InstallNative one-liner, Homebrew, WinGet, or npm (Node 18+)
  2. Startcd into your project, then run claude
  3. Log inApprove the session in your browser on first run
  4. Verifyclaude --version, then claude doctor if anything looks off

The access reality: Claude Code needs a paid plan

Here is the part people miss. Claude Code requires a Pro, Max, Team, Enterprise, or Anthropic Console account. The free Claude.ai plan does not include Claude Code. If you tried it on a free account and it would not let you in, that is why, not a broken install.

You have flexibility on where the model actually runs. Beyond Anthropic’s first-party API, Claude Code can run against a third-party provider: Amazon Bedrock, Google Vertex AI, or Microsoft Foundry. That matters for teams whose cloud governance requires inference to stay inside an existing provider contract.

It runs on Anthropic’s Claude models, and you pick the model for the job rather than being locked to one. You can select, for example, Sonnet 5 for fast everyday work or Opus 4.8 for the heaviest reasoning. If you are deciding which to use and when, see what’s new in Claude Sonnet 5 and how to switch and how to tune Sonnet 5 for cost, quality, effort, and batch. Current plan details live on the Claude pricing page.

Included plansPro, Max, Team, Enterprise, or Console
Free planDoes not include Claude Code
ProvidersAnthropic API, Bedrock, Vertex AI, Foundry
ModelsPick your model (e.g. Sonnet 5, Opus 4.8)

The core loop: describe a task, and Claude Code plans, edits, and verifies

The daily rhythm is simple: you describe an outcome in plain language, and Claude Code turns it into a plan, edits the files involved, runs whatever is needed to check the work, and reports back. It handles changes that span several files at once, which is where it pulls ahead of a single-file assistant.

Start it and give it a concrete task in one shot:

claude "add input validation to the signup form and update the tests"

It will locate the signup form, propose the edits, apply them across the component and its test file, run the tests, and tell you what it changed. Because it is git-aware, you can follow straight through to a commit:

claude "stage the changes, write a conventional commit message, and open a PR"

The trick to good results is the same as with any strong engineer: give it enough context and a clear definition of done. “Fix the bug” is weak. “The signup form accepts empty emails; reject them with an inline error and add a test that covers the empty case” is a task it can actually finish and verify.

Steer it with CLAUDE.md and automatic memory

Claude Code reads a file named CLAUDE.md at your project root at the start of every session. This is where you put the standing context you would otherwise repeat every time: coding standards, architecture notes, the commands to run tests and lint, and the conventions you want followed. A short, honest CLAUDE.md is one of the highest-leverage things you can add to a repo.

A minimal one looks like this:

# Project: Billing API

## Stack
- Node 20, TypeScript, Fastify, Postgres (Prisma)

## Commands
- Test: npm test
- Lint: npm run lint
- Typecheck: npm run typecheck

## Conventions
- Conventional Commits
- No `any`; prefer explicit return types
- All new endpoints need an integration test

On top of that file, Claude Code also builds its own automatic memory as it works, so it accumulates useful context about your project over a session without you spelling out everything each time. Between the two, you spend less time re-explaining and more time reviewing.

Stay in control with permissions and plan mode

Agentic does not mean unsupervised. Claude Code asks before it acts through its permissions system, so file writes and command runs get surfaced for your approval rather than happening silently. You decide how much latitude to grant, and you can tighten or loosen it per project.

Plan mode is the companion feature for anything non-trivial. Instead of editing immediately, Claude Code lays out what it intends to do and waits for you to approve the plan before touching a single file. For a risky refactor or a change to unfamiliar code, run the plan first, read it, adjust the instructions, and only then let it execute. This is the difference between an assistant you trust and one you babysit.

Plan mode first

  • It proposes the full plan before editing
  • You catch bad assumptions early
  • Best for refactors and unfamiliar code
  • Approve, then it executes

Direct execution

  • It edits and verifies in one pass
  • Fastest for small, well-scoped tasks
  • Permissions still gate writes and commands
  • Best when you know exactly what you want

Going further: MCP, subagents, hooks, and headless mode in CI

Once the basics feel natural, Claude Code scales well past a single interactive session.

MCP (Model Context Protocol) connects it to your tools and data, so it can pull context from a database, an issue tracker, or an internal service instead of guessing. If you want the full walkthrough, see how to connect an AI agent to your data with MCP.

Hooks run shell commands automatically before or after actions, for example auto-formatting a file the moment it is edited, so your standards are enforced by the tool rather than by memory. Subagents (and agent teams) let it spawn multiple agents on a larger job, with a lead agent coordinating the work.

Finally, it runs headless. Pipe a prompt in and get output back with claude -p, which is what makes it usable in automation and CI:

git diff | claude -p "review this diff for security issues and summarize risks"

That same pattern plugs into GitHub Actions or GitLab CI/CD, so Claude Code can review pull requests or triage failures as part of your pipeline. If you are curious how this fits into a fuller build, the piece on building an autonomous agent with Sonnet 5 is a good next stop, and for the broader landscape of tools, see Claude Code vs. Cursor and the AI agents hub.

Your first-task checklist with Claude Code

Here is the shortest path from nothing to a shipped change:

  1. Install with the native one-liner: curl -fsSL https://claude.ai/install.sh | bash (or Homebrew, WinGet, or npm).
  2. Confirm you are on a Pro, Max, Team, Enterprise, or Console account. The free plan will not work.
  3. cd into a real project and run claude, then log in through the browser.
  4. Run claude --version to confirm the install, and keep claude doctor in mind for diagnostics.
  5. Drop a short CLAUDE.md at the repo root with your test and lint commands and your conventions.
  6. Give it one well-scoped task with a clear definition of done, and use plan mode for anything risky.
  7. Let it edit, run, and verify, then review the diff and commit.

Do that once on a real bug or a small feature and the loop clicks. From there, layer on MCP, hooks, and headless runs as your workflow demands. For deeper background, the official Claude Code docs are the source of truth, and if you also work with the API directly, see how to use the Claude API.