LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

fnm

fast Node.js version manager written in Rust

TLDR

Install a specific Node.js version
$ fnm install [18.17.0]
copy
Install the latest LTS release
$ fnm install --lts
copy
Switch the current shell to a version
$ fnm use [18]
copy
Set the default global version
$ fnm default [18]
copy
List installed versions
$ fnm list
copy
List versions available for download
$ fnm list-remote
copy
Enable automatic switching on cd and evaluate shell init
$ eval "$(fnm env --use-on-cd)"
copy

SYNOPSIS

fnm command [options] [arguments]

DESCRIPTION

fnm (Fast Node Manager) is a Node.js version manager written in Rust. It provides quick installation and switching between Node.js versions with minimal overhead.The tool reads .node-version or .nvmrc files for automatic version switching. Shell integration enables per-directory version selection without manual commands.fnm emphasizes speed with Rust implementation and cross-platform support including Windows.

PARAMETERS

install [VERSION] [--lts]

Download and install a Node.js version. Accepts full versions (18.17.0), major versions (18), `latest`, or `--lts` for the newest LTS.
use VERSION [--install-if-missing]
Switch the current shell to VERSION. With `--install-if-missing`, installs the version first if it is not present.
default VERSION
Set the default global Node.js version used in new shells.
current
Print the active Node.js version.
list, ls
List all versions installed locally.
list-remote, ls-remote
List all versions available from the distribution mirror.
uninstall VERSION
Remove an installed Node.js version.
alias VERSION NAME
Create a named alias for a version.
unalias NAME
Remove a named alias.
exec --using=VERSION CMD
Run CMD with a specific Node.js version without switching the shell.
env [--shell=SHELL] [--use-on-cd]
Print shell configuration to be eval'd; enables fnm in the current shell and optionally auto-switches on directory change.
completions --shell=SHELL
Print shell completion scripts for bash, zsh, fish, or PowerShell.
--node-dist-mirror URL
Use an alternative Node.js distribution mirror.
--fnm-dir PATH
Override the fnm installation directory (default `~/.fnm`).
--log-level LEVEL
Control verbosity (quiet, error, info).
--version, -V
Display version information.
--help, -h
Display help information.

CONFIGURATION

.node-version

Specifies Node.js version for the current directory.
.nvmrc
Alternative version file format compatible with nvm.

INSTALL

sudo pacman -S fnm
copy
sudo zypper install fnm
copy
brew install fnm
copy
nix profile install nixpkgs#fnm
copy

CAVEATS

Shell integration via `eval "$(fnm env --use-on-cd)"` is required for `fnm use`, automatic version switching on `cd`, and keeping PATH in sync. fnm is not a drop-in replacement for nvm: it does not source bash profile or provide all nvm subcommands. Installed Node versions are stored under `$FNM_DIR` (default `~/.fnm`); the active version is symlinked into a per-shell directory, so different shells can have different active versions.

HISTORY

fnm was created as a fast alternative to nvm, the original Node Version Manager. Written in Rust, it dramatically improves installation and switching speed over shell-based alternatives.

SEE ALSO

nvm(1), node(1), volta(1)

Braincup
Open source brain training for math, memory and focus
Braincup mini-games
41 mini-games · Apache-2.0
No ads · No tracking
Play in browser
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid
276 stars
From the maker of Linux Command Library
Copied to clipboard
Braincup
Open source brain training for math, memory and focus. 41 mini-games, from mental arithmetic to Sudoku, N-Back and Solo Chess.
Apache-2.0 licensed · No ads · No tracking · No account
From the maker of Linux Command Library
Download Braincup on the App StoreGet Braincup on Google PlayGet Braincup on F-Droid