explaingit

nvm-sh/nvm

Analysis updated 2026-06-20

93,236ShellAudience · developerComplexity · 2/5Setup · easy

TLDR

nvm lets you install multiple versions of Node.js on one machine and switch between them with a single command, essential when different projects need different Node versions.

Mindmap

mindmap
  root((nvm))
    What it does
      Manage Node versions
      Switch per project
      One-command install
    Supported Shells
      Bash
      Zsh
      ksh
    Use Cases
      Multi-project dev
      CI environment setup
      Bug reproduction
    Key Features
      nvmrc file
      LTS helper
      Package migration
    Platforms
      macOS
      Linux
      WSL
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Switch a project to Node 22 with one command while keeping another project pinned to Node 18.

USE CASE 2

Add an .nvmrc file to a project so teammates and CI automatically use the correct Node version.

USE CASE 3

Test whether a bug appears only on a specific Node version by installing and switching to it in seconds.

USE CASE 4

Install the latest Node.js LTS on a fresh machine without a package manager or admin rights.

What is it built with?

ShellBash

How does it compare?

nvm-sh/nvmmsitarzewski/agency-agentspapers-we-love/papers-we-love
Stars93,23694,309105,928
LanguageShellShellShell
Setup difficultyeasyeasyeasy
Complexity2/51/51/5
Audiencedeveloperdeveloperdeveloper

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · easy Time to first run · 5min

Installed via a curl or wget one-liner, requires a shell restart or sourcing the nvm script before first use.

In plain English

nvm, short for Node Version Manager, is a command-line tool that lets a developer install many different versions of Node.js on the same computer and switch between them with one command. Node.js is a runtime that lets JavaScript code run outside a web browser, used to build servers, command-line tools, and other JavaScript-based software. Different projects often expect different Node versions, and nvm makes it possible to keep all of them ready and pick the right one for whichever project is currently open. The README describes nvm as a POSIX-compliant shell script, meaning a small program written in shell language that works under sh, dash, ksh, zsh, and bash on Unix, macOS, and Windows Subsystem for Linux. It is installed once per user and activated per shell session. Typical usage shown in the README is short: nvm install 24 downloads and switches to Node 24, nvm use 22 switches to a previously installed version, and node -v confirms which is active. There is also a long-term-support helper, an offline-install option, a way to migrate global packages between versions while installing, and an .nvmrc file that lets a project record the version it expects so nvm picks it up automatically. People typically reach for nvm when one project needs an older Node and another needs the latest, when reproducing a bug that only appears on a specific version, or when configuring CI/CD images. The README walks through install scripts using curl or wget, manual and Docker-based installs, troubleshooting on Linux and macOS, shell-completion setup, and steps for uninstalling.

Copy-paste prompts

Prompt 1
I'm using nvm, show me the commands to install Node 20, set it as my default version, and verify it's active.
Prompt 2
Help me add an .nvmrc file to my project so nvm picks the right Node version automatically when I enter the folder.
Prompt 3
I have nvm installed but nvm use says the version is not installed. Walk me through diagnosing and fixing this.
Prompt 4
How do I migrate my global npm packages from Node 18 to Node 22 when installing a new version with nvm?

Frequently asked questions

What is nvm?

nvm lets you install multiple versions of Node.js on one machine and switch between them with a single command, essential when different projects need different Node versions.

What language is nvm written in?

Mainly Shell. The stack also includes Shell, Bash.

How hard is nvm to set up?

Setup difficulty is rated easy, with roughly 5min to a first successful run.

Who is nvm for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub nvm-sh on gitmyhub

Verify against the repo before relying on details.