You may have heard Claude Code is powerful and want to try it, but opening Terminal makes you a little nervous. This guide starts from the basics: in 30 minutes, you will install it, run your first chat, and set up CLAUDE.md. You do not need to be an engineer, but you do need to be willing to open Terminal.

One version note: Anthropic keeps updating the models available in Claude Code. Which models actually show up in your account is whatever /model lists inside Claude Code.

Step 1: Set Up the Environment

Check system requirements

Claude Code runs on macOS 13 or later, Windows 10 (1809 or later), Ubuntu 20.04 or later, Debian 10 or later, and Alpine Linux 3.19 or later, with at least 4 GB of RAM. On Windows you can use it natively or through WSL (a Linux environment inside Windows).

You do not need to install Node.js first. The native installer is now the officially recommended way, and the installed claude does not need Node.js to run.

Install Claude Code

On macOS, Linux, or WSL, paste this into Terminal:

curl -fsSL https://claude.ai/install.sh | bash

On Windows, use PowerShell:

irm https://claude.ai/install.ps1 | iex

You can also use a package manager: Homebrew on macOS (brew install --cask claude-code) or WinGet on Windows (winget install Anthropic.ClaudeCode). The native install updates itself in the background, while Homebrew and WinGet installs need to be updated by hand. On native Windows, I also suggest installing Git for Windows so Claude Code can use its Bash tool.

The installer shows no progress. When it finishes, open a new Terminal window and run claude --version. If you see a version number, the install worked.

If you prefer npm, that works too, but the npm version needs Node.js 22 or later, and do not add sudo:

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

Claude Code environment setup checklist

Step 2: Your First Chat

Open Terminal in any folder and type:

claude

The first launch will show a login flow. Follow the instructions to verify your Anthropic account. Claude Code needs a Claude account on a Pro, Max, Ultra, Team, or Enterprise plan, or a Claude Console account billed by usage. A free Claude account does not include Claude Code. To switch accounts, type /login inside a conversation.

After login, you will see an interactive chat interface. Try typing:

Show me what files are in this folder

Claude Code will use ls or a similar command to scan the current directory, then tell you what it found.

That is the basic Claude Code interaction model. You describe what you want in natural language, and it chooses the right tool to do it.

Claude Code first chat screen

Step 3: Learn the Basic Commands

Inside a Claude Code conversation, a few slash commands come up all the time:

CommandWhat it does
/helpShow all available commands
/clearStart a new conversation with an empty context
/compactCompress conversation history and free up context
/costShow current usage and cost (same as /usage)

The one I use most is /compact. When a conversation gets too long, the context window can fill up. Run /compact to compress the less important history, and you can keep working. Claude Code also auto-compacts when the context window is nearly full; running it yourself lets you decide what to keep first.

You can also use non-interactive mode directly in Terminal:

claude -p "Fix the typos in README.md"

With -p, it runs the task and exits instead of entering an interactive chat. It is useful inside scripts. Without -p, claude "..." starts an interactive chat with that sentence.

Claude Code basic command panel

Step 4: Set Up CLAUDE.md

This is the key step that turns Claude Code from a “generic AI” into your personalized AI.

Create a CLAUDE.md file in the project root:

touch CLAUDE.md

Open it and write the first version of your rules. For beginners, I would start with these three sections:

# CLAUDE.md

![CLAUDE.md configuration example](/img/inline/claude-code-beginner-guide-inline-4-claudemd.webp)

## Project description
This is a personal blog built with Next.js.

![Project description example for Claude Code](/img/inline/claude-code-beginner-guide-inline-5-project-desc.webp)

## Code style
- Use TypeScript
- Prefer functional components
- Use camelCase for variable names

![Code style rules for Claude Code](/img/inline/claude-code-beginner-guide-inline-6-code-style.webp)

## Things to avoid
- Do not delete any existing files
- Do not run git push

After you save it, Claude Code will automatically read this file the next time it starts. When you talk to it, it will remember these rules.

CLAUDE.md can grow from the first 10 lines into a whole tree over time. But the starting point is that simple. Every time Claude Code does something you did not want, add one rule to CLAUDE.md.

Advanced: Layered Settings

CLAUDE.md can live at different levels:

  • Project-root CLAUDE.md: rules for the whole project
  • ~/.claude/CLAUDE.md: preferences shared across all projects

As a beginner, just take care of the project-root file first. Add the others only when you need them.

Step 5: Build a Simple Automation

Once Claude Code is installed, chat works, and CLAUDE.md is in place, try one slightly more advanced thing: let Claude Code automate a task for you.

Suppose every day you need to “open the project, run git pull, and check whether there are new issues.” You can write a simple script:

#!/bin/bash
cd /path/to/your/project
git pull
claude -p "List the 3 most recent unresolved GitHub issues and summarise each in one sentence" --allowedTools "Bash(gh issue list *)"

This example uses the GitHub CLI (gh) to read issues, so install it and sign in first. --allowedTools lets gh issue list run without a manual confirmation. Without it, non-interactive mode refuses any command that needs confirmation.

Save it as morning-check.sh, then make it executable:

chmod +x morning-check.sh

Run ./morning-check.sh every morning, and that is your first Claude Code automation.

It is simple, but the concept scales. Scheduled tasks, hooks, and MCP all extend from this same foundation.

Claude Code automation flow diagram

Next Steps

After you understand the 5 steps above, you can explore:

  • hooks: trigger custom actions on specific events
  • MCP: connect external tools and APIs
  • Scheduled tasks: let Claude Code run work at fixed times

These advanced features are covered in detail in the Complete Claude Code Guide.

Penchan’s Experience

My CLAUDE.md started as 3 simple rules and has gradually evolved into a layered, multi-file setup. The important habit is “add one rule every time you hit a pitfall.” The simpler the first version is, the better. After three months, you will realize you have built a very personal AI operating manual, and that manual is where Claude Code starts to pull away from other tools.

/compact is the most underrated command. A silently overflowing context window is one of the most common ways Claude Code gets stuck. Once you build the habit of compacting every so often, a session can stay open for a long time. Beginners also often forget that it can run in non-interactive mode directly with claude "...", and combined with cron, that is the simplest starting point for automation.

The starting point for OpenClaw’s multi-agent system is also CLAUDE.md. Add rules one by one, and a personal AI assistant can slowly grow into a multi-agent workflow. Beginners do not need to think that far ahead on day one, but it is useful to know the ceiling is high.

Further Reading


— Penchan