Vibe Coding for EveryonePart 2

How to Install Claude Code — A Step-by-Step Guide from Terminal to Your First Conversation

A step-by-step guide to installing Claude Code for the first time, covering terminal basics, Node.js installation, logging in (with a subscription or API key), and sending your first prompt.

To start vibe coding, the first thing you need to do is install a tool. This post walks you through installing Claude Code for the first time, step by step, from basic terminal usage all the way to your first conversation. Every step is explained in as much detail as possible so you can follow along even without any development experience.


What is a terminal

A terminal is a tool that lets you perform tasks by typing text commands into your computer. Instead of clicking icons with a mouse, you type commands on the keyboard to install or run programs.

It might feel unfamiliar at first, but the commands you’ll use for vibe coding in the terminal are limited to just a handful, so you’ll get comfortable with them quickly.

How to open a terminal

OSMethod
macOSOpen Spotlight with Command + Space → type “Terminal” → press Enter
WindowsPress Windows + R → type cmd → press Enter (or search for PowerShell)

Once you open the terminal, you’ll see a screen like the one below. If the cursor is blinking, it’s ready for you to type a command.

username@computername ~ %

Prerequisite: Installing Node.js

Claude Code runs in a Node.js environment. First, check whether Node.js is already installed.

Type the command below into the terminal and press Enter.

node --version

If a version number like v20.0.0 appears, it’s already installed. If nothing appears or you get an error, you’ll need to install Node.js.

How to install Node.js

Go to nodejs.org and download the LTS version (Long Term Support, the stable version). Run the installer and complete it with the default settings.

After installing, open a new terminal window and run node --version again — if a version number shows up, everything is set up correctly.


Installing Claude Code

Once Node.js is ready, install Claude Code. Type the command below into the terminal.

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

The -g flag means it’s installed globally, so you can use it from anywhere on your computer. The installation takes about 1-2 minutes.

Once it’s done, verify it with the command below.

claude --version

If a version number is printed, it’s installed correctly.


Choosing How to Log In: Subscription or API Key

To use Claude Code, you need to log in. There are two main ways to do this, and for most individual users, the first is recommended.

Option 1 (recommended): Log in with a Claude subscription

If you’re on a Claude subscription plan like Pro or Max, you can log in with that account directly — no separate API key or credit top-up required. Your usage is handled within your subscription plan’s limits, so you pay a flat monthly rate and don’t have to worry about what each session costs. If you don’t have a subscription yet, you can check the plans at claude.ai.

Option 2: Use an Anthropic API key

If you’d rather pay as you go instead of subscribing, you can create and use an API key.

  1. Visit console.anthropic.com, create an account, and log in.
  2. Select API Keys from the left-hand menu, then click Create Key to create one. The key is a long string that starts with sk-ant-, and it’s shown only once right after creation, so copy it somewhere safe.
  3. Add credits from the Billing menu. If you’re just starting out, $5-10 will cover quite a lot of light vibe coding work.

The API key route bills you for the tokens you use, while subscription login is a flat rate that makes costs easy to predict. For a beginner who isn’t doing heavy work, neither option is much of a burden.


Running Claude Code for the first time

In the terminal, navigate to the folder you want to work in, then run Claude Code.

claude

The first time you run it, you’ll see a screen asking you to choose a login method. To log in with a subscription, choose the Claude account login — a web browser will open, and you sign in with your account to finish authenticating. If you’ve decided to use an API key, choose that option and paste the key you copied earlier, then press Enter.

Once you’re logged in, you’ll see a screen like this.

Claude Code

> 

If the cursor is blinking after the >, you’re ready to go.


Sending your first prompt

Let’s start your first conversation with Claude Code. Type the following after the > and press Enter.

Hi. Please create a simple HTML file. The title should be "Hello, Vibe Coding," and it should display large, centered text that says "My first page made with AI."

If a permission prompt appears when Claude Code tries to create the file, type y and press Enter.

A moment later, an index.html file will be created. Open this file in your browser, and you’ll see the page you just requested.


Frequently used Claude Code commands

Here are some basic commands that are useful to know while using Claude Code.

CommandDescription
claudeRun Claude Code
/helpShow the list of available commands
/clearClear the conversation history
/exitQuit Claude Code
Ctrl + CStop the current task

How to navigate between folders

To move to a specific project folder in the terminal, use the cd command.

cd folder-path

For example, if you created a folder called my-project on your desktop and want to work inside it, you’d type the following.

# macOS
cd ~/Desktop/my-project

# Windows
cd C:\Users\username\Desktop\my-project

To check which folder you’re currently in, use the command below.

# macOS / Linux
pwd

# Windows
cd

Summary

So far, we’ve opened the terminal, installed Node.js and Claude Code, gotten an API key, and sent our first prompt.

In the next post, we’ll cover how to write a CLAUDE.md file so that Claude Code properly understands your project. This one file can make a huge difference in the quality of the AI’s work.