# fnm

> Fast Node.js version manager built in Rust with support for .node-version and .nvmrc files

Stars: 27.3k · Language: Rust · License: GPL-3.0 · Categories: Dev Tools

- Repository: https://github.com/Schniz/fnm
- Website: https://fnm.vercel.app
- Page: https://www.trmn.sh/tools/fnm

## Install

- Homebrew: `brew install fnm`
- Cargo: `cargo install fnm`
- Winget: `winget install Schniz.fnm`
- Installation Script: `curl -fsSL https://fnm.vercel.app/install | bash`

## Overview

fnm is a Node.js version manager implemented in Rust that focuses on speed and cross-platform compatibility. It provides functionality similar to nvm but with faster startup times and a single binary installation. The tool automatically detects and switches Node.js versions based on `.node-version` and `.nvmrc` files in project directories.

The core functionality includes installing, switching between, and managing multiple Node.js versions. fnm supports automatic version switching when entering directories with version files using the `--use-on-cd` flag. It includes shell completions for bash, zsh, fish, and PowerShell, and integrates with shell environments through the `fnm env` command.

Developers working on multiple Node.js projects with different version requirements would benefit from fnm's automatic version switching and fast performance. The tool works across macOS, Windows, and Linux, with installation methods ranging from package managers like Homebrew and Scoop to direct binary downloads. The Rust implementation provides instant startup compared to other Node version managers written in shell scripts or JavaScript.

### Installation

```bash
# via Homebrew
brew install fnm
```

```bash
# via Cargo
cargo install fnm
```

```bash
# via Winget
winget install Schniz.fnm
```

```bash
# via Installation Script
curl -fsSL https://fnm.vercel.app/install | bash
```

## Alternatives

- [difftastic](https://www.trmn.sh/tools/difftastic.md): Structural diff tool that compares files based on their syntax rather than lines (Rust, 26.1k stars)
- [hyperfine](https://www.trmn.sh/tools/hyperfine.md): Command-line benchmarking tool that runs statistical analysis across multiple timing runs of shell commands (Rust, 29.2k stars)
- [Hurl](https://www.trmn.sh/tools/hurl.md): Command line tool that runs and tests HTTP requests defined in plain text files, with request chaining, captures, asserts, and CI reports. (Rust, 19.3k stars)
- [mise](https://www.trmn.sh/tools/mise.md): CLI tool for managing development environments with version-controlled tools, environment variables, and tasks (Rust, 35.7k stars)
- [zellij](https://www.trmn.sh/tools/zellij.md): Terminal multiplexer with floating panes, multiplayer collaboration, WebAssembly plugins, and built-in web client (Rust, 35.9k stars)

## Guides

- [Manage Node, Python and Go versions per project with mise](https://www.trmn.sh/guides/mise-runtime-versions): Pin Node, Python and Go versions per project with mise: install, shell activation, mise use, mise.toml vs .tool-versions, and moving off asdf or nvm.

---

Canonical: https://www.trmn.sh/tools/fnm
