You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
Gal Schlezinger e47889a6f0 Update svg 6 years ago
.ci fnm-linux => fnm. Fixes #24 (#25) 6 years ago
docs Update svg 6 years ago
esy.lock Make `fnm --version` show the correct version (#16) 6 years ago
executable Fixes #7: Use xz files instead of gz (#17) 6 years ago
feature_tests Add feature test for Fish shell (#21) 6 years ago
library update Fnm package... 6 years ago
test Fixes #11: Don't throw in nonexistent directory on `fnm ls` + run `esy fmt` on codebase (#15) 6 years ago
.dockerignore Nsw 6 years ago
.gitignore Rename to fnm (#2) 6 years ago
Dockerfile Make `fnm --version` show the correct version (#16) 6 years ago
README.md Remove from todo 6 years ago
azure-pipelines.yml fnm-linux => fnm. Fixes #24 (#25) 6 years ago
dune initial 6 years ago
dune-project Rename to fnm (#2) 6 years ago
fnm.opam Rename to fnm (#2) 6 years ago
package.json v1.2.1 6 years ago

README.md

Fast Node Manager (fnm) Amount of downloads Build Status

🚀 Fast and simple Node.js version manager, built in ReasonML

Blazing fast!

Features

Single file, easy installation

🚀 Built with speed in mind

🤔 Works with .nvmrc files

Installation

Using a script

For bash, zsh and fish shells, there's an automatic installation script:

curl https://raw.githubusercontent.com/Schniz/fnm/master/.ci/install.sh | bash

Manually

  • Download the latest release binary for your system

  • Make it available globally on $PATH

  • Add the following line to your .bashrc/.zshrc file:

    eval `fnm env`
    

    If you are using fish shell, add this line to your config.fish file:

    eval (fnm env --fish)
    

Usage

You can always use fnm --help to read the docs:

fnm install [VERSION]

Installs [VERSION]. If no version provided, it will install the version specified in the .nvmrc file located in the current working directory.

fnm use [VERSION]

Activates [VERSION] as the current Node version. If no version provided, it will activate the version specified in the .nvmrc file located in the current working directory.

fnm ls

Lists the installed Node versions.

fnm ls-remote

Lists the Node versions available to download remotely.

fnm env [--fish]

Prints the required shell commands in order to configure your shell, Bash compliant by default. Provide --fish to output the Fish-compliant version.

Future Plans

  • Feature: make versions complete the latest: 10 would infer the latest minor and patch versions of node 10. 10.1 would infer the latest patch version of node 10.1
  • Feature: fnm use --install, fnm use --quiet
  • Feature: fnm install lts?
  • Feature: fnm alias?
  • Feature: Consider nvm-like per-shell usage with symlinks on /tmp directory
  • OSX: Add to homebrew?
  • Windows Support?
  • Linux: Replace curl usage with cohttp/ocurl or something else which is statically-linkable
  • Linux: Replace tar with a statically linked library too (for ungzip + untar)

Contributing

PRs welcome 🎉

Developing:

npm install -g esy
git clone https://github.com/Schniz/fnm.git
esy install
esy build

Running Binary:

After building the project, you can run the main binary that is produced.

esy x fnm.exe

Running Tests:

# Runs some smoke-unity test
esy test

# Runs the feature tests
feature_tests/run.sh