🚀Fast and simple Node.js version manager, built in native ReasonML
Using a script
fish shells, there's an automatic installation script:
curl https://raw.githubusercontent.com/Schniz/fnm/master/.ci/install.sh | bash
Set a custom directory for fnm to be installed. The default is
Skip appending shell specific loader to shell config file, based on the current user shell, defined in
$SHELL. e.g. for Bash,
$HOME/.zshrc for Zsh. For Fish -
curl https://raw.githubusercontent.com/Schniz/fnm/master/.ci/install.sh | bash -s -- --install-dir "./.fnm" --skip-shell
Download the latest release binary for your system
Make it available globally on
Add the following line to your
eval "`fnm env --multi`"
If you are using fish shell, add this line to your
fnm env --multi | source
You can always use
fnm --help to read the docs:
fnm install [VERSION]
[VERSION]. If no version provided, it will install the version specified in the
.nvmrc file located in the current working directory.
fnm use [VERSION]
[VERSION] as the current Node version. If no version provided, it will activate the version specified in the
.node-version file located in the current working directory.
Lists the installed Node versions.
Lists the Node versions available to download remotely.
fnm env [--multi] [--shell=fish|bash|zsh] [--node-dist-mirror=URI] [--use-on-cd] [--base-dir=DIR]
Prints the required shell commands in order to configure your shell, Bash compliant by default.
--multiwill output the multishell support, allowing a different current Node version per shell
--shell=fishwill output the Fish-compliant version. Omitting it and
fnmwill try to infer the current shell based on the process tree
--node-dist-mirror="https://npm.taobao.org/dist"will use the Chinese mirror of Node.js
--use-on-cdwill also output a script that will automatically change the node version if a
.node-versionfile is found
--base-dir="/tmp/fnm"will install and use versions in
fnm use --install
fnm install lts?
- OSX: Add to homebrew?
- Windows Support?
- Linux: Replace
tarwith a statically linked library too (for ungzip + untar)
npm install -g esy git clone https://github.com/Schniz/fnm.git cd fnm/ esy install esy bootstrap esy build
After building the project, you can run the main binary that is produced.
esy x fnm.exe
# Runs some smoke-unity test esy test # Runs the feature tests feature_tests/run.sh