fnm
fnm (Fast Node Manager) - A fast and simple Node.js version manager, built with Rust
Why Choose fnm?
fnm is a modern Node.js version manager with the following advantages:
- 🚀 Extreme Performance - Built with Rust, extremely fast startup and execution
- 🔄 Cross-Platform Support - Perfect support for macOS, Windows, Linux
- 📦 Single File Installation - No complex configuration, download and use
- 🎯 Automatic Version Switching - Automatically switch Node.js versions based on project
- 📁 Version File Support - Supports
.node-versionand.nvmrcfiles - 🐚 Multi-Shell Support - Supports Bash, Zsh, Fish, PowerShell
Quick Start
Install fnm
bash
curl -fsSL https://fnm.vercel.app/install | bashpowershell
winget install Schniz.fnmbash
brew install fnmConfigure Shell
bash
eval "$(fnm env --use-on-cd)"bash
eval "$(fnm env --use-on-cd)"bash
fnm env --use-on-c | sourcepowershell
fnm env --use-on-cd | Out-String | Invoke-ExpressionInstall Node.js
bash
# Install latest LTS version
fnm install --lts
# Install specific version
fnm install 20
# Use specific version
fnm use 20Main Features
🔄 Automatic Version Switching
fnm can automatically switch Node.js versions based on .node-version or .nvmrc files in the project directory:
bash
# Create .node-version file in project root
echo "20" > .node-version
# Automatically switch version when entering directory
cd my-project
# Automatically uses Node.js 20.x📦 Version Aliases
Set aliases for commonly used Node.js versions:
bash
# Set alias
fnm alias 20 default
# Use alias
fnm use default🔧 Corepack Support
fnm natively supports Corepack, which can automatically enable Yarn and pnpm:
bash
fnm install 20 --corepack-enabledNext Steps
- Installation Guide - Learn more about installation methods for each platform
- Command Reference - Learn all available commands
- Version Management - Learn how to manage Node.js versions
- fnm vs nvm - Compare fnm with nvm