PTENES
TRACK 2

⚙️ Installation & Setup

From zero to Claude Code up and running: install, authenticate, configure permissions, and connect MCP tools. In less than an hour, you’ll have a professional environment ready to use.

Node.js v18+ npm install -g @anthropic-ai $ claude login & auth settings.json permissions MCP ready ✓ step 1 step 2 step 3 step 4 result
4
Modules
24
Topics
~3h
Duration
Basic
Level

Learning path map

Detailed content

2.1 ~45 min

⚙️ Installing Claude Code

Requirements, installation via npm/bun, verification, updates, and troubleshooting the most common errors on any OS.

What it is:

Node.js v18+ (or Bun), a terminal with color support, and internet access for initial authentication.

Why learn:

Without the right environment, installation fails silently. Checking beforehand saves 30 min of debugging.

Key Concepts:

Node.js LTS, verify with node -v, npm v9+ or Bun v1+, macOS/Linux/WSL2 support.

What it is:

A single command installs Claude Code globally: npm install -g @anthropic-ai/claude-code.

Why learn:

Global installation makes the command claude available in any directory on the system.

Key Concepts:

Flag -g (global), npm folder permissions, Bun alternative: bun install -g.

What it is:

Run claude --version e claude --help to confirm the binary is on the PATH.

Why learn:

Detects PATH errors before you waste time on authentication. "command not found" has a simple fix.

Key Concepts:

System PATH, which claude, expected output with version number.

What it is:

Claude Code releases frequent updates with new models and features. The same installation command with npm update -g updates.

Why learn:

Older versions don't support new models. Updating takes 30 seconds and brings significant improvements.

Key Concepts:

npm update -g @anthropic-ai/claude-code, check the changelog on GitHub; breaking changes are rare.

What it is:

Claude Code runs natively on macOS and Linux. On Windows, use WSL2 (Windows Subsystem for Linux) for better compatibility.

Why learn:

Each OS has different permission and PATH gotchas. Knowing the differences saves hours of frustration.

Key Concepts:

WSL2 on Windows, Homebrew on macOS for Node.js, recommended Linux distros (Ubuntu 22+).

What it is:

The 5 most common errors: EACCES (npm permissions), command not found (PATH), ENOENT (outdated Node version), network timeout, and version conflict.

Why learn:

Installation errors block 30% of beginners. Keeping the diagnosis in mind solves them in minutes.

Key Concepts:

sudo npm install -g (EACCES fix), nvm for multiple Node versions, check the npm cache with npm cache clean --force.

View Full
2.2 ~40 min

🔑 Authentication and First Use

Login, API key vs. subscription, the interactive prompt, first real commands, and how to exit/resume a session.

What it is:

Type claude in the terminal opens the interactive REPL. On the first run, redirects you to authentication.

Why learn:

Understanding the first-boot flow prevents confusion with login prompts and the interactive terminal.

Key Concepts:

REPL (Read-Eval-Print Loop), interactive terminal, automatic onboarding flow.

What it is:

Claude Code authenticates through browser OAuth with your Anthropic account or with an API key. Credentials are stored in ~/.claude/.

Why learn:

Choosing between an account and an API key determines billing, limits, and available models.

Key Concepts:

OAuth2 browser flow, folder ~/.claude/, session token, reauthentication when it expires.

What it is:

API key = pay per use (tokens). Claude Max = monthly subscription with a generous limit. For heavy use, the subscription is usually a better deal.

Why learn:

The wrong choice can lead to surprise costs or limit projects that need many daily calls.

Key Concepts:

Token pricing, rate limits, Claude Pro vs Max, environment variable ANTHROPIC_API_KEY.

What it is:

The prompt > accepts natural language, slash commands (/help, /clear) and references to files with @.

Why learn:

Mastering REPL shortcuts multiplies productivity — without having to rewrite context with every message.

Key Concepts:

Commands /help, /clear, /status, references to files with @, multiline input with Enter vs Shift+Enter.

What it is:

Ask Claude to create a file, read a project, or explain existing code — the first hands-on tasks.

Why learn:

Getting hands-on right away reinforces learning and demystifies using the tool.

Key Concepts:

Task prompt, action confirmation, difference between reading (safe) and writing (requires permission).

What it is:

Exit with Ctrl+C or /exit. Resume the previous context with claude --resume or by opening the same directory.

Why learn:

Long sessions are normal in real projects. Knowing how to resume without losing context is essential.

Key Concepts:

Context persisted in the directory, .claude/ local, claude --resume, conversation history.

View Full
2.3 ~50 min

🛠️ Configuration: settings.json and Permissions

User vs. project settings.json file, allow/ask/deny permission system, what to safely allow, and a basic CLAUDE.md.

What it is:

JSON file that controls Claude Code permissions, tools, hooks, and behaviors. Located at ~/.claude/settings.json (global) or .claude/settings.json (project).

Why learn:

Without knowing settings.json, you accept all the defaults — and get permission prompts for every trivial action.

Key Concepts:

User > project hierarchy, key permissions, tools, merge vs override.

What it is:

Each tool can be configured with allow (run without asking), ask (ask for confirmation) or deny (block).

Why learn:

Incorrect permissions can block your workflow or expose destructive operations. The right balance is productive and safe.

Key Concepts:

Key allow lists glob patterns, scope by tool (Bash, Read, Write, Edit), and project-level overrides.

What it is:

General rules: reading is safe (allow), writing within the project is okay, external system commands require attention, delete/drop requires ask.

Why learn:

Allowing everything (allow *) is dangerous on production machines. Allowing too little makes the tool useless.

Key Concepts:

Principle of least privilege, glob src/** to limit scope, deny for destructive commands.

What it is:

Predefined modes: default (asks for confirmation for everything), --dangerously-skip-permissions (without confirmation — local dev only), headless mode for CI/CD.

Why learn:

Automated pipelines require non-interactive mode. In production, never use dangerously-skip.

Key Concepts:

Flag --print for non-interactive output, environment variables for CI, claude --no-tty.

What it is:

Markdown file that Claude reads automatically at every session. It's the project "briefing" — context, conventions, special commands.

Why learn:

Without CLAUDE.md, you repeat the context every session. With it, Claude already knows the stack, style, and project rules.

Key Concepts:

Position ./CLAUDE.md or ~/.claude/CLAUDE.md, recommended sections, context token limit.

What it is:

Global settings (~/.claude/settings.json) apply to all projects. Project settings (.claude/settings.json) override them for that repo.

Why learn:

Configuring the hierarchy correctly prevents conflicts between personal and professional projects.

Key Concepts:

Merge JSON objects, project > user precedence, version control .claude/settings.json in the project's git.

View Full
2.4 ~45 min

🔌 MCP and your first project

Model Context Protocol: connect MCP servers and external tools, create and open a real project from start to finish.

What it is:

Model Context Protocol (MCP) is an open standard for connecting Claude to external tools: databases, APIs, filesystems, and cloud services.

Why learn:

With MCP, Claude stops being a chatbot and becomes an agent that accesses real data in your environment.

Key Concepts:

MCP server, Claude Code client, JSON-RPC, tools exposed via MCP, official server repository.

What it is:

Add an MCP server to settings.json in the key mcpServers. Claude initializes and exposes the tools automatically.

Why learn:

Connecting an MCP takes 2 minutes. Without this knowledge, you only use Claude’s built-in tools.

Key Concepts:

Key mcpServers in JSON, command e args, check with /mcp in the REPL.

What it is:

Available MCP servers: filesystem, GitHub, PostgreSQL, Slack, Google Drive, Puppeteer (browser), SQLite, and dozens more.

Why learn:

Each MCP dramatically expands what Claude can do. GitHub MCP + Claude = automated code review.

Key Concepts:

Repository modelcontextprotocol/servers, official vs community MCPs, security of third-party servers.

What it is:

Open Claude Code in an existing directory or create a project from scratch with a file structure, CLAUDE.md, and initial settings.

Why learn:

Starting a project correctly (with CLAUDE.md and settings) ensures consistency throughout development.

Key Concepts:

cd meu-projeto && claude, recommended directory structure, /init to generate CLAUDE.md automatically.

What it is:

Create a project, write CLAUDE.md, do a real task (e.g., create a REST API), review changes, commit — all with Claude guiding you.

Why learn:

Seeing the complete cycle (intent → code → review → commit) solidifies your mental model of how to use Claude Code.

Key Concepts:

Development loop, visual diff, confirmation of changes, git integration, output from complex tasks.

What it is:

With installation, auth, settings, and MCP configured, you're ready to explore Skills (T3), Automation (T4), and real-world projects (T5).

Why learn:

Setup is the foundation. Everything that follows depends on having the environment configured properly.

Key Concepts:

Custom skills, automation hooks, worktrees, multi-file projects, CI/CD with Claude.

View Full
← Track 1: Fundamentals Track 3: Skills →