• Stars
    star
    1,964
  • Rank 22,791 (Top 0.5 %)
  • Language
    Shell
  • License
    MIT License
  • Created about 8 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

The Node.js version manager you'll adore, crafted just for Fish

nvm.fish

The Node.js version manager you'll adore, crafted just for Fish.

Nope, not that POSIX-compatible script. Built from scratch for Fish, this handy tool lets you juggle multiple active Node versions in a single local environment. Install and switch between runtimes like a boss, without messing up your home directory or breaking system-wide scripts.

  • 100% pure Fishโ€”so simple to contribute to or tweak
  • Tab-completable for seamless shell integration
  • .node-version and .nvmrc support
  • XDG Base Directory compliant
  • No setup neededโ€”it just works!

Installation

Install with Fisher:

fisher install jorgebucaran/nvm.fish

Quickstart

Install the latest Node release and activate it.

nvm install latest

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

nvm install lts

Install an older LTS release by codename.

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

nvm install carbon

Or install a specific version of Node.

Supports full or partial version numbers, starting with an optional "v".

nvm install v15.3.0

Activate a version you've already installed.

nvm use v14

Check out which versions you have installed (includes your system-installed Node if there is one).

$ nvm list
     system
    v8.17.0 lts/carbon
    v15.3.0
 โ–ถ v14.15.1 lts/fermium
    v18.4.0 latest

Or list all the Node versions up for grabs.

nvm list-remote

Need to uninstall a version?

nvm uninstall v15.3.0

.nvmrc

An .nvmrc file is perfect for locking a specific version of Node for different projects. Just create an .nvmrc (or .node-version) file with a version number or alias, e.g., latest, lts, carbon, in your project's root.

node --version >.nvmrc

Then run nvm install to install or nvm use to activate that version. Works like a charm from anywhere in your project by traversing the directory hierarchy until an .nvmrc is found.

nvm install

$nvm_mirror

Choose a mirror of the Node binaries. Default: https://nodejs.org/dist.

$nvm_default_version

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:

set --universal nvm_default_version v18.4.0

$nvm_default_packages

Got a list of default packages you want installed every time you install a new Node version?

set --universal nvm_default_packages yarn np

Acknowledgments

nvm.fish was established in 2016 by @jorgebucaran as the go-to Node.js version manager for Fish. It was inspired by the original nvm.sh created by @creationix and @ljharb. To use the original nvm in Fish, consider @FabioAntunes/fish-nvm or @derekstavis/plugin-nvm. We appreciate all of our contributors! โค๏ธ

License

MIT

More Repositories

1

hyperapp

1kB-ish JavaScript framework for building hypertext applications
JavaScript
19,026
star
2

fisher

A plugin manager for Fish
Shell
7,412
star
3

awsm.fish

A curation of prompts, plugins & other Fish treasures ๐Ÿš๐Ÿ’Ž
3,951
star
4

cookbook.fish

From Shell to Plate: Savor the Zest of Fish ๐Ÿฆž
1,976
star
5

colorette

๐ŸŒˆEasily set your terminal text color & styles
JavaScript
1,584
star
6

superfine

Absolutely minimal view layer for building web interfaces
JavaScript
1,559
star
7

classcat

Build a class attribute string quickly
JavaScript
901
star
8

getopts

Node.js CLI options parser
JavaScript
633
star
9

hydro

Ultra-pure, lag-free prompt with async Git statusโ€”just for Fish
Shell
589
star
10

hyperawesome

A curated list of awesome projects built with Hyperapp + more
489
star
11

replay.fish

Run Bash commands, replay changes in Fish ๐Ÿค
Shell
383
star
12

twist

Declarative JavaScript Testing
JavaScript
378
star
13

autopair.fish

Auto-complete matching pairs in the Fish command line
Shell
345
star
14

fishtape

100% pure-Fish test runner
Shell
342
star
15

spark.fish

โ–โ–‚โ–„โ–†โ–‡โ–ˆโ–‡โ–†โ–„โ–‚โ–
Shell
329
star
16

hyperapp-router

Declarative routing for Hyperapp V1 using the History API.
JavaScript
257
star
17

getopts.fish

Parse CLI options in Fish
Shell
216
star
18

gitio.fish

Create a custom git.io URL
Shell
88
star
19

hyperapp-html

Html helper functions for Hyperapp V1
JavaScript
81
star
20

pyenv

Pyenv support plugin for fish-shell
Shell
62
star
21

humantime.fish

Turn milliseconds into a human-readable string in Fish
Shell
21
star
22

.github

My health files
1
star
23

jorgebucaran.github.io

HTML
1
star