nvm.fish
Node.js version manager lovingly made for Fish.
Not that POSIX-compatible script. Designed from the ground up for Fish, this tool helps you manage multiple active versions of Node on a single local environment. Quickly install and switch between runtimes without cluttering your home directory or breaking system-wide scripts.
- 100% pure Fish—quick & easy to contribute to or change
- Tab-completable seamless shell integration
.node-versionand.nvmrcsupport- XDG Base Directory compliant
- No setup—it just works!
Installation
Install with Fisher:
fisher install jorgebucaran/nvm.fishQuickstart
Install the latest Node release and activate it.
nvm install latestInstall the latest LTS (long-term support) Node release.
nvm install ltsInstall an older LTS release by codename.
nvm install carbonInstalls
8.16.2, the latest release of the Carbon LTS line.
Or install a specific version of Node.
nvm install v12.9.1Supports full or partial version numbers, starting with an optional "v".
The nvm install command activates the specified Node version only in the current environment. If you want to set the default version for new shells use:
set --universal nvm_default_version v12.9.1Activate a version you've already installed.
nvm use v14List which versions you have installed (includes your system-installed Node if there is one).
$ nvm list
system
v8.17.0 lts/carbon
v12.9.1
▶ v14.15.1 lts/fermium
v15.3.0 latestOr list all the Node versions available to install.
nvm list-remoteWant to uninstall a Node version?
nvm uninstall v12.9.1.nvmrc
An .nvmrc file makes it easy to lock a specific version of Node for different projects. Just create an .nvmrc (or .node-version) file containing a version number or alias, e.g., latest, lts, carbon, in the root of your project.
node --version >.nvmrcThen run nvm install to install or nvm use to activate that version. Works from anywhere inside your project by traversing the directory hierarchy until an .nvmrc is found.
nvm install$nvm_mirror
If you would like to use a different Node.js mirror that has the same layout as the default at https://nodejs.org/dist, you can set $nvm_mirror. A typical example is users from China using:
set --universal nvm_mirror https://npm.taobao.org/mirrors/nodeAcknowledgments
nvm.fish started out in 2016 by @jorgebucaran as Fish's premier choice to Node.js version management. A heartfelt thank you to @creationx and @ljharb for creating the one true nvm.sh that served as the inspiration for this project. If you are looking for a way to use the original nvm right from Fish, check out @FabioAntunes/fish-nvm or @derekstavis/plugin-nvm. Thank you to all our contributors! <3

