How to Install and Set Up Claude Code: Complete Beginner Guide
Step-by-step guide to install and set up Claude Code for beginners. Learn how to start coding with Claude easily and quickly.
Why Trust Our Content

How to install Claude Code takes one command and under 60 seconds. The official documentation assumes knowledge most first-time users do not have. Most people hit at least one blocker before reaching a working first session.
This guide covers every single step, in order: prerequisites, installation, authentication, your first real run, and CLAUDE.md setup. Every step is explicit. No knowledge is assumed and nothing is left out of the sequence.
Key Takeaways
- Installation is one command:
npm install -g @anthropic-ai/claude-codeis all you need once Node.js 18+ is in place. - Authentication is browser-based: Claude Code opens a browser window for OAuth on first launch, no manual token copying required.
- CLAUDE.md is what matters: Without it, every session starts cold; with it, Claude Code knows your stack from line one.
- Works on macOS and Linux natively: Windows requires WSL2 configured before installation will work correctly.
- You need an Anthropic account: A Claude.ai Pro or Max subscription or a funded API account is required for real use.
- Start with a real task: The fastest way to evaluate Claude Code is something you actually need done, not a test prompt.
Before You Install: Is Claude Code What You Need?
Claude Code is a terminal-based CLI coding agent. If you are looking for browser AI chat or IDE autocomplete, you are in the wrong place.
Not every AI coding tool is the same, and installing the wrong one wastes time. Claude Code runs in your terminal, not in a browser or inside your IDE.
- It is not Claude.ai: Claude.ai is a browser chat product. No installation required. Visit claude.ai if that is what you need.
- It is not an IDE plugin: GitHub Copilot, Cursor, and Codeium provide inline suggestions while you type. Claude Code does not.
- It is a terminal agent: Claude Code reads files, writes files, runs tests, and manages git from your command line.
- The right use case: You want to delegate whole implementation tasks to an AI that executes steps and reports back.
- Check first: For a full picture of what Claude Code actually is before installing, that overview covers architecture and use cases in detail.
Install Claude Code if you are a developer who wants an agent that acts in your codebase, not one that suggests lines inside your editor.
Step 1: Check Your Prerequisites
You need Node.js 18+, an Anthropic account, and a Unix-compatible terminal before running the install command.
Missing a prerequisite mid-install is the most common reason setup stalls. Check all of these before continuing.
- Node.js 18 or higher: Run
node --versionin your terminal. If you see anything below 18, update via nodejs.org ornvm. - An Anthropic account: You need a Claude.ai Pro or Max subscription ($20 or $100/month) or a funded Anthropic API account.
- A Unix-compatible terminal: macOS Terminal, iTerm2, or any Linux terminal works. Windows requires WSL2 first.
- Git installed: Claude Code's git features need git present. Check with
git --version. Most developers already have this. - macOS users: The Mac-specific setup guide covers Homebrew-based Node.js and common macOS blockers before continuing here.
- Windows users: Claude Code does not run in CMD or PowerShell. The Windows WSL setup guide walks through full WSL2 configuration first.
Once every item above is confirmed, the install command will complete without issues.
Step 2: Install Claude Code
Run one command: npm install -g @anthropic-ai/claude-code. The -g flag makes claude available from any directory on your machine.
The install process takes 30 to 60 seconds on a standard connection. Here is what to expect and what to do if it does not work.
- The install command:
npm install -g @anthropic-ai/claude-codedownloads and installs Claude Code globally via npm. - Verify the install: Run
claude --versionimmediately after. You should see a version number like1.x.x. - PATH not updated: If
claude --versionreturns "command not found," runnpm config get prefixto find the bin directory, then add it to your.zshrcor.bashrc. - Permissions error: Do not use
sudo npm install -g. Instead, configure npm to use a directory you own. Follow npm's official permissions guide. - Updating from a previous version: Run
npm update -g @anthropic-ai/claude-codeto get the latest version before continuing.
If claude --version returns a version number, installation is complete. Move to authentication.
Step 3: Authenticate Claude Code
On first run, Claude Code opens a browser window for OAuth login. Approving it in the browser completes authentication in your terminal automatically.
Navigate to your project directory and run claude to trigger the authentication flow. This only happens once per machine.
- Start Claude Code: In your terminal, run
cd /path/to/your/projectthenclaudeto launch for the first time. - Browser OAuth: A browser window opens. Sign in to your Anthropic account and click Authorise. Authentication completes in the terminal.
- If the browser does not open: Claude Code displays a URL. Copy it, paste into any browser, complete the OAuth flow, then return to your terminal.
- API key alternative: Set
ANTHROPIC_API_KEY=your_keyin your.zshrcor.bashrcto skip browser auth. Claude Code uses it automatically. - Get your API key: Sign in at console.anthropic.com, go to API Keys, create a new key, and copy it. Note that API key access bills per token.
- Confirm success: After authenticating, Claude Code displays a welcome prompt in the terminal. You are ready to proceed.
For all authentication methods including team setups and CI environments, the full authentication options guide covers every scenario.
Step 4: Run Your First Task
Type your task at the prompt and press Enter. Claude Code displays its reasoning and tool calls as it works. You approve writes before they happen.
Keep the first task concrete and contained. A task that reads but does not write is the safest starting point.
- A good first task: "Read the README and list the main dependencies." Safe, fast, and shows you how Claude Code reads files.
- Approval mode is on by default: When Claude Code wants to write a file or run a command, it asks for your confirmation first.
- Approve or decline: Press Y or Enter to approve a proposed action. Press N to decline and keep the file unchanged.
- Stop mid-task: Press Ctrl+C to interrupt. Type
/exitor press Ctrl+D to close the session entirely. - Answer clarifying questions: If Claude Code asks something, answer it. It will continue after receiving your response.
After one successful task, you have confirmed authentication is working and Claude Code can read your codebase. Move to CLAUDE.md.
Step 5: Set Up CLAUDE.md for Your Project
CLAUDE.md is a Markdown file in your project root that Claude Code reads automatically at the start of every session. It is persistent project memory.
Without CLAUDE.md, Claude Code has no context about your stack, conventions, or constraints. Every session starts from scratch. With a good CLAUDE.md, every session starts fully informed.
- Create the file: Run
touch CLAUDE.mdin your project root, then open it in your editor. - Tech stack section: List your exact languages, frameworks, and major libraries. For example: "React 18, TypeScript, Node.js, PostgreSQL, Prisma ORM."
- File structure section: Describe what lives where. For example: "API routes in
/src/api, business logic in/src/services." - Conventions section: Name your patterns and anti-patterns. For example: "Always async/await, never callbacks. Error handling uses a Result type."
- Test setup section: Include how to run tests. For example: "Run
npm test. Tests are in__tests__/. Framework is Jest." - Known constraints section: List what Claude Code must not change, such as legacy routes with external consumers.
For templates and advanced configuration patterns, the complete CLAUDE.md setup guide covers every option in detail.
What to Do After Installation
The fastest next step is one real task you actually need done this week. Run it with your CLAUDE.md in place and evaluate based on that, not a demo.
You have Claude Code installed, authenticated, and contextualised. Here is how to move from setup to productive use.
- Pick a real task: A failing test, a feature you have been putting off, a refactor you have avoided. Run it with CLAUDE.md in place.
- Learn the commands: Claude Code has slash commands like
/help,/clear,/compact, and/status. The full CLI commands reference covers every option. - Try headless mode: Once comfortable, run
claude --headlessfor tasks where you do not need confirmation on every step. - Watch a real workflow: The first Claude Code project tutorial walks a full development task from initial prompt to committed result.
- Join the community: Anthropic's Discord and the Claude Code Reddit community share CLAUDE.md templates and workflow patterns regularly.
The setup that took 15 minutes will pay back on the first real task. Start there.
Conclusion
Installing Claude Code is the easy part.
The setup that actually determines whether you get value is CLAUDE.md. Spend 20 minutes on it after installation and the first real session will be meaningfully better than a cold start.
Install now with npm install -g @anthropic-ai/claude-code, write your CLAUDE.md, and run one real task. You will know within that first session whether Claude Code belongs in your workflow.
How LowCode Agency Can Help
Getting Claude Code installed is one thing. Getting it configured so it is useful from day one for a development team is another challenge entirely.
At LowCode Agency, we are a strategic product team, not a dev shop. We set up Claude Code environments for development teams, including CLAUDE.md configuration, authentication setup, and the workflow scaffolding that makes the tool productive immediately rather than after weeks of trial and error.
- CLAUDE.md configuration: We write project-specific CLAUDE.md files calibrated to your stack, conventions, and architectural constraints from day one.
- Authentication setup: We configure API key management, environment variable handling, and team access patterns so every developer is authenticated correctly.
- Workflow design: We structure the Claude Code workflow for your team size, project type, and delivery cadence so the tool fits how you actually work.
- Stack integration: We connect Claude Code to your existing tools: Bubble, FlutterFlow, Supabase, Firebase, Xano, and the platforms your product runs on.
- Onboarding: We run hands-on sessions so your team knows how to prompt effectively, manage context, and review output before it ships.
- Quality process: We implement the review checkpoints and test coverage requirements that keep Claude Code output production-ready at every step.
- Ongoing support: We stay involved through the first sprint so the workflow is embedded, not just introduced once and forgotten.
We have built 350+ products for clients including Coca-Cola, American Express, and Medtronic.
If you want Claude Code set up correctly for your team from the start, talk to our team.
Last updated on
April 10, 2026
.








