Skip to content

Latest commit

 

History

History
102 lines (68 loc) · 2.54 KB

README.md

File metadata and controls

102 lines (68 loc) · 2.54 KB

nvm.fish

Node version management lovingly made for Fish.

Not that POSIX-compatible script. Designed 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.

  • No dependencies, no setup, no clutter—it just works.
  • 100% Fish—quick & easy to contribute to or change.
  • Tab-completable seamless shell integration.
  • .node-version and .nvmrc support. ✅
  • XDG Base Directory compliant.

Installation

Install with Fisher:

fisher install jorgebucaran/nvm.fish

Quickstart

Install the latest Node release and start using it.

nvm install latest

Install the latest LTS (long-term support) Node release.

nvm install lts

Install an older LTS release by codename.

nvm install carbon

Installs 8.16.2, the latest release of the Carbon LTS line.

Or install a specific version of Node.

nvm install v12.9.1

Supports 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.1

Activate a version you've already installed.

nvm use lts

List which versions you have installed (includes any previously installed system Node if there is one).

$ nvm list
     system
    v8.17.0 lts/carbon
    v12.9.1
 ▶ v14.15.1 lts/fermium
    v15.3.0 latest

Or list all the Node versions available to install.

nvm list-remote

Want to remove a Node version? You can do that too.

nvm remove v12.9.1

.nvmrc

An .nvmrc file makes it easy to peg 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 -v >.nvmrc

Then 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

License

MIT