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-ltsOption 3: Use Scoop
Bash
scoop install nodejs-ltsmacOS
Option 1: Use Homebrew (recommended)
Bash
brew install nodeOption 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 nodejsCentOS / RHEL:
Bash
curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
sudo yum install -y nodejsVerify installation
After installation, run:
Bash
node --version
npm --versionIf version numbers are printed, Node.js and npm are ready to use.
