Skip to content

Chapter 1: What Is Claude Code?

Imagine This

Picture this: it's 11 PM and you're staring at a wall of code you inherited from a colleague who just left the company. You have no idea what it does. You need to add a new feature by Friday. And the one person who understood it is unreachable.

Now imagine you have a brilliant programmer friend sitting right next to you. Not someone who gives vague advice over text — but someone who can actually look at your screen, read the files, run commands, and make changes alongside you. Someone patient enough to explain everything from scratch, available at 3 AM, who never gets tired or annoyed.

That is the closest real-world analogy for Claude Code.


So What Exactly Is Claude Code?

Claude Code is an AI-powered coding assistant made by Anthropic — the same company behind the Claude AI you may have used in a browser. But Claude Code is fundamentally different from the web version. It is a command-line tool (CLI) that runs directly in your computer's terminal.

This distinction matters enormously. The web version of Claude is like texting a smart friend: you describe a problem in words, they send back a suggestion in words, and you have to go implement it yourself. Claude Code is like having that friend physically at your computer — they can open your files, read them, write new code, run programs, check for errors, and fix them on the spot.

Think of it this way:

ChatGPT / Web ClaudeClaude Code
You describe the problemClaude reads your actual files
Claude suggests codeClaude writes and edits the code
You copy-paste the answerClaude runs commands directly
One conversation at a timeRemembers context across your whole project
Lives in a browser tabLives in your terminal, next to your work

Where Does It Live?

Claude Code lives in your terminal — also called the command line or command prompt. If you have never used a terminal before, think of it as a text-based control panel for your computer. Instead of clicking on folders and menus, you type commands. It sounds old-fashioned, but it is actually the most powerful way to control a computer, and developers around the world use it every day.

Once Claude Code is installed, you launch it by typing one word:

claude

That is it. You are in. From that point, you just have a conversation in plain English (or any language you prefer). No special syntax, no coding knowledge required to get started.

Claude Code is also available as a desktop app, a browser-based tool, and as extensions for popular code editors like VS Code and JetBrains IDEs. This book focuses primarily on the terminal version, since it is the most powerful and widely used form — but the concepts apply everywhere.


What Can Claude Code Actually Do?

Here is a taste of what Claude Code is capable of:

Read and understand your code. You can drop Claude Code into any project — even one with thousands of files — and ask it to explain what the code does. It reads the actual files on your computer, not just a pasted snippet.

Write new code. Describe what you want in plain language. "Add a button that saves the form." "Create a function that calculates tax." Claude Code writes it, places it in the right file, and makes sure it fits with the rest of your project.

Fix bugs. Paste an error message, or describe a bug you are seeing. Claude Code traces the problem through your files, identifies the root cause, and implements a fix — often running your tests afterward to confirm it worked.

Run terminal commands. Claude Code can execute commands on your behalf — things like starting a development server, running tests, installing packages, or checking git history. It asks your permission before doing anything risky.

Work with git. It can stage files, write commit messages, create branches, and even open pull requests — all through conversation.

Search the web. Need to look up a library's documentation, find a recent security advisory, or check the latest API changes? Claude Code can search the web in real time and incorporate what it finds.

Automate repetitive tasks. Things that would take you hours — updating every file that uses an old function, reformatting hundreds of lines, writing tests for existing code — Claude Code can do in minutes.


How Is It Different From ChatGPT?

This question comes up constantly, so let us be direct.

ChatGPT and Claude's web interface are conversational tools. They are extraordinarily good at explaining concepts, drafting text, writing code snippets, and answering questions. But they are fundamentally disconnected from your computer. They cannot see your files. They cannot run anything. Everything passes through copy and paste.

Claude Code is agentic. That word means it can take actions, not just produce text. It connects directly to your local environment — your file system, your terminal, your git repository. It reads, writes, and executes. When you ask it to fix a bug, it does not give you instructions to follow. It fixes the bug.

A useful mental model:

  • Web Claude = a very smart advisor on the phone. Great advice, but you have to do the work yourself.
  • Claude Code = a skilled colleague sitting next to you. They roll up their sleeves and do the work with you.

Neither is always better — they serve different purposes. For quick questions and explanations, the web is fine. For actual development work, Claude Code is in a different league.


Who Is This Book For?

This book is written for a broad audience. You do not need to be a programmer to benefit from Claude Code, and you do not need to be an expert to follow along.

If you are completely new to coding: Claude Code is one of the most powerful ways to start building things without having years of experience first. This book will take you from zero — including installing a terminal, understanding what commands do, and having your very first conversation with Claude Code.

If you are a hobbyist or self-taught developer: You will discover a tool that dramatically compresses how long it takes to build things. Tasks that used to require hours of Stack Overflow searching can take minutes.

If you are a professional developer: You will find patterns for integrating Claude Code into real workflows — code review, refactoring, test writing, and team automation.

If you are a non-technical professional (manager, designer, researcher, writer) who needs to work with code occasionally: Claude Code can bridge that gap. You can describe what you need in plain English and have it built for you, while learning along the way.

The only real prerequisite is curiosity and willingness to try something new. Everything else — including the terminal setup — is covered step by step in the chapters that follow.


A Quick Note on What Claude Code Is Not

Claude Code is not magic, and it is not infallible. It makes mistakes. Sometimes it misunderstands what you want. Sometimes it produces code that looks right but has a subtle error. You should review what it produces — at least until you develop a sense for when to trust it and when to double-check.

It is also not a replacement for understanding. The more you learn alongside Claude Code, the better you will become at directing it, catching its mistakes, and getting higher-quality results. Think of it as a powerful accelerant for your own learning, not a shortcut around it.

With that framing in mind — let us get started.


Next up: Chapter 2 — Why Claude Code? — When to reach for it, when to skip it, and how it multiplies your productivity.

Released under CC BY-SA 4.0.