Skip to content

Install Node.js ​

Install Node.js LTS on Windows, macOS, or Linux, and verify that the node/npm commands work.

Codex, Claude Code, and Gemini CLI all depend on Node.js. Complete this guide first, then continue with the setup for each tool.

Windows ​

Option 1: Official installer (recommended)

Go to the Node.js website, download the LTS version, then double-click the installer and follow the prompts.

Option 2: Use Chocolatey

Bash
choco install nodejs-lts

Option 3: Use Scoop

Bash
scoop install nodejs-lts

macOS ​

Option 1: Use Homebrew (recommended)

Bash
brew install node

Option 2: Official installer

Go to the Node.js website and download the macOS installer.

Linux ​

Ubuntu / Debian:

Bash
curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
sudo apt-get install -y nodejs

CentOS / RHEL:

Bash
curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
sudo yum install -y nodejs

Verify installation ​

After installation, run:

Bash
node --version
npm --version

If version numbers are printed, Node.js and npm are ready to use.