If you’ve been curious about Claude Code — Anthropic’s AI-powered coding assistant — but assumed it was only for seasoned developers or required a paid plan, this guide is for you. In 2026, getting started with Claude Code is more accessible than ever, and yes, you can spin it up without spending a single dollar. Whether you’re a student working on a class project, a blogger who wants to automate a few tasks, or a small-business owner trying to build a simple tool, this tutorial walks you through every step.
By the end of this guide, you’ll have Claude Code running on your machine, connected to a free API tier, and ready to help you write, debug, and explain code in plain English.
Requirements / What You Need
- A computer running Windows 10/11, macOS 12+, or a modern Linux distro
- An internet connection
- A free Anthropic account (sign up at console.anthropic.com)
- Node.js 18 or higher installed (we’ll cover this in Step 1)
- Basic comfort using a terminal or command prompt — no coding experience required
- About 20–30 minutes of your time
Note: As of 2026, Anthropic offers a free usage tier for the Claude API with monthly credit limits. This is enough for light personal use, learning, and small projects. You will not need a credit card to get started if you stay within the free tier limits.
Step 1: Install Node.js on Your Computer
Claude Code runs as a command-line tool built on Node.js. If you already have Node.js 18 or newer, skip ahead to Step 2.
- Open your browser and go to nodejs.org.
- Download the LTS (Long-Term Support) version for your operating system.
- Run the installer and follow the on-screen prompts. Accept the default settings — they work fine for most users.
- Once installation finishes, open a terminal (Mac/Linux) or Command Prompt (Windows) and type:
node –version
You should see a version number like v20.x.x or higher. If you do, Node.js is installed correctly.
Tip: On Windows, search for “Command Prompt” in the Start menu. On macOS, press Command + Space and type “Terminal.”
Step 2: Create a Free Anthropic Account
- Visit console.anthropic.com in your browser.
- Click Sign Up and enter your email address.
- Verify your email by clicking the link Anthropic sends you.
- Complete your profile — no payment information is required to access the free tier.
- Once you’re logged into the Anthropic Console, navigate to the API Keys section (usually found under your account settings or a “Get API Key” button on the dashboard).
- Click Create API Key, give it a name like “Claude Code Personal,” and then click Create.
- Copy the key immediately and paste it somewhere safe (like a plain text file). Anthropic will only show it to you once.
⚠️ Warning: Never share your API key publicly — not in a blog post, a GitHub repo, or a screenshot. Anyone with your key can use your free quota. If you accidentally expose it, return to the Console and delete it, then generate a new one.
Step 3: Install Claude Code via npm
With Node.js ready and your API key saved, it’s time to install Claude Code itself.
- Open your terminal or Command Prompt.
- Type the following command and press Enter:
npm install -g @anthropic-ai/claude-code
- Wait for the installation to complete. You’ll see a progress log in the terminal. This usually takes under a minute.
- Once done, confirm the install worked by typing:
claude –version
You should see a version number printed on screen. If you get a “command not found” error, see the Troubleshooting section below.
Step 4: Connect Your API Key to Claude Code
Now you need to tell Claude Code which API key to use. There are two easy ways to do this.
Option A: Set It During First Launch (Recommended for Beginners)
- In your terminal, navigate to any folder you’d like to work in. For example:
cd Desktop
- Type claude and press Enter.
- On first launch, Claude Code will prompt you to enter your API key. Paste the key you copied in Step 2 and press Enter.
- Claude Code will save the key locally so you won’t need to enter it again.
Option B: Set It as an Environment Variable (More Flexible)
- On macOS/Linux, open your terminal and type:
export ANTHROPIC_API_KEY=”your-api-key-here”
- On Windows Command Prompt, type:
set ANTHROPIC_API_KEY=your-api-key-here
To make this permanent on Windows, search for “Environment Variables” in the Start menu and add it under User Variables.
Pro Tip: If you’re on macOS or Linux, add the export line to your ~/.bashrc or ~/.zshrc file so the key loads automatically every time you open a terminal.
Step 5: Run Claude Code on Your First Project
Now the fun part — actually using it.
- In your terminal, navigate to any project folder or create a new one:
mkdir my-first-project && cd my-first-project
- Launch Claude Code:
claude
- You’ll see an interactive prompt. You can now type instructions in plain English. For example:
- “Create a simple Python script that renames all files in a folder by adding today’s date.”
- “Explain what this JavaScript function does.”
- “Fix the bug in this code and tell me what was wrong.”
- Claude Code will read your project files, generate code, and even apply changes directly — all from the terminal.
Tip: You don’t need to be a developer to get value here. Even simple tasks like “write me a formula explanation” or “create a basic HTML page for my business” work great with Claude Code.
Step 6: Stay Within the Free Tier Limits
To keep using Claude Code without paying, it’s smart to keep an eye on your usage.
- Log in to console.anthropic.com and check the Usage dashboard regularly.
- Free tier credits reset monthly. Heavy usage — like processing large codebases repeatedly — will burn through them faster.
- For light tasks (writing small scripts, debugging short snippets, asking questions), the free tier is typically more than enough.
- If you hit your limit, you can either wait for the monthly reset or add a small amount of credit to continue without interruption.
Pro Tip: Be specific and concise in your prompts. Shorter, clearer instructions use fewer tokens and stretch your free credits further.
Troubleshooting Tips
“command not found: claude” After Installing
This usually means npm’s global bin folder isn’t in your system’s PATH. Try running npx @anthropic-ai/claude-code as a temporary workaround. To fix it permanently, search online for “add npm global bin to PATH” along with your operating system name.
API Key Not Accepted or “Invalid Key” Error
Double-check that you copied the full key with no extra spaces. Keys are long — it’s easy to miss a character. Return to the Anthropic Console, delete the old key, generate a new one, and try again.
Installation Fails With Permission Errors (macOS/Linux)
Avoid using sudo with npm installs when possible, as it can cause permission issues down the line. Instead, configure npm to install global packages in your home directory. Search for “npm global install without sudo” for a step-by-step fix specific to your OS.
Claude Code Hangs or Doesn’t Respond
Check your internet connection first. If that’s fine, your free tier quota may be temporarily exhausted. Visit the Usage dashboard to confirm. You can also try pressing Ctrl + C to cancel and restart with a simpler prompt.
Node.js Version Too Old
If you see a Node.js version warning, uninstall your current version and reinstall the latest LTS from nodejs.org. Claude Code requires Node.js 18 or higher to function properly.
Wrapping Up
Setting up Claude Code for free is genuinely straightforward once you know the steps. You install Node.js, grab a free API key from Anthropic, install the tool with one npm command, and you’re ready to go. No expensive subscriptions, no complex configuration, no coding background required.
Whether you’re automating a repetitive task, learning how code works, or building something small for your business, Claude Code gives you a surprisingly powerful AI assistant right inside your terminal — completely free for everyday, light use.
Give it a try with a simple request today, and you might be surprised how much time it saves you.
Frequently Asked Questions
Is Claude Code really free?
Yes — Anthropic offers a free API usage tier that’s enough for light personal use. You don’t need a credit card to get started. If you need heavier usage, paid plans are available, but they’re optional.
Do I need to know how to code to use Claude Code?
No. You write instructions in plain English and Claude Code handles the technical side. It’s a great way to learn coding concepts too, since it explains what it’s doing.
Can I use Claude Code on Windows?
Yes. Claude Code works on Windows 10/11, macOS, and Linux. The setup steps are nearly identical across all platforms, with minor differences in how you set environment variables.
Is my code sent to Anthropic’s servers?
When you ask Claude Code to analyze or modify files, relevant content is sent to Anthropic’s API to generate a response. Review Anthropic’s privacy policy at anthropic.com if you have concerns about sensitive data.
