Skip to Content

Claude Code — Your AI in the Terminal

Section 2 — Lesson 3

Claude Code — Your AI in the Terminal

Give Claude direct access to your codebase, terminal, and filesystem — and watch it become the most capable coding partner you have ever had.

What Is Claude Code?

Claude Code is Anthropic’s official command-line interface (CLI) that brings Claude directly into your terminal. Unlike the web interface at claude.ai where you paste code snippets back and forth, Claude Code gives the AI direct access to your project files, your terminal, and your filesystem. It can read your code, understand your project structure, write and edit files, run commands, and even manage git operations — all from a single conversational interface in your terminal.

Think of it this way: claude.ai is like talking to a brilliant colleague over chat — you describe your problem, share code snippets, and get advice back. Claude Code is like that same colleague sitting at your desk, looking at your screen, and making changes directly. The difference in productivity is enormous.

claude.ai (Web)
  • Copy-paste code into chat
  • Get suggestions back as text
  • Manually apply changes yourself
  • One file at a time
  • Good for learning and exploration
Claude Code (CLI)
  • Reads your entire codebase
  • Writes and edits files directly
  • Runs terminal commands
  • Multi-file refactoring
  • Built for real development work

Installation

Installing Claude Code takes about 30 seconds. You need Node.js 18 or newer installed on your machine (most developers already have it). Then run a single command:

# Install Claude Code globally
npm install -g @anthropic-ai/claude-code
# Navigate to your project and start Claude Code
cd your-project/
claude

That is it. After running claude in your project directory, Claude Code will scan your project structure, understand the codebase, and open an interactive session where you can give it instructions in plain English.

⚠️ Requirement: Pro Subscription or API Key
Claude Code requires either an active Claude Pro subscription ($20/month) or an Anthropic API key with credits. It does not work with the Free tier. If you are serious about using Claude for development, the Pro plan is the most cost-effective way to access Claude Code — it is included in your subscription at no extra charge.

Key Features

Claude Code is not just a chat in the terminal — it is a full-featured development agent. Here are the capabilities that make it indispensable for modern development:

1

Read and Understand Your Codebase

Claude Code can read any file in your project, understand imports and dependencies, trace function calls across modules, and build a mental model of your entire codebase. Ask it “How does the authentication flow work?” and it will read the relevant files and explain the full picture.

2

Write and Edit Files Directly

No more copying code from a chat window and pasting it into your editor. Claude Code edits files in place. It shows you a diff of what it plans to change and asks for your approval before writing. You stay in control while Claude does the typing.

3

Run Terminal Commands

Claude Code can execute shell commands — run tests, install packages, build your project, check linting errors. It reads the output and uses it to inform its next action. If a test fails, it reads the error, finds the bug, and proposes a fix.

4

Git Integration

Claude Code understands git. It can check your status, create branches, stage changes, write commit messages, and even create pull requests. Ask it “commit these changes with a descriptive message” and it handles the entire git workflow.

5

Multi-File Editing

Need to rename a component and update every import across 30 files? Need to add error handling to every API endpoint? Claude Code can make coordinated changes across your entire project in a single operation, something that would take you an hour manually.

What Can You Actually Do With It?

Here are real examples of commands you can give Claude Code. Each of these is something you type in plain English, and Claude Code figures out how to accomplish it:

“Fix the failing tests”
Claude Code runs the test suite, reads the failures, traces the bugs, and fixes them across multiple files.
“Add dark mode to the app”
Claude Code identifies all style files, creates a theme system, adds a toggle component, and updates the CSS variables throughout the project.
“Refactor this module to use TypeScript”
Claude Code converts JavaScript files to TypeScript, adds type definitions, updates imports, and ensures everything compiles cleanly.
“Explain how the payment processing works in this codebase”
Claude Code reads the relevant files, traces the data flow, and produces a clear explanation of the entire payment pipeline.
“Create a new REST endpoint for user profiles with validation”
Claude Code creates the route, controller, validation schema, and tests — following the patterns already established in your codebase.

The CLAUDE.md Project Instructions File

One of the most powerful features of Claude Code is the CLAUDE.md file. Place this file in the root of your project, and Claude Code will read it every time it starts a session. Think of it as a permanent system prompt for your project — instructions that persist across every conversation.

# Example CLAUDE.md
This is a Next.js 14 project using the App Router.
We use TypeScript strict mode, Tailwind CSS, and Prisma ORM.

Conventions:
- Use server components by default
- Client components go in /components/client/
- All API routes use Zod validation
- Tests use Vitest, not Jest
- Commit messages follow Conventional Commits

With a well-written CLAUDE.md, Claude Code understands your project’s conventions from the very first message. It will write code that matches your style, use the right tools and frameworks, and follow your team’s standards without you having to repeat yourself every session. This is one of the features that separates casual AI usage from a truly integrated AI development workflow.

✅ Pro Tip: Start Small
If you are new to Claude Code, start with read-only tasks: “Explain this function”, “Find all places where we handle errors”, “What dependencies does this module have?” Once you are comfortable with how it navigates your code, move on to editing tasks. Claude Code always shows you a diff before making changes, so you are never surprised by what it writes.

When to Use Claude Code vs claude.ai

Both tools use the same underlying Claude models, but they serve different purposes. Here is a practical decision framework:

Use Case Best Tool
Writing a blog post, email, or documentclaude.ai
Fixing bugs across multiple filesClaude Code
Brainstorming ideasclaude.ai
Refactoring a codebaseClaude Code
Analyzing a PDF or imageclaude.ai
Setting up a new project from scratchClaude Code
Creating and running testsClaude Code

The general rule: if your task involves files on your computer, use Claude Code. If your task is conversational or document-based, use claude.ai. Many professionals use both throughout the day — claude.ai for writing and research, Claude Code for development work.

📚 Lesson Summary
  • Claude Code is a CLI tool that gives Claude direct access to your codebase, terminal, and filesystem
  • Install with npm install -g @anthropic-ai/claude-code, then run claude in your project directory
  • Key features: reads/writes files, runs commands, git integration, multi-file editing
  • Requires Pro subscription ($20/month) or an Anthropic API key
  • Use CLAUDE.md to set persistent project instructions that Claude Code reads every session
  • Use Claude Code for file-based tasks, claude.ai for conversational and document tasks
  • Start with read-only tasks to build confidence, then move to editing and refactoring

Úvod do Claude Code — rozhraní příkazové řádky, které umožňuje Claude číst, zapisovat a spravovat váš kód přímo z terminálu.

Rating
0 0

There are no comments for now.

to be the first to leave a comment.