🚀Fast and simple Node.js version manager, built in native ReasonML
Using Homebrew (OSX)
brew install Schniz/tap/fnm
This is a custom tap I'm maintaining, and will be used until fnm will move to the official one.
Using a script
fish shells, there's an automatic installation script:
curl -fsSL https://github.com/Schniz/fnm/raw/master/.ci/install.sh | bash
fnm is almost the same as installing it. To prevent duplication in your shell config file add
--skip-shell to install command.
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 -fsSL https://github.com/Schniz/fnm/raw/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 alias [VERSION] [NAME]
Aliases a Node version to a given name.
fnm default [VERSION]
Aliases a Node version as default. Uses
fnm alias underneath.
fnm env [--multi] [--shell=fish|bash|zsh] [--node-dist-mirror=URI] [--use-on-cd] [--base-dir=DIR] [--log-level=quiet|error|all]
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?
- 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