talira

Node Version Manager: install and switch between Node.js versions from the command line

open sourceMITself-hostablefree

nvm (Node Version Manager) installs and switches between versions of Node.js from the command line: nvm install 24 then nvm use 22. It's a POSIX shell script installed per user and invoked per shell, working in sh, dash, ksh, zsh and bash on Unix, macOS and Windows WSL (and in some cases Git Bash or Cygwin). It installs LTS releases by codename, reads the version a project wants from an .nvmrc file (and can switch automatically when you enter its directory), migrates global npm packages between versions, installs from a mirror or offline from cache, and can install a default set of global packages. It's maintained by the nvm-sh project under the MIT licence. Native Windows without WSL isn't supported.

Problems it solves

  • switch between Node.js versions for different projects
  • install the latest Node.js LTS without sudo
  • use the Node version a project pins in its .nvmrc automatically
  • test my package against several Node.js versions on one machine
  • keep my global npm packages when I upgrade Node

Features

  • install and switch Node.js versions per shell
  • LTS codename installs
  • .nvmrc project versions and automatic switching
  • migrating global packages between versions
  • mirrors and offline installs
  • default global packages file

Limitations

  • Doesn't support native Windows outside WSL, Git Bash or Cygwin1

Capabilities

Has a command line toolplan not known

Alternatives

The same job

These do what nvm does.

  1. fnm (Fast Node Manager) Fast and simple Node.js version manager, built in Rust
  2. asdf Manage multiple runtime versions with a single CLI tool, extendable via plugins
  3. mise dev tools, env vars, task runner
  4. FVM Simple Flutter Version Management

Compare nvm with the top 3