nvm.fish is the node version manager for fish shell. Using nvm.fish is almost the same as using nvm. The first thing to do is to install it with fisher.

fisher install jorgebucaran/nvm.fish

After installing nvm.fish, we can list all available node versions by typing nvm list-remote.

# list avilable node versions
nvm list-remote

Then you can choose one version and install it by typing nvm install.

# install the latest (current) version
nvm install latest
 
# install LTS (long-term support) version 
nvm install lts
 
# install specific LTS version
nvm install lts/iron
nvm install iron
 
# install a specific version
nvm install v20.10.0

By typing nvm list, you can see all the versions of Node.js you’ve installed in your fish shell.

nvm list
#   v8.17.0 lts/carbon
#   v15.3.0
#   v14.15.1 lts/fermium
#   v18.4.0 latest
# ▶ v20.13.1 lts/iron

Activate any version of Node.js by typing nvm use.

nvm use v20.13.1

Lastly, if you want to set the specific node version as the default, use set --universal nvm_default_version version.

# set lts as default version
set --universal nvm_default_version lts
 
# set 18.4.0 as default version
set --universal nvm_default_version v18.4.0

References