Node.js & Git Environment Setup
Claude Code, Codex CLI, and some helper tools require Node.js, npm, and Git.
Check Environment
Run in a terminal:
bash
node -v
npm -v
git --versionIf version numbers are printed, the basic environment is ready.
Installation Suggestions
Windows
Recommended tools:
- Node.js LTS
- Git for Windows
- Windows Terminal
After installation, reopen the terminal and check versions again.
macOS
You can use Homebrew:
bash
brew install node gitLinux
Ubuntu / Debian:
bash
sudo apt update
sudo apt install -y nodejs npm gitIf the Node.js version in the system repository is too old, use nvm to install an LTS version.
npm Permission Issues
On macOS / Linux, if global installation fails with permission errors, do not use sudo by default. Move the npm global directory to your user directory:
bash
mkdir -p ~/.npm-global
npm config set prefix '~/.npm-global'
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
source ~/.bashrcFor zsh, replace ~/.bashrc with ~/.zshrc.
