# fnm — Fast and Simple Node.js Version Manager > fnm (Fast Node Manager) is a blazing-fast Node.js version manager built in Rust. It installs and switches Node.js versions instantly, supports .node-version and .nvmrc files, and is 40x faster than nvm with cross-platform support. ## Install Save in your project root: # fnm — Fast and Simple Node.js Version Manager ## Quick Use ```bash # Install fnm curl -fsSL https://fnm.vercel.app/install | bash # Or: brew install fnm # Or: cargo install fnm # Install Node.js versions fnm install --lts fnm install 20 fnm install 18 # Use a specific version fnm use 20 # Set default fnm default 20 # Auto-switch per directory (add to shell config) eval "$(fnm env --use-on-cd)" # Check current version fnm current node --version ``` ## Introduction fnm is a Node.js version manager that makes nvm feel slow. Built in Rust, fnm installs Node.js versions in seconds and switches between them instantly. It supports .node-version and .nvmrc files for automatic per-project switching, works on Linux, macOS, and Windows, and integrates with all major shells. With over 25,000 GitHub stars, fnm has become the preferred Node.js version manager for developers who value speed. It is 40x faster than nvm for version switching and supports all the same workflows. ## What fnm Does fnm manages multiple Node.js installations on your machine. Each project can use a different Node.js version specified in .node-version or .nvmrc. fnm switches versions automatically when you cd into a project directory, and installs new versions from the official Node.js release channels. ## Architecture Overview ``` [Shell Integration] bash, zsh, fish, PowerShell eval "$(fnm env --use-on-cd)" | [fnm CLI (Rust)] Single binary, no deps | +-------+-------+ | | [Version Mgmt] [Auto-Switch] fnm install Reads .node-version fnm use or .nvmrc on cd fnm default Switches instantly | [Node.js Installations] ~/.local/share/fnm/node-versions/ v18.x.x/ v20.x.x/ v22.x.x/ ``` ## Self-Hosting & Configuration ```bash # Shell setup (~/.zshrc or ~/.bashrc) eval "$(fnm env --use-on-cd --shell zsh)" # Common operations fnm install --lts # Install latest LTS fnm install 22 # Install Node 22.x fnm use 20 # Switch to Node 20 fnm default 20 # Set default version fnm list # List installed versions fnm list-remote # List available versions fnm uninstall 18 # Remove a version # Per-project version echo "20" > .node-version # fnm auto-switches on cd # Or use .nvmrc for nvm compatibility echo "v20.11.0" > .nvmrc # Corepack support (pnpm, yarn) fnm install 20 corepack enable ``` ## Key Features - **40x Faster Than nvm** — Rust binary with instant version switching - **Cross-Platform** — Linux, macOS, Windows (including PowerShell) - **Auto-Switch** — reads .node-version or .nvmrc on directory change - **nvm Compatible** — supports .nvmrc files for easy migration - **Shell Integration** — bash, zsh, fish, and PowerShell - **No Dependencies** — single static binary - **Corepack** — works with corepack for pnpm/yarn version management - **Completions** — shell completions for all commands ## Comparison with Similar Tools | Feature | fnm | nvm | Volta | n | asdf | |---|---|---|---|---|---| | Language | Rust | Shell script | Rust | Shell script | Shell + plugins | | Speed | Very Fast | Slow | Fast | Moderate | Moderate | | Windows | Yes | WSL only | Yes | No | WSL only | | .nvmrc | Yes | Yes | No (package.json) | No | No (.tool-versions) | | Auto-Switch | Yes (--use-on-cd) | Yes (slower) | Yes (auto) | No | Yes | | Package Pinning | No | No | Yes (pin in package.json) | No | No | | Multi-Tool | Node.js only | Node.js only | Node.js + tools | Node.js only | Any tool | ## FAQ **Q: How do I migrate from nvm to fnm?** A: Install fnm, remove nvm from your shell config, add fnm eval. Your existing .nvmrc files work with fnm. Run "fnm install" for each version you need. **Q: fnm vs Volta — which should I choose?** A: fnm for nvm-compatible workflows (.nvmrc, explicit version switching). Volta for automatic toolchain pinning in package.json and team-wide consistency. **Q: Does fnm work with Corepack?** A: Yes. After installing a Node.js version via fnm, run "corepack enable" to activate pnpm and yarn version management via Corepack. **Q: How does auto-switching work?** A: Add "eval $(fnm env --use-on-cd)" to your shell config. When you cd into a directory with .node-version or .nvmrc, fnm automatically switches to that version. ## Sources - GitHub: https://github.com/Schniz/fnm - Documentation: https://github.com/Schniz/fnm#readme - Created by Gal Schlezinger - License: GPL-3.0 --- Source: https://tokrepo.com/en/workflows/81fadebf-3745-11f1-9bc6-00163e2b0d79 Author: AI Open Source