Episode 1 of 10

Introduction & Setup

Learn what Claude Code is, install it globally via npm, authenticate with your Anthropic API key, and run your first prompt.

What is Claude Code?

Claude Code is an agentic AI coding tool built by Anthropic that lives directly in your terminal. Unlike browser-based AI assistants, Claude Code operates inside your development environment — it can read your files, edit code, run shell commands, search your codebase, and even manage Git workflows — all through natural language conversation.

Think of it as a senior developer sitting next to you in the terminal, with full access to your project and the ability to take action on your behalf.

What Can It Do?

  • Edit files — Write, refactor, and fix code across your entire project
  • Run commands — Execute shell commands, run tests, start servers
  • Search codebases — Grep, find, and understand large projects instantly
  • Git operations — Create commits, branches, handle merge conflicts
  • Answer questions — Explain code, architecture, and debug issues
  • Multi-file edits — Coordinate changes across many files at once

Prerequisites

  • Node.js 18+ — Required for the npm installation
  • An Anthropic account — You'll need an API key (or a Max subscription)
  • A terminal — Terminal.app (Mac), Windows Terminal, or any Linux terminal

Step 1 — Install Claude Code

Install Claude Code globally using npm:

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

Verify the installation:

claude --version

Step 2 — Authenticate

Navigate to any project directory and launch Claude Code for the first time:

cd my-project
claude

On first launch, Claude Code will open a browser window for you to sign in with your Anthropic account. Once authenticated, the session token is stored locally and you won't need to sign in again.

Alternatively, if you have an API key, set it as an environment variable:

# Mac / Linux
export ANTHROPIC_API_KEY="sk-ant-your-key-here"

# Add to shell profile for persistence
echo 'export ANTHROPIC_API_KEY="sk-ant-your-key-here"' >> ~/.zshrc
source ~/.zshrc

Step 3 — Your First Prompt

With Claude Code running, simply type a natural language request:

> Explain the structure of this project

Claude reads your files, analyzes the directory tree, and responds:

This is a Next.js 14 project using the App Router...
├── app/          — Route handlers and pages
├── components/   — Reusable React components
├── lib/          — Utility functions and configs
└── public/       — Static assets

Understanding the Interface

The Claude Code terminal interface has a few key elements:

  • The prompt (>) — Where you type your requests
  • Tool use indicators — Claude shows when it's reading files, running commands, or editing code
  • Diff previews — Before applying changes, Claude shows you exactly what will change
  • Cost tracking — Token usage and cost are displayed per session

What's Next

Claude Code is installed and running. In the next episode, we'll dive into CLAUDE.md files and the /init command — how to give Claude persistent context about your project's conventions, architecture, and rules.

Claude CodeAICoding AgentCLIAnthropic