HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
nvm-sh
nvm
Shell2011–2026
nvm-sh / nvm

nvm

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions.

40Distinct people
42Mentions
0Explicit recommenders
96.1KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions.

GitHub

Where it is used

No documented product use was verified in the last source check.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

  • tj/n · linked in 5 of the same discussions

Mentioned in the same Hacker News threads. That is not proof they are substitutes.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by year42 dated mentions

Observed mentions: 2011-04-02 23:14:24 UTC to 2026-06-08 16:40:06 UTC.

0123452011-01-01 00:00:00 UTC to 2012-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments20112012-01-01 00:00:00 UTC to 2013-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2013-01-01 00:00:00 UTC to 2014-01-01 00:00:00 UTC (exclusive): 2 mentions; 0 submissions, 2 comments2014-01-01 00:00:00 UTC to 2015-01-01 00:00:00 UTC (exclusive): 2 mentions; 1 submissions, 1 comments2015-01-01 00:00:00 UTC to 2016-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2016-01-01 00:00:00 UTC to 2017-01-01 00:00:00 UTC (exclusive): 3 mentions; 1 submissions, 2 comments2017-01-01 00:00:00 UTC to 2018-01-01 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 comments2018-01-01 00:00:00 UTC to 2019-01-01 00:00:00 UTC (exclusive): 4 mentions; 0 submissions, 4 comments20182019-01-01 00:00:00 UTC to 2020-01-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2020-01-01 00:00:00 UTC to 2021-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2021-01-01 00:00:00 UTC to 2022-01-01 00:00:00 UTC (exclusive): 4 mentions; 1 submissions, 3 comments2022-01-01 00:00:00 UTC to 2023-01-01 00:00:00 UTC (exclusive): 3 mentions; 0 submissions, 3 comments2023-01-01 00:00:00 UTC to 2024-01-01 00:00:00 UTC (exclusive): 5 mentions; 0 submissions, 5 comments2024-01-01 00:00:00 UTC to 2025-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2025-01-01 00:00:00 UTC to 2026-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2026-01-01 00:00:00 UTC to 2027-01-01 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments. Incomplete calendar period.2026*

* An incomplete calendar period is marked with an outlined bar. Its count is not directly comparable with a full period.

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
20112011-01-01 00:00:00 UTC2012-01-01 00:00:00 UTC101
20122012-01-01 00:00:00 UTC2013-01-01 00:00:00 UTC202
20132013-01-01 00:00:00 UTC2014-01-01 00:00:00 UTC202
20142014-01-01 00:00:00 UTC2015-01-01 00:00:00 UTC211
20152015-01-01 00:00:00 UTC2016-01-01 00:00:00 UTC514
20162016-01-01 00:00:00 UTC2017-01-01 00:00:00 UTC312
20172017-01-01 00:00:00 UTC2018-01-01 00:00:00 UTC514
20182018-01-01 00:00:00 UTC2019-01-01 00:00:00 UTC404
20192019-01-01 00:00:00 UTC2020-01-01 00:00:00 UTC000
20202020-01-01 00:00:00 UTC2021-01-01 00:00:00 UTC303
20212021-01-01 00:00:00 UTC2022-01-01 00:00:00 UTC413
20222022-01-01 00:00:00 UTC2023-01-01 00:00:00 UTC303
20232023-01-01 00:00:00 UTC2024-01-01 00:00:00 UTC505
20242024-01-01 00:00:00 UTC2025-01-01 00:00:00 UTC101
20252025-01-01 00:00:00 UTC2026-01-01 00:00:00 UTC101
2026 (partial)2026-01-01 00:00:00 UTC2027-01-01 00:00:00 UTC101

From the project README

An excerpt from the repository, fetched Nov 13, 2026.

Read the project’s introduction
Node Version Manager Table of Contents Intro About Installing and Updating Install & Update Script Additional Notes Installing in Docker Installing in Docker for CICD-Jobs Troubleshooting on Linux Troubleshooting on macOS Ansible Verify Installation Important Notes Git Install Manual Install Manual Upgrade Usage Long-term Support Version Categories Migrating Global Packages While Installing Migrating Global Packages Between Installed Versions Offline Install Default Global Packages From File While Installing io.js System Version of Node Listing Versions Setting Custom Colors Persisting custom colors Suppressing colorized output Restoring PATH Set default node version Use a mirror of node binaries Pass Authorization header to mirror Platforms without official binaries .nvmrc Deeper Shell Integration Calling nvm use automatically in a directory with a .nvmrc file bash zsh fish Running Tests Environment variables Bash Completion Usage Compatibility Issues Installing nvm on Alpine Linux Alpine Linux 3.13+ Alpine Linux 3.5 - 3.12 Uninstalling / Removal Manual Uninstall Docker For Development Environment Problems macOS Troubleshooting WSL Troubleshooting Maintainers Project Support Enterprise Support License Copyright notice Intro nvm allows you to quickly install and use different versions of node via the command line. Example: $ nvm install 24 Now using node v24.14.0 (npm v11.9.0) $ node -v v24.14.0 $ nvm use 22 Now using node v22.22.1 (npm v10.9.4) $ node -v v22.22.1 $ nvm use 20 Now using node v20.20.1 (npm v10.8.2) $ node -v v20.20.1 Simple as that! About nvm is a version manager for node.js, designed to be installed per-user, and invoked per-shell. nvm works on any POSIX-compliant shell (sh, dash, ksh, zsh, bash), in particular on these platforms: unix, macOS, and Windows WSL. Installing and Updating Install & Update Script To install or update nvm, you should run the install script. To do that, you may either download and run the script manually, or use the following cURL or Wget command: curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash wget -qO- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash Running either of the above commands downloads a script and runs it. The script clones the nvm repository to ~/.nvm, and attempts to add the source lines from the snippet below to the correct profile file (~/.bashrc, ~/.bash_profile, ~/.zshrc, or ~/.profile). If you find the install script is updating the wrong profile file, set the $PROFILE env var to the profile file’s path, and then rerun the installation script. export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm Additional Notes If the environment variable $XDG_CONFIG_HOME is present, it will place the nvm files there. You can add --no-use to the end of the above script to postpone using nvm until you manually use it: export NVM_DIR="$([ -z "${XDG_CONFIG_HOME-}" ] && printf %s "${HOME}/.nvm" || printf %s "${XDG_CONFIG_HOME}/nvm")" [ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" --no-use # This loads nvm, without auto-using the default version You can customize the install source, directory, profile, and version using the NVM_SOURCE, NVM_DIR, PROFILE, and NODE_VERSION variables. Eg: curl ... | NVM_DIR="path/to/nvm". Ensure that the NVM_DIR does not contain a trailing slash. The installer can use git, curl, or wget to download nvm, whichever is available. You can instruct the installer to not edit your shell config (for example if you already get completions via a zsh nvm plugin) by setting PROFILE=/dev/null before running the install.sh script. Here's an example one-line command to do that: PROFILE=/dev/null bash -c 'curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash' Installing in Docker When invoking bash as a non-interactive shell, like in a Docker container, none of the regular profile files are sourced. In order to use nvm, node, and npm like normal, you can instead specify the special BASH_ENV variable, which bash sources when invoked non-interactively. # Use bash for the shell SHELL ["/bin/bash", "-o", "pipefail", "-c"] # Create a script file sourced by both interactive and non-interactive bash shells ENV BASH_ENV="${HOME:-/root}/.bash_env" RUN touch "${BASH_ENV}" RUN echo '. "${BASH_ENV}"' >> ~/.bashrc # Download and install nvm RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | PROFILE="${BASH_ENV}" bash RUN echo node > .nvmrc RUN nvm install Installing in Docker for CICD-Jobs More robust, works in CI/CD-Jobs. Can be run in interactive and non-interactive containers. See #3531. FROM ubuntu:latest ARG NODE_VERSION=20 # install curl RUN apt update && apt install curl -y # install nvm RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.8/install.sh | bash # set env ENV NVM_DIR="${HOME:-/root}/.nvm" # install node RUN bash -c "source $NVM_DIR/nvm.sh && nvm install $NODE_VERSION" # set ENTRYPOINT for reloading nvm-environment ENTRYPOINT ["bash", "-c", "source $NVM_DIR/nvm.sh && exec \"$@\"", "--"] # set cmd to bash CMD ["/bin/bash"] This example defaults to installation of nodejs version 20.x.y. Optionally you can easily override the version with docker build args like: docker build -t nvmimage --build-arg NODE_VERSION=19 . After creation of the image you can start container interactively and run commands, for example: docker run --rm -it nvmimage root@0a6b5a237c14:/# nvm -v 0.40.8 root@0a6b5a237c14:/# node -v v19.9.0 root@0a6b5a237c14:/# npm -v 9.6.3 Noninteractive example: user@host:/tmp/test $ docker run --rm -it nvmimage node -v v19.9.0 user@host:/tmp/test $ docker run --rm -it nvmimage npm -v 9.6.3 Troubleshooting on Linux On Linux, after running the install script, if you get nvm: command not found or see no feed
Read the full README on GitHub

What Hacker News says

42 sources
This wasn't an option for us because as an org we used their recommended hook (1) to automatically change node versions when switching directories, but it effectively undoes the lazy loading. With mise you get the behaviour of automatically switching when you change directories effectively for free. 1. https://github.com/nvm-sh/nvm#zsh Edit: unless you aliased it to `node` or `npm`, which would be fine I guess but super annoying if you ran node or npm commands often. It is not worth the hassle, no one should use nvm in 2026 imo
In Life is too short for a slow terminal
I'm glad to see that I'm not the only person worried about this. It's a pretty glaring bit of attack surface if you ask me. I chuckled when I saw you used nvm as an example in your readme. I've pestered nvm about this sort of thing in the past (https://github.com/nvm-sh/nvm/issues/3349). I'm a little uncertain about your threat model though. If you've got an SSL-tampering adversary that can serve you a malicious script when you expected the original, don't you think they'd also be sophisticated enough to instead cause the authentic script to subsequently download a malicious payload? I know that nobody wants to deal with the headaches associated with keeping track of cryptographic hashes for everything you receive over a network (nix is, among other things, a tool for doing this). But I'm afraid it's the only way to actually solve th
Read the rest
is problem: 1. get remote inputs, check against hashes that were committed to source control 2. make a sandbox that doesn't have internet access 3. do the compute in that sandbox (to ensure it doesn't phone home for a payload which you haven't verified the hash of)
In Show HN: Vet – A tool for safely running remote shell scripts
I followed the standard nvm install process, to get it loaded from my .zshrc I noticed a second or two in lag between launching the terminal and getting a shell prompt. Commenting out the nvm load as a test removed the delay. I installed fnm, aliased it to be nvm, and everything is snappy. Also nicer if you use tooling to 'nvm use' when changing into a project directory. There are a few issue threads such as this one : https://github.com/nvm-sh/nvm/issues/2724 BTW, this blog post was great for finding the culprit if there is zsh startup latency : https://stevenvanbael.com/profiling-zsh-startup
In Mako – fast, production-grade web bundler based on Rust
View their obstinance: https://github.com/nvm-sh/nvm/issues/794 8 years later and despite much support for the `.node-version` file. Someone else started using the .node-version file years ago, and because all open source packages won't form a committee to standardize this file, nvm will not support it. They have a lot of hills. JS Private Properties was another.
In 4B If Statements
Awk is really great, for those knowing nvm [1], I used awk to make `nvm ls-remote` run more than 10 times faster [2] by replacing the related shell script with around 60 lines of awk script [3], and I was quite happy with the improvement. It's not really a one-liner, neither something big, but one can take that as an example regarding that awk is really not just for one-liners. Meanwhile having `--csv` support is really nice. I'd also like to see things like a builtin `length` function to be standard. [1]: https://github.com/nvm-sh/nvm/ [2]: https://github.com/nvm-sh/nvm/pull/2827/ [3]: https://github.com/nvm-sh/nvm/blob/9a769630d7/nvm.sh#L1703-L...
In The Awk Programming Language, Second Edition
Manage multiple npm versions at once using a node package manager manager such as: Node Version Manager - POSIX-compliant bash script to manage multiple active node.js versions https://github.com/nvm-sh/nvm Volta - The Hassle-Free JavaScript Tool Manager https://volta.sh/ asdf - Manage multiple runtime versions with a single CLI tool https://asdf-vm.com/ Eventually we might need a node package manager manager manager to make sure we are using the right one for a project lol
In Python is two languages now
Try doing this on a 5 year old project. You'll very likely end up in dependency hell. There is a solution though - use of nvm and .nvmrc (to control the version of node and npm that you use), and use of npm ci (which installs packages as they were at the time, rather than installing newer versions than specified in package-lock.json (because too many devs rarely ever pin versions) instead of npm install / npm i). nvm (Node Version manager): https://github.com/nvm-sh/nvm npm ci: https://docs.npmjs.com/cli/v6/commands/npm-ci
In Programs are dead, and JavaScript has killed them
Edit: actually just checked what's wrong again. When running with cmd, I get an error about Python 2 being used instead of Python3: C:\Users\USERNAME>pip --version Fatal error in launcher: Unable to create process using '"c:\python27\python.exe" "C:\Python27\Scripts\pip.exe" ' C:\Users\USERNAME>pip --version When running with Git Bash, I don't get any output whatsoever: USER@MACHINE MINGW65 ~ $ pip --version USER@MACHINE MINGW65 ~ As it turns out, PATH has both Python 3 and Python 2 in it. Why is there also Python 2 on the machine? A legacy project that needs testing whilst migrating it over? Helping someone with an older script? Who even knows at this point. My takeaways: 1. following the first Google result (python.org and the official installer) wasn't the problem here 2. Python 2 and Python 3 don't play nicely toge
Read the rest
ther, at all, might need to remove the old one from PATH to avoid headaches 3. Specifying the Python interpreter to use (my example above, or better yet explicit python3) solved the issue 4. Certain shells are weird sometimes, go figure 5. What you're saying about pyenv is probably a good idea Or maybe even something like PyCharm which lets you specify the runtime per project (much like you could specify which JDK to use with IntelliJ for Java). Hopefully by the time Python 4 comes out and breaks everything, we'll already have figured out use cases like this (just kidding, sort of). Node feels much the same way, especially because it moves ahead a bit more quickly with its releases and has less backwards compatibility when compared to Python. Somehow projects like Node Version Manager (https://github.com/nvm-sh/nvm) didn't really seem to gain much traction.
In Ask HN: Why is Python package management still a dumpster fire?
I am currently aware of the following Javascript "version managers": - NVM: https://github.com/nvm-sh/nvm - N: https://github.com/tj/n - Volta: https://volta.sh/ - FNM: https://fnm.vercel.app/ - ASDF-VM: https://asdf-vm.com/ I started with NVM, which is so slow that I'm confused (and maybe even impressed) as to how it's possible to be so slow. Then I switched to FNM, which is delightfully not-slow. Then I switched to Volta, because it supports installing standalone "tools" other than just Node, like Yarn and the various LSP servers that I use. If it's slower than FNM, it's not enough slower to matter to me. I tried N but don't use it. It seems to have a more "interactive" UI than FNM or Volta, so use N if you like that kind of thing. I haven't used ASDF-VM, which apparently supports several languages/interpreters/compilers, including Node
Read the rest
. I have been meaning to try it. I am somewhat skeptical that a general-purpose "do everything" tool would be better than a collection of purpose-built tools like Pyenv, Rbenv, Plenv, NVM/FNM/Volta/N, etc. etc., but people seem to really like it.
In Volta vs. Nvm for JavaScript Tooling
Very happy with my MacBook Air M1, working mostly on TypeScript Node.js and React projects. The first couple of weeks I used the Rosetta Terminal as described in this and many other blog post, until I found out this was not necessary at all for Node.js as described over here: https://github.com/nvm-sh/nvm/issues/2350#issuecomment-73413.... The only blocking issue was Docker so I used VSCode remote until they released the M1 preview. So with that and the release of HomeBrew 3.0.0 last month and many macOS apps adding M1 support, everything is now running smoothly for me and I think it's a really great machine to use as a developer. Also, the battery life truly is amazing, and boy am I glad I finally got rid of that touch bar and that ridiculous butterfly keyboard.
In Experience with Apple Silicon M1 MacBook Pro as a Software Developer

Showing the 15 most recent of 42 sources. Enable JavaScript to search and browse every indexed mention.

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.