Claude Code Tutorial for Beginners: Complete 2027 Guide
← Back to news

Claude Code Tutorial for Beginners: Complete 2027 Guide

N

NxCode Team

••16 min read
Build with NxCodeStart Free

Updated December 1, 2026 — 2027 edition, checked against the current Claude Code docs: Opus 5.5 as the default model, Fable 5.2 (which replaced Fable 5.1 behind the fable alias), the native installer, Shift+Tab permission modes including auto mode, the current slash commands and today's plan prices.

Key Takeaways

  • An agent, not a chatbot: Claude Code reads your project, edits files, runs commands and handles Git from plain-language requests, in the terminal, your IDE, the desktop app or the browser.
  • Install in one command: curl -fsSL https://claude.ai/install.sh | bash on macOS, Linux and WSL, or irm https://claude.ai/install.ps1 | iex in Windows PowerShell. You need a paid Claude plan (Pro or higher) or an API account.
  • Plan Mode for anything non-trivial: press Shift+Tab (or type /plan) so Claude researches and proposes a plan before touching any file.
  • Opus 5.5 is the default: switch with /model to Sonnet 5.5 for speed, Haiku 5.5 for simple tasks, or Fable 5.2 for the hardest long-running work.
  • CLAUDE.md keeps it consistent: run /init once, then keep a short file of commands and conventions that Claude reads every session.

Claude Code Tutorial for Beginners: Complete Getting Started Guide

Claude Code is Anthropic's agentic coding tool: it reads your codebase, edits files, runs commands and integrates with your development tools, all through natural language. It became generally available in May 2025 and now runs on several surfaces: the terminal CLI, extensions for VS Code (and VS Code-based editors such as Cursor, now Grok Build, and Devin Desktop) and JetBrains IDEs, the Claude desktop app, and the web at claude.ai/code (Anthropic docs).

As of December 2026 it runs on Claude Opus 5.5 by default, with a 1M-token context window on the current models. It is included in paid Claude plans starting with Pro at $20/month.

This tutorial takes you from zero to productive in the terminal. No prior AI tooling experience required.


Table of Contents

  1. What is Claude Code?
  2. Prerequisites and Installation
  3. Your First Session
  4. Essential Commands Reference
  5. Plan Mode: Think Before You Code
  6. Setting Up CLAUDE.md
  7. Real-World Workflow Examples
  8. Choosing a Model in Claude Code
  9. Tips for Getting the Most Out of Claude Code

What is Claude Code?

Claude Code is Anthropic's agentic coding tool. Unlike a chat window where you paste code back and forth, it works directly on the files in your project.

Here is what makes it different:

  • Codebase awareness: Claude searches and reads your files to understand how the project fits together before it changes anything
  • Real actions: it edits files, runs your tests and build commands, and works with Git on your machine
  • Permission modes: you choose how much it can do without asking, from approving every edit to letting it work on its own
  • Many surfaces, one engine: the terminal, VS Code, JetBrains, the desktop app and the web share the same CLAUDE.md files, settings and MCP servers

By default Claude Code uses Claude Opus 5.5, Anthropic's recommended model for most work. You can switch to Sonnet 5.5, Haiku 5.5 or Fable 5.2 at any time (see Choosing a Model).

Prefer not to use the terminal? The Claude desktop app includes Claude Code in its Code tab, and claude.ai/code runs it in the browser with no local setup. This tutorial uses the terminal, but the concepts are the same.


Prerequisites and Installation

What You Need

  • A paid Claude account: Pro, Max, Ultra, Team or Enterprise, or an Anthropic Console (API) account. The free Claude plan does not include Claude Code (setup docs). Prices are in our Claude Code pricing guide.
  • A supported OS: macOS 13+, Windows 10 (1809+) or Windows Server 2019+, Ubuntu 20.04+, Debian 10+ or Alpine Linux 3.19+, with 4 GB+ of RAM.
  • A terminal: Terminal or iTerm2 on macOS, any Linux terminal, or PowerShell/CMD on Windows.

You no longer need Node.js. The recommended installer downloads a native binary.

Step 1: Install Claude Code

macOS, Linux or WSL:

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

Windows PowerShell:

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

Package-manager alternatives are brew install --cask claude-code (Homebrew) and winget install Anthropic.ClaudeCode (WinGet). The native installer updates itself in the background; Homebrew and WinGet installs need manual upgrades. On native Windows, installing Git for Windows is recommended so Claude can use Bash; without it, Claude Code uses PowerShell.

For Windows CMD, apt/dnf/apk, npm and troubleshooting, see our full Claude Code installation guide.

Step 2: Verify the Installation

Open a new terminal window and run:

claude --version

You should see a version number. If your shell says claude is not found, the install directory is not on your PATH yet. Running claude doctor prints a read-only check of your installation and settings.

Step 3: Start Claude Code in Your Project

cd ~/projects/my-app
claude

The first time, Claude Code opens your browser to log in with your Claude account (or uses your ANTHROPIC_API_KEY if you approve it). Then you are in an interactive session.


Your First Session

When you launch claude inside a project:

  1. You get an interactive prompt where you type in plain language
  2. Claude explores the files it needs (it does not upload or pre-index your whole disk)
  3. It answers, proposes changes, or runs commands, depending on your request and permission mode

A Simple First Interaction

Start with a question so Claude builds a picture of the project:

> What does this project do? Summarize the tech stack and folder structure.

Then give it a real task:

> Add input validation to the signup form. Email should be validated and password needs at least 8 characters.

Claude will find the relevant component, make the edits, and tell you what changed.

Who Approves What: Permission Modes

How much Claude does without asking depends on the permission mode shown in the status bar. Press Shift+Tab to cycle through them (docs):

ModeWhat runs without asking
Manual (default)Reads only. Asks before edits, shell commands and network access
acceptEditsReads, file edits and common file commands in your working directory
planReads and research only. No edits until you approve a plan
autoEverything, with a separate classifier model reviewing each action in place of you

On recent versions (v2.1.283 and later), auto mode is the starting mode for interactive terminal and VS Code sessions. If you are new and want to approve every change yourself, press Shift+Tab until the status bar shows Manual. Either way, use Git so every change is easy to review and undo, and /rewind lets you roll back the conversation and code to an earlier point.


Essential Commands Reference

Type / in a session to see every command available to you. These are the ones beginners use most (full list):

CommandWhat It Does
claudeStart a new session in the current folder
/helpShow help and available commands
/initGenerate a starting CLAUDE.md for the project
/plan [task]Enter Plan Mode, optionally starting with a task
/modelSwitch model (opens a picker with no argument)
/effortSet how much reasoning the model applies
/clearStart a new conversation with empty context
/compactSummarize the conversation to free up context
/contextShow what is filling the context window
/usageShow session cost, plan usage limits and stats (/cost is an alias)
/memoryEdit CLAUDE.md files and manage auto memory
/rewindRoll back the conversation and/or code to an earlier point
/resumeReopen a previous conversation
/code-reviewReview the current diff for bugs (/review is an alias)

Useful keys: Shift+Tab cycles permission modes, and Esc interrupts Claude mid-task. You do not need to memorize commands; most of the time you just type what you want.


Plan Mode: Think Before You Code

Plan Mode is the most useful habit for beginners. In Plan Mode, Claude can read and research, but edits stay blocked until you approve a plan.

There are three ways in:

  • Press Shift+Tab until the status bar shows ⏸ plan mode on
  • Start a prompt with /plan, for example /plan fix the auth bug
  • Launch with claude --permission-mode plan

In Plan Mode, Claude:

  1. Analyzes the problem: reads relevant files and traces dependencies
  2. Writes a step-by-step plan: what it will change, in what order, and why
  3. Waits for you: nothing is edited until you approve

When to Use Plan Mode

  • Multi-file changes: a new API endpoint that touches routes, handlers, models and tests
  • Refactoring: renaming something imported across dozens of files
  • Unfamiliar codebases: understand the impact before anything changes
  • Learning: reading the plan teaches you how the code fits together

Example: Plan Mode in Action

> /plan Refactor the authentication module to use JWT tokens instead of session cookies.

Claude responds with a plan along these lines:

  1. Update auth/middleware.js to verify JWT tokens instead of checking the session store
  2. Modify auth/login.js to issue a JWT on successful login
  3. Update auth/logout.js to handle token invalidation
  4. Send the token in the Authorization header from frontend/src/api.js
  5. Update the affected tests to use JWT fixtures

When the plan is ready, Claude asks how to proceed: approve and let it continue (in auto mode or with auto-accepted edits), approve but review each edit manually, or keep planning. Press Ctrl+G to open the plan in your text editor and change it before approving. To leave Plan Mode without approving, press Esc at the approval prompt first (pressing Shift+Tab there approves the plan), then Shift+Tab to switch modes.


Setting Up CLAUDE.md

CLAUDE.md is a Markdown file of instructions that Claude Code reads at the start of every session (docs). Use it for what you would otherwise re-explain: build and test commands, conventions, project layout.

Create Your CLAUDE.md

The fastest start is to run /init in a session. Claude analyzes the codebase and writes a first CLAUDE.md; if one exists, it suggests improvements instead. Then edit it. A good project file looks like this:

# Project: My SaaS App

## Tech Stack
- Next.js (App Router), TypeScript in strict mode
- Tailwind CSS
- PostgreSQL with Prisma ORM

## Commands
- Dev server: npm run dev
- Tests: npm run test (Vitest)
- Lint: npm run lint

## Conventions
- Functional components with hooks, no class components
- Named exports, not default exports
- Tests go in __tests__ next to the source file

## Git
- Conventional commits: feat:, fix:, refactor:
- Never commit directly to main

Where CLAUDE.md Files Live

FileScope
./CLAUDE.md or ./.claude/CLAUDE.mdProject instructions, shared with your team through Git
./CLAUDE.local.mdYour personal project notes; add it to .gitignore
~/.claude/CLAUDE.mdYour preferences for every project

If your repository already has an AGENTS.md for other coding agents and no CLAUDE.md, Claude Code reads the AGENTS.md instead.

Tips from the Docs

  • Keep it short: Anthropic recommends under 200 lines per file. Longer files use more context and are followed less reliably.
  • Be concrete: "Run npm test before committing" beats "test your changes".
  • Add to it when Claude repeats a mistake: that is the signal something belongs in the file.

Claude Code also keeps auto memory, on by default in local sessions: notes it writes itself from your corrections. Use /memory to view or turn it off.


Real-World Workflow Examples

Debugging a Production Issue

> Users are reporting that the dashboard takes 15 seconds to load.
> Check the API calls on the dashboard page and identify any performance bottlenecks.

Claude traces the dashboard component and its API calls, looks for problems such as N+1 queries or missing indexes, and proposes specific fixes.

Adding a New Feature

> Add a dark mode toggle. Persist the user's preference in localStorage
> and apply it on page load without a flash of unstyled content.

Claude adds the toggle, the theme logic and the storage handling, and can run your dev build to check it.

Refactoring Legacy Code

> /plan This file uses callback-based async patterns. Refactor it to async/await
> while keeping the same external API.

Claude plans the refactor, lists which functions change, and waits for your approval before editing.

Git Integration

> Create a branch called feat/dark-mode, commit the changes we just made,
> and open a pull request describing what changed.

Claude creates the branch, stages the files, writes the commit message and, if the GitHub CLI (gh) is installed and logged in, opens the pull request.


Choosing a Model in Claude Code

On Pro, Max, Ultra, Team, Enterprise and the Anthropic API, Claude Code defaults to Opus 5.5 (model configuration docs). Switch with /model, or start with claude --model sonnet.

AliasModel (Anthropic API)Docs describe it asAPI price per 1M tokens (input / output)
opusOpus 5.5 (default)For complex reasoning tasks$4 / $20
sonnetSonnet 5.5For daily coding tasks$2 / $10
haikuHaiku 5.5Fast and efficient, for simple tasksfrom $0.10 / $0.50
fableFable 5.2For your hardest and longest-running tasks$8 / $40

API prices are from Anthropic's models overview. On a subscription you pay a flat monthly price, and usage counts against your plan limits instead. All four current models have a 1M-token context window, so you no longer need a separate "1M" variant.

A Simple Rule of Thumb

  • Stay on Opus 5.5 for most work. It is the default for a reason.
  • Switch to Sonnet 5.5 when you want faster responses on routine edits, tests and explanations.
  • Use Haiku 5.5 for quick, simple jobs.
  • Try Fable 5.2 (alias fable) for the hardest, longest-running tasks. It needs Claude Code v2.1.321 or later, is never selected by default, and depending on your plan its usage may draw on usage credits rather than your included limits (Claude's pricing page lists Fable via usage credits on Pro, and up to half of your weekly limit on Max). The best alias points to the same model as opus.
  • opusplan uses Opus in Plan Mode and Sonnet for execution.

You can also adjust reasoning depth with /effort (low, medium, high, xhigh, max). Opus 5.5 and Fable 5.2 default to medium; raise it for hard problems.


Tips for Getting the Most Out of Claude Code

1. Start every project with context. Ask Claude what the project does before you assign work. It gives Claude a map, and gives you a chance to correct misunderstandings early.

2. Use Plan Mode for anything complex. If a task touches more than a couple of files, plan first. Fixing a plan is cheaper than undoing edits.

3. Be specific. Instead of "make the code better", try "refactor processPayment to handle failed Stripe charges and retry up to 3 times with exponential backoff."

4. Watch your context. Long sessions fill the context window. Run /context to see what is using it, /compact to summarize, or /clear when you switch to an unrelated task.

5. Maintain your CLAUDE.md. Every correction you type twice belongs in CLAUDE.md.

6. Review diffs before you keep them. Whatever permission mode you use, read what changed, especially in unfamiliar code. /code-review gives you a second pass on the current diff.

7. Let Claude handle Git mechanics. Branching, commit messages and PR descriptions are good jobs to delegate, so you can focus on reviewing the code.

8. Chain tasks in one session. After building a feature, follow up with "now write tests for what we just added". Claude already has the code in context.


Beginner Checklist for Your First Week

Use this checklist to build safe habits before you trust Claude Code with bigger jobs. Each item is a small example you can repeat on a practice project.

  • Day 1: install, run claude doctor, and ask questions only ("What does this project do?"). No edits yet.
  • Day 2: run /init, then trim the generated CLAUDE.md to the commands and conventions that matter.
  • Day 3: switch to Manual mode and implement one small change, for example a form validation rule, approving each edit and reading the diff.
  • Day 4: try Plan Mode on a change that touches three or more files. Edit the plan with Ctrl+G before approving.
  • Day 5: practice recovery: use /rewind to undo a change, then check git status to confirm the files match.
  • Ongoing: run your tests after every change, keep secrets out of prompts, and add a line to CLAUDE.md whenever you correct Claude twice.

If by the end of the week you find you mostly want a finished app rather than a coding workflow, NxCode is the no-code route described below.


Terms to Know

New to coding tools? Here is what each word in this tutorial means.

  • Terminal: the text window where you type commands (Terminal on macOS, PowerShell on Windows). Claude Code's main interface lives there.
  • Agent: an AI that does work, not just answers. In practice that means Claude Code reads files, edits them and runs commands to finish a task.
  • Context window: how much text the model can keep in mind at once. Current Claude models hold 1M tokens, roughly 555,000 words.
  • Token: the unit models read and bill by, a word or part of a word.
  • Permission mode: the setting that decides which actions Claude may take without asking you first.
  • Diff: the list of lines that changed in your files. Reviewing the diff means checking exactly what Claude edited.
  • CLAUDE.md: a Markdown file of standing instructions that Claude Code reads at the start of every session.
  • MCP (Model Context Protocol): a standard way to connect Claude to outside tools such as issue trackers or databases.

Want the App Without the Code?

Claude Code is built for people who are willing to work in a codebase: read diffs, run tests, manage Git. If your real goal is a working business app (a booking system, a client portal, an inventory tracker) and you would rather not maintain code at all, an AI app builder is a shorter path.

NxCode is free to start: sign up with no credit card and plan your app with NxCode's AI in plain language. When you're ready, Lite ($5/month) or Pro ($20/month) has the AI build the frontend, backend and database, run it in a real container, fix errors and deploy it with one click. 35,000+ people have signed up to NxCode. You can also begin from a ready-made template such as the customer CRM template.


What's Next?

You now have everything you need to start. As you get comfortable, explore:

  • Subagents and agent teams: Claude can delegate research to subagents within a session. Agent teams, where several Claude Code sessions coordinate through a shared task list, are still experimental and off by default (enable with CLAUDE_CODE_EXPERIMENTAL_AGENT_TEAMS=1).
  • Skills and hooks: package repeatable workflows as skills that run as slash commands, and use hooks to run formatters or linters automatically.
  • MCP servers: connect Claude to tools such as issue trackers and docs through the Model Context Protocol.
  • CI and automation: run claude -p "..." in scripts, or use GitHub Actions for automated review and triage.
  • Free official courses: Anthropic's Claude Academy offers self-paced courses including Claude Code 101 and Claude Code in Action.

Sources and Verification Date

Checked on 2026-12-01 against Anthropic's official pages:

Claude Code ships updates often. If a command here behaves differently, run /help or check the docs above.


Back to all news
Enjoyed this article?

Build with NxCode

Turn your idea into a working app — no coding required.

35,000+ builders · Start free · No credit card needed

Now try it yourself

Describe what you want — NxCode builds it for you.

35,000+ builders · Start free · No credit card needed