// Prerequisites
Node.js 20 LTS
All three AI CLI tools require Node.js version 18 or higher. We recommend installing Node.js 20 LTS for maximum compatibility.
Git
Git is required for version control features. All three tools integrate with Git for tracking changes, creating commits, and managing branches.
API keys
Each tool requires an API key from its respective provider. You'll set these up during installation.
// Mac Setup
macOS comes with Terminal.app, but there are better alternatives for AI coding:
Modern terminal with built-in AI assistance. Great for learning commands.
warp.devHighly customizable, split panes, search, and extensive features.
iterm2.comWorks fine for basic use. No installation needed.
Homebrew is the easiest way to install developer tools on Mac. Open Terminal and run:
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
After installation, you MUST add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> ~/.zshrc
source ~/.zshrc
Verify installation: brew --version
nvm (Node Version Manager) lets you install and switch between Node.js versions easily.
Step 1: Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.1/install.sh | bash
Step 2: Add to your shell profile
Add these lines to your ~/.zshrc file:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"
Step 3: Restart terminal and install Node
# Restart your terminal, then:
nvm install 20 # Install Node.js 20 LTS
nvm use 20 # Use Node.js 20
node --version # Verify installation
macOS may already have Git installed. Check first:
git --version
If not installed, use Homebrew:
brew install git
First time? Configure your identity:
git config --global user.name "Your Name"
git config --global user.email "your@email.com"
// Windows Setup
WSL2 gives you a full Linux environment inside Windows. Most programming tutorials assume Unix-like systems, so this makes following them much easier.
Modern Windows shell. Works for all three CLI tools but some commands differ from tutorials.
Old Windows shell. Not recommended for development work.
Get Windows Terminal: Free from the Microsoft Store. It lets you use PowerShell, CMD, and WSL2 in one app with tabs.
Step 1: Open PowerShell as Administrator
Right-click the Start menu and select "Windows Terminal (Admin)" or "PowerShell (Admin)"
Step 2: Install WSL
wsl --install
This installs Ubuntu by default. You'll be prompted to restart.
Step 3: Set up your Linux user
After restart, Ubuntu will open and ask you to create a username and password. This is separate from your Windows login.
After WSL2 is set up: Use Windows Terminal to open an "Ubuntu" tab. All following Node.js and Git commands will work just like on Mac/Linux.
Enable Script Execution
Windows blocks scripts by default. Open PowerShell as Administrator and run:
Set-ExecutionPolicy RemoteSigned
Install Node.js with nvm-windows
- 1. Uninstall any existing Node.js installations first
- 2. Download nvm-windows from GitHub
- 3. Run the installer
- 4. Open PowerShell as Administrator and run:
nvm install lts
nvm use lts
node --version
Install Git for Windows
Download and install from git-scm.com. This also includes Git Bash as an alternative shell.
C
// Claude Code
Anthropic
Claude Code is Anthropic's CLI tool powered by Claude 4.5 Opus. It can read your codebase, make changes, run commands, and help you ship code faster.
Installation
npm install -g @anthropic-ai/claude-code
npm install -g @anthropic-ai/claude-code
Same command works in PowerShell, WSL2, or Git Bash.
First run
Navigate to your project folder and run:
claude
You'll be prompted to authenticate with your Anthropic account or API key.
G
// Gemini CLI
Google
Gemini CLI is Google's agentic CLI tool powered by Gemini 3.0 models. Free tier available with Google AI Studio.
npm install -g @anthropic-ai/gemini-cli
Run gemini in your project folder to start.
X
// Codex CLI
OpenAI
Codex CLI is OpenAI's coding assistant powered by GPT 5.1. Requires an OpenAI API key.
npm install -g @openai/codex
Run codex in your project folder to start.
// Status Line Config
A custom status line shows git status, token usage, and project info at a glance. This is optional but recommended for AI-assisted development.
See the Vibe Coding Guide for detailed status line configuration.
// Troubleshooting
"command not found" after installation
Your terminal can't find the installed package. Try restarting your terminal, or check that npm's bin directory is in your PATH.
npm config get prefix # Shows where npm installs global packages
Permission errors on Mac/Linux
Don't use sudo npm install -g. Instead, fix npm permissions or use nvm.
API key issues
Make sure your API key is valid and has the correct permissions. Each tool stores keys differently - check their documentation for details.