Skip to content

nvm

Per-user Node.js version switcher for shell users on Linux, macOS and WSL

Permissive (OSI) · MIT
  • macOS
  • Linux
  • CLI

Listed by , founder & editor

76

Health

Thriving

Overview

Stars

96,282

Last commit

yesterday

Nov 2026

Repository age

16 years

since Apr 2010

Latest version

v0.41.0

Nov 2026

Contributors

–

6 active in 90 days

Releases

6

last 12 months

Language

Shell

nvm is a shell script that installs several versions of Node.js side by side and lets you switch between them from the command line. You install it per user, and each shell session picks its own active version. It works in POSIX-compliant shells such as sh, dash, ksh, zsh and bash, on Linux, macOS and Windows WSL.

You run commands like nvm install 24 or nvm use 22 and the matching node and npm are put on your PATH. A .nvmrc file in a project directory records the version that project needs, and shell hooks for bash, zsh and fish can call nvm use automatically when you enter that directory. It can also move global packages when you install a new version, use a mirror of Node binaries, and handle long-term support release lines.

The install script clones the repository to ~/.nvm and adds source lines to your shell profile. It is MIT licensed and written in shell. It is not a replacement for one specific commercial product. It covers the same ground as the version managers bundled with language toolchains or app stores.

Who it's for

Web developers working on projects pinned to different Node versions

A .nvmrc file per project and automatic switching on cd keep each project on the right runtime.

Skip if: You work on native Windows without WSL, where this script does not run.

CI and Docker image authors

The install script can run non-interactively, and the project documents use in Docker and CI jobs.

Skip if: You only need one fixed Node version, where the base image's own package is simpler.

Teams testing libraries across Node release lines

You can install LTS and current versions together and switch between them in seconds.

Skip if: You want a version manager that is not a shell function, such as a standalone binary.

The problem it solves

Different projects need different Node.js versions, and a single system-wide install forces you to upgrade or downgrade by hand. nvm keeps many versions installed in your home directory and switches between them per shell.

Strengths

  • Works in sh, dash, ksh, zsh and bash on Linux, macOS and WSL
  • Reads .nvmrc and can switch versions automatically when you change directory
  • Can carry global packages over when you install a new version
  • Supports mirrors of Node binaries and offline installs
  • MIT licensed, with 6 releases in the last year

Trade-offs

  • No native Windows support; you need WSL
  • It is a sourced shell function, so it adds to shell startup time
  • Installed per user, not system-wide
  • Installing on Alpine Linux needs extra steps

Self-host nvm

Self-hostable
No (desktop or local app)
Hosted plan
From $4/month · pricing

Quick start

curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.41.0/install.sh | bash

From the project's own install instructions. Check the docs for production settings.

Frequently asked questions

Is nvm free?

Yes. It is MIT licensed and free to use.

Does it run on Windows?

Only through Windows WSL. It targets POSIX shells on Linux, macOS and WSL.

How do I install it?

Run the install script with curl or wget. It clones the repository to ~/.nvm and adds source lines to your shell profile.

Can it switch versions automatically per project?

Yes. Put the version in a .nvmrc file and add the shell integration for bash, zsh or fish to call nvm use on directory change.

Similar tools in App stores and package managers

pipenv

App stores and package managers

Python tool that manages virtualenvs and lockfiles for application developers

25k 1.9k today Thriving MIT

Carthage

App stores and package managers

Decentralized dependency manager for Cocoa apps that builds frameworks without touching

15k 1.5k 2 years ago Dormant MIT

pypiserver

App stores and package managers

Minimal self-hosted PyPI-compatible server for teams sharing private Python packages

2.1k 349 15 days ago Slowing MIT

cargo

App stores and package managers

Rust's official package manager and build tool for fetching dependencies and compiling

16k 3.3k today Active Apache-2.0

vcpkg

App stores and package managers

C/C++ package manager from Microsoft for Windows, macOS and Linux projects

28k 7.8k today Thriving MIT

nexus-public

App stores and package managers

Self-hosted binary repository manager for Maven, raw and APT artifacts, built on Java

2.7k 760 10 months ago Slowing EPL-1.0

Replaces JFrog Artifactory