Introduction: What Is Claude Code and Why Developers Love It
If you have been following developer communities in 2026, you have probably heard the buzz around Claude Code. Built by Anthropic, Claude Code is an agentic AI coding tool that lives in your terminal, reads your entire codebase, edits files across multiple directories, runs commands, and integrates with your favorite development tools. It is not a chatbot that spits out code snippets you copy and paste. It is a full-fledged coding agent that understands your project structure and works alongside you like a senior developer sitting right next to you.
What makes Claude Code different from other AI coding assistants? It operates directly inside your terminal, IDE, desktop app, or even your browser. It can analyze thousands of files, trace bugs through complex dependency chains, write tests, create Git commits, open pull requests, and even connect to external services through the Model Context Protocol (MCP). In Stack Overflow’s 2025 Developer Survey, Claude Code earned the top spot as the most-loved developer tool, and the momentum has only grown into 2026.
In this claude code tutorial for beginners, we will walk through everything you need to go from zero to building a full-stack application. Whether you are a junior developer looking to accelerate your workflow or an experienced engineer curious about agentic coding, this guide from AI Tools Hub has you covered.
Step 1: Installing Claude Code
Claude Code runs on macOS, Linux, Windows, and WSL. The recommended installation method is the native installer, which automatically updates in the background to keep you on the latest version.
macOS and Linux
Open your terminal and run:
curl -fsSL https://claude.ai/install.sh | bash
Windows (PowerShell)
irm https://claude.ai/install.ps1 | iex
Windows users need Git for Windows installed first.
Alternative: Homebrew (macOS/Linux)
brew install --cask claude-code
Note that Homebrew installations do not auto-update. Run brew upgrade claude-code periodically.
Alternative: WinGet (Windows)
winget install Anthropic.ClaudeCode
After installation, verify everything is working by checking the version:
claude --version
Step 2: Authentication Setup
Claude Code requires a paid account. You cannot use it on the free tier. Start an interactive session and you will be prompted to log in:
claude
You can authenticate using any of these methods:
- Claude Pro, Max, Teams, or Enterprise subscription (recommended for most users)
- Anthropic Console account with pre-paid API credits (a “Claude Code” workspace is automatically created for cost tracking)
- Third-party cloud providers such as Amazon Bedrock, Google Vertex AI, or Microsoft Foundry
Once logged in, your credentials are stored locally and you will not need to log in again. If you ever need to switch accounts, use the /login command inside a session.
Step 3: Basic Commands and Workflow
Before we dive into building a project, let us get comfortable with the core commands. Navigate to any project directory and start Claude Code:
cd your-project
claude
Here are the essential commands every beginner should know:
| Command | What It Does |
|---|---|
claude |
Start an interactive session |
claude "task" |
Run a one-time task from the command line |
claude -p "query" |
Run a quick query and exit (one-shot mode) |
claude -c |
Continue the most recent conversation |
claude -r |
Resume a previous conversation |
claude commit |
Create a Git commit with a descriptive message |
/clear |
Clear the current conversation history |
/help |
Show all available commands |
/compact |
Compress conversation context to save tokens |
/model |
Switch between AI models during a session |
/doctor |
Run diagnostics to check your setup |
One of the most powerful aspects of Claude Code is that it reads your project files automatically. You do not need to manually add context or copy-paste code. Just describe what you want in natural language.
Step 4: Real Project Walkthrough — Build a Full-Stack Todo App
Now for the exciting part. We are going to build a complete full-stack todo application with a Node.js/Express backend, a React frontend, and a SQLite database. All from the terminal using Claude Code.
4.1 Setting Up the Project
Create a new directory and initialize Claude Code:
mkdir todo-fullstack && cd todo-fullstack
claude
Now give Claude your first instruction:
Initialize a full-stack project with a Node.js/Express backend in a /server folder and a React frontend (using Vite) in a /client folder. Set up package.json files for both, include a root package.json with scripts to run both simultaneously, and create a basic project structure with placeholder files.
Claude Code will create the entire directory structure, install dependencies, and set up configuration files. It will ask for your approval before making changes. You can approve each change individually or enable “Accept all” mode for the session.
4.2 Generating the Backend (Node.js/Express)
With the project scaffolded, let us build the API:
Create a REST API in the server folder with the following endpoints:
- GET /api/todos - return all todos
- POST /api/todos - create a new todo (body: { title, description })
- PUT /api/todos/:id - update a todo (toggle completed, edit title/description)
- DELETE /api/todos/:id - delete a todo
Use Express with proper error handling, input validation, and CORS configured for the React dev server on port 5173.
Claude will generate the Express server with routes, middleware, validation logic, and error handling. It typically produces well-structured code with proper HTTP status codes and JSON responses.
4.3 Generating the Frontend (React)
Next, tell Claude to build the UI:
Build a React frontend in the client folder for the todo app. Include:
- A clean, modern UI with CSS modules or Tailwind CSS
- A form to add new todos with title and description fields
- A list view showing all todos with checkboxes to toggle completion
- Edit and delete buttons for each todo
- Loading states and error handling
- Use fetch to call the backend API on localhost:3000
Claude will generate React components, styles, and API utility functions. It understands component architecture and will typically split the code into logical components like TodoList, TodoItem, TodoForm, and an api utility module.
4.4 Adding a Database
Right now the backend stores data in memory. Let us add persistence:
Replace the in-memory storage with SQLite using better-sqlite3. Create a database initialization script that sets up the todos table with columns for id, title, description, completed, created_at, and updated_at. Update all the route handlers to use the database.
Claude will install the better-sqlite3 package, create database initialization code, and refactor all route handlers to use SQL queries instead of array operations.
4.5 Testing and Debugging
Now let us make sure everything works:
Start the development servers and test all the API endpoints. If anything fails, debug and fix the issues.
Claude Code can actually run commands in your terminal. It will start the servers, test the endpoints, and fix any issues it finds. You can also ask it to write automated tests:
Write unit tests for the API endpoints using Jest and supertest. Cover all CRUD operations including edge cases like missing fields and invalid IDs.
If tests fail, Claude will read the error output, trace the problem, and fix it — often in a single iteration.
Step 5: Power Features That Set Claude Code Apart
CLAUDE.md — Your Project’s AI Memory
Create a CLAUDE.md file in your project root to give Claude persistent instructions. Every time you start a session in that directory, Claude reads this file automatically.
# CLAUDE.md
## Project Overview
Full-stack todo application with Express backend and React frontend.
## Tech Stack
- Backend: Node.js, Express, SQLite (better-sqlite3)
- Frontend: React 18, Vite, Tailwind CSS
- Testing: Jest, supertest
## Conventions
- Use async/await for all asynchronous operations
- Follow RESTful API naming conventions
- Components use PascalCase, utilities use camelCase
- All API responses follow { success: boolean, data: any, error?: string }
## Commands
- npm run dev — start both servers
- npm run test — run all tests
- npm run build — production build
Claude also builds auto memory as it works, saving learnings like build commands and debugging insights across sessions without you writing anything manually.
Custom Slash Commands (Skills)
Create reusable workflows by adding markdown files to the .claude/commands/ directory in your project. For example, create .claude/commands/review-pr.md:
Review the current changes for:
1. Security vulnerabilities
2. Performance issues
3. Code style violations
4. Missing error handling
5. Test coverage gaps
Provide a summary with severity ratings.
Now you can run /review-pr inside any Claude Code session. Your team can share these commands through version control.
MCP Servers — Connect to External Tools
The Model Context Protocol (MCP) is an open standard that lets Claude Code connect to external data sources and tools. With MCP, Claude can read your design docs in Google Drive, update tickets in Jira, pull data from Slack, query databases, or use your own custom tooling. This transforms Claude Code from a coding assistant into a development workflow hub that bridges your entire tool ecosystem.
Headless Mode and CI/CD Integration
Claude Code follows the Unix philosophy. You can pipe data into it, run it in CI pipelines, or chain it with other tools:
# Analyze logs for anomalies
tail -200 app.log | claude -p "summarize any errors or anomalies"
# Automated code review in CI
git diff main --name-only | claude -p "review these changed files for security issues"
# Bulk translation
claude -p "translate all new strings in locales/en.json into French and open a PR"
You can also integrate Claude Code into GitHub Actions or GitLab CI/CD for automated PR reviews, issue triage, and code generation workflows.
Multi-Agent Teams
For large tasks, you can spawn multiple Claude Code agents that work on different parts simultaneously. A lead agent coordinates the work, assigns subtasks, and merges results. This is especially powerful for large refactors or feature implementations that span many files.
Step 6: Tips for Effective Prompting in Claude Code
Getting great results from Claude Code comes down to how you communicate. Here are proven strategies:
Be Specific, Not Vague
Instead of saying “fix the bug,” try “fix the login bug where users see a blank screen after entering wrong credentials on the /login page.” The more context you provide, the faster Claude can locate and solve the problem.
Break Complex Tasks into Steps
For large features, give Claude a numbered plan:
1. Create a new database table for user profiles with fields: id, user_id, bio, avatar_url, created_at
2. Create API endpoints for GET and PUT /api/profiles/:userId
3. Build a React profile page component with edit functionality
4. Add navigation to the profile page from the main layout
Let Claude Explore First
Before asking for changes, let Claude understand your codebase:
Analyze the authentication module and explain how the session management works
This builds context that leads to better code changes.
Use Plan Mode for Complex Work
Type /plan before a complex task. Claude will analyze the problem, read relevant files, and outline a step-by-step plan before writing any code. Review the plan, suggest adjustments, and then let Claude execute.
Use /compact to Manage Long Sessions
During long coding sessions, your conversation context grows. Use /compact to compress the conversation history and free up token space without losing important context.
Step 7: Pricing — Which Plan Is Right for You?
Claude Code requires a paid subscription. Here is a breakdown of the current plans:
| Plan | Price | Claude Code Access | Best For |
|---|---|---|---|
| Free | $0/month | No access | Chat only (no Claude Code) |
| Pro | $20/month | Included (standard usage) | Individual developers, hobby projects |
| Max 5x | $100/month | 5x Pro usage | Professional developers, daily heavy use |
| Max 20x | $200/month | 20x Pro usage + priority | Power users, full-time agentic coding |
| Team | $100/seat/month (Premium) | Full access per seat | Development teams needing shared billing |
| API | Pay-per-token | Via Anthropic Console | Custom integrations, CI/CD pipelines |
API token pricing for reference: Claude Opus 4.6 costs $5 per million input tokens and $25 per million output tokens. Claude Sonnet 4.6 runs $3/$15 per million tokens respectively, and handles most coding tasks excellently at lower cost.
For most beginners, the Pro plan at $20/month is the best starting point. If you find yourself hitting usage limits regularly, upgrading to Max 5x at $100/month gives you significantly more headroom.
Conclusion: Start Building Today
Claude Code has fundamentally changed how developers build software. What once took days of scaffolding, debugging, and wiring together a full-stack application can now happen in a single terminal session. The key takeaways from this tutorial:
- Installation is simple — one command gets you started on any platform
- Natural language is your interface — describe what you want and Claude builds it
- CLAUDE.md is essential — give Claude persistent context about your project for better results
- Break tasks into steps — structured prompts produce structured code
- Power features scale with you — from custom commands to MCP integrations to multi-agent teams
The best way to learn Claude Code is to start using it on a real project. Pick something small, like the todo app we built in this guide, and experiment. You will be surprised how quickly you can go from idea to working application.
Looking for more AI-powered development tools? Check out our complete guide to AI coding tools to see how Claude Code compares to alternatives like GitHub Copilot, Cursor, and Windsurf.