Complete Guide to Claude Code for Beginners | From Installation to Hands-on Practice

A complete guide to Claude Code for beginners. Step-by-step explanations covering installation, setup, basic commands, and practical usage. Explained in an easy-to-understand way, even for non-engineers.

63 min read

Complete Guide to Claude Code for Beginners | From Installation to Hands-on Practice

For beginners wondering "I want to try Claude Code, but don't know where to start" or "I'm anxious about terminal operations," this guide provides step-by-step explanations from installation to practical usage of Claude Code.

What is Claude Code?

AI Coding Assistant

Claude Code is an agentic coding tool that allows you to use Anthropic's large language model "Claude" directly from the terminal. Simply by giving instructions in natural language, it can automatically create, edit, test code, and perform Git operations.

Differences from Other Tools

Claude Code features:

  • Project-wide understanding: Deep comprehension of the entire codebase
  • Automatic file identification: Automatically searches for relevant files
  • Terminal integration: Everything is completed on the command line
  • Multi-step operations: Executes edits across multiple files at once

Reference: Claude Code Official Documentation

Setup: From Installation to Launch

Step 1: Check Required Environment

Environment needed to use Claude Code:

  • Node.js: Version v18 or higher
  • Terminal: macOS (Terminal), Windows (PowerShell or Git Bash), Linux
  • Claude account: Pro or Max plan

Step 2: Installing Node.js

If Node.js is not installed:

macOS (using Homebrew):

bash

# Install Homebrew (if not installed)
/bin/bash -c"$(curl-fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

# Install Node.js

brewinstallnode

# Check version

node--version# Confirm v18 or higher

Windows:

  1. Download installer from Node.js official website
  2. Run the installer
  3. Verify in Command Prompt:

bash

node--version

Reference: Claude Code Setup Guide

Step 3: Installing Claude Code

Run the following command in terminal:

bash

# Install via npm

npminstall-g claude-code

# Verify installation

claude --version

If you encounter errors:

  • Permission error (macOS/Linux): sudo npm install -g claude-code
  • PATH not set: Restart terminal

Reference: Claude Code Installation Guide for Beginners

Step 4: Login

bash

# Log in to Claude

claude login

A browser will open for you to log in with your Claude account.

Important notes:

  • Pro or Max plan required: Cannot be used with free plan
  • Monthly plan recommended: Beginners should start with the $20/month Pro plan

Reference: Claude Code Pricing Structure

Basic Usage: First Steps

Step 1: Start a Conversation Session

bash

# Navigate to project directory

cdyour-project

# Launch Claude Code

claude

```

Claude Code will start and display a prompt(waitingforinput).

### Step 2: Give Your First Instruction

**Example1: Checkfilecontents**

```

Please tell me the contents of README.md

```

**Example2: Create simple code**

```

Create afunctionthat outputs Hello WorldinTypeScript

```

**Example3: Explain existing code**

```

Explain the codeinsrc/index.ts

```

Reference: Claude Code Practical Guide

### Step 3: Learn Basic Commands

**Session management:**

-`claude`:Start a new session

-`claude --continue`(or`claude -c`): Continue from themostrecent session

-`claude --resume`(or`claude -r`): Select and resume from past sessions

**In-session commands(slash commands):**

-`/help`:Displayhelp

-`/clear`:Clear context(when switching tasks)

-`/compact`:Compress conversationhistoryto save tokens

-`/model`:Switch model(Sonnet/Opus)

-`/init`:Generate CLAUDE.mdfile

Reference: Claude Code Tutorial

## Practical Usage: Specific Examples

### Example 1: Create a Simple Function

**User input:**

```

Create afunctioninTypeScript that adds two numbers.

```

Claude Code will automatically create or edit a file.

**Confirmation and approval:** Claude Code asksforconfirmation before operations, so review the content and approve(y).

### Example 2: Fix a Bug

**User input:**

```

In src/utils/math.ts,adderror handlingfordivision by zerointhe divide function.

```

Claude Code willfindthe relevantfileand suggest appropriate fixes.

### Example 3: Run Tests

**User input:**

```

Runnpmtestandifthere are any failed tests, please fix them.

```

Claude Code will automatically run tests, analyze failuresifany, and fix them.

### Example 4: Git Commit

**User input:**

```

Commit the changes and push to GitHub. Please use"Bug fix: handle division by zero"as the commit message.

Claude Code automatically executes:

  • git add
  • git commit -m "Bug fix: handle division by zero"
  • git push

Reference: Claude Code Vibe Coding Tutorial

Boost Efficiency with CLAUDE.md

What is CLAUDE.md?

CLAUDE.md is a configuration file that is loaded when Claude Code starts. By describing project rules and information, you can receive more accurate assistance.

Creating CLAUDE.md for Beginners

Automatic generation:

bash

# Run within a session

/init

Claude Code will automatically generate CLAUDE.md.

Manual creation example:

Create CLAUDE.md in project root:

markdown

#Project Overview

This is a blog site project.

##Tech Stack

-Next.js 14

-TypeScript

-TailwindCSS

##Coding Conventions

-Variable and function names in camelCase

-Components in PascalCase

-Indentation with 2 spaces

##Important Notes

-Please respond in Japanese

-Create test code together

-Always run lint before committing

Reference: CLAUDE.md Configuration Guide

FAQ and Solutions

Q1: Getting "Permission Denied" Error

Cause: No permission for file operations

Solution:

bash

# Check project directory permissions

ls-la

# Grant permissions if necessary

chmod-R u+w your-project/

Q2: Japanese Input Not Working Well

Cause: Terminal IME issues

Solutions:

  • @note.md file method: Write in Markdown in an editor then reference it
  • Prompt Line app (macOS): Use a dedicated input window
  • Text editor creation: Write long instructions in a file

Reference: Claude Code Japanese Input Solutions

Q3: Token Limit Reached Quickly

Cause: Context bloat

Solutions:

bash

# Run within session

/compact# Compress conversation history

/clear# Clear context

Always execute /clear when switching tasks.

Q4: Which Plan Should I Choose?

Plan comparison for beginners:

Pro Plan ($20/month):

  • 5 hours of Claude Code usage per month
  • Recommended for beginners
  • Try this plan first

Max Plan ($100/month):

  • Unlimited usage (with rate limits)
  • For serious development
  • Focus on efficiency for long-term use

Reference: Claude Code Pricing Plans

Commands Beginners Should Learn

Basic Commands

bash

# Start session

claude

# Continue from last time

claude -c

# Select past session

claude -r

# Display help

claude --help

In-Session Commands

bash

# Help

/help

# Clear context

/clear

# Compress conversation

/compact

# Switch model

/model

# Generate CLAUDE.md

/init

Learning Resources

Official Documentation

Free Tutorials

  • Qiita Free Course: 11-part tutorial series (Installation to Custom Commands)
  • Zenn Practical Guide: Practical explanations for first-time users
  • DevelopersIO: Troubleshooting examples

Reference: Claude Code Free Tutorials

Community

  • Zenn: Rich practical articles in Japanese
  • Qiita: Many beginner-friendly explanatory articles
  • X (formerly Twitter): Tips sharing with #ClaudeCode

Summary: What Beginners Should Do First

Step 1: Environment Setup (Day 1)

  1. Install Node.js
  2. Install Claude Code (npm install -g claude-code)
  3. Login (claude login)
  4. Subscribe to Pro plan

Step 2: Learn Basic Operations (Day 2)

  1. Start session with claude command
  2. Try giving simple instructions (e.g., "Read README.md")
  3. Check command list with /help
  4. Clear context with /clear

Step 3: Practice (Day 3 onwards)

  1. Try with a small project
  2. Create CLAUDE.md (/init)
  3. Request bug fixes and test execution
  4. Automate up to Git commits

Important Notes

  • Always verify content: Review Claude Code's suggestions before approving
  • Start small: Begin with simple tasks
  • Context management: /clear when switching tasks
  • Security awareness: Don't include confidential information

By following these steps, you can master the basic usage of Claude Code. Don't rush, take your time getting familiar with it.

Related Articles