← BLOG
Tutorial

How to Install Claude Code and Run Your First AI Task

Install Claude Code on any platform and run your first autonomous coding task in under 10 minutes. This guide covers installation, setup, and your first real prompts.

Claude Code is Anthropic's agentic coding tool. It runs in your terminal, reads your entire project, edits files, runs commands, and iterates on results. This guide gets you from zero to your first productive session in under 10 minutes.

How do you install Claude Code?

Claude Code installs via a single command on macOS, Linux, or WSL. On Windows, use PowerShell.

macOS / Linux / WSL

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

Windows PowerShell

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

Alternative methods

MethodCommand
Homebrew (macOS)brew install claude-code
npm (any platform)npm install -g @anthropic-ai/claude-code
VS Code ExtensionSearch "Claude Code" in VS Code marketplace
JetBrains PluginSearch "Claude Code" in JetBrains marketplace

Verify the installation:

bash
claude --version
# Claude Code 2.x.x

How do you start your first session?

Navigate to any project directory and type `claude`. Claude Code reads your project structure and builds context automatically. You don't need to configure anything to start.

bash
cd your-project
claude

You'll see a prompt where you can type natural language instructions. Claude Code understands your project because it reads your files, not because you explain them.

What are good first prompts?

Start with tasks that help you understand what Claude Code can do. These prompts work well for a first session:

bash
# Understand the project
> "What does this project do? Give me a high-level overview."

# Find issues
> "Are there any obvious bugs or code smells in this codebase?"

# Take action
> "Write tests for the auth module, run them, and fix any failures"

# Multi-step task
> "Add input validation to the user registration form,
   write unit tests, and commit with a descriptive message"
TIP

The last example shows Claude Code's real power: it writes code, runs tests, reads output, fixes failures, and commits. All in one prompt. That's the difference between a chat tool and an agent.

What makes Claude Code different from other AI tools?

CapabilityClaude CodeChat-based tools
File accessReads any file in your projectOnly what you paste
ExecutionRuns commands in your terminalNo execution
IterationFixes its own mistakesYou copy-paste fixes
GitCreates commits, branches, PRsNo git integration
MemoryCLAUDE.md persists across sessionsNo memory

How do you set up CLAUDE.md for better results?

Create a CLAUDE.md file at your project root. Claude Code reads it at the start of every session. It tells the agent about your project's conventions, tech stack, and rules.

bash
# Create CLAUDE.md automatically
claude /init

# Or write one manually
cat > CLAUDE.md << 'EOF'
# Project Context
Next.js 14 app with TypeScript and Tailwind CSS.

## Commands
- npm run dev — start dev server
- npm run test — run tests

## Conventions
- Use server components by default
- Never use `any` in TypeScript
EOF

Check out our detailed guide on CLAUDE.md best practices for advanced configuration.

Frequently asked questions

Do I need a Claude subscription to use Claude Code?+
You need a Claude account. The free tier gives you limited daily messages. Claude Pro ($20/month) provides much higher limits and is recommended for regular use. You can also use the API with pay-per-token pricing.
Does Claude Code work with any programming language?+
Yes. Claude Code reads source files regardless of language and can run any commands available in your terminal. It works with Python, JavaScript, TypeScript, Go, Rust, Java, C++, Ruby, PHP, and more.
Is Claude Code safe to use in production codebases?+
Yes. Claude Code has a permission system that lets you control what it can do. You can restrict file access, require approval for destructive commands, and use Plan Mode to review changes before they happen.
Can I use Claude Code inside VS Code?+
Yes. Install the Claude Code VS Code extension from the marketplace. It gives you the same terminal agent experience integrated directly into your editor.
ALL POSTSSTART FREE COURSE →