Sitemap

Member-only story

Nodenv Cheatsheet

--

This is your ultimate destination if you are looking for a quick walkthrough of how to use the Nodenv CLI tool.

1. Installation

Install nodenv via Homebrew (macOS/Linux)

brew install nodenv

Install nodenv via Git

git clone https://github.com/nodenv/nodenv.git ~/.nodenv $ cd ~/.nodenv && src/configure && make -C src

Add nodenv to your shell’s initialization file (~/.bashrc, ~/.bash_profile, or ~/.zshrc)

echo 'export PATH="$HOME/.nodenv/bin:$PATH"' >> ~/.bashrc $ echo 'eval "$(nodenv init -)"' >> ~/.bashrc $ source ~/.bashrc

2. Basic Usage

List all available Node.js versions

nodenv install --list

Install a specific Node.js version

nodenv install <version>

Set a global Node.js version

nodenv global <version>

Set a local Node.js version (per project)

nodenv local <version>

3. Version Management

List installed Node.js versions

nodenv versions

Switch to a specific Node.js version

--

--