Cette page est affichée en anglais. Une traduction française est en cours.
SkillsApr 13, 2026·3 min de lecture

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.

Prêt pour agents

Installation avec revue préalable

Cet actif nécessite une revue. Le prompt copié demande un dry-run, affiche les écritures, puis continue seulement après confirmation.

Needs Confirmation · 64/100Policy : confirmer
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
step-1.md
Commande avec revue préalable
npx -y tokrepo@latest install 81fadebf-3745-11f1-9bc6-00163e2b0d79 --target codex

Dry-run d'abord, confirmez les écritures, puis lancez cette commande.

TL;DR
fnm manages Node.js versions 40x faster than nvm, with automatic version switching per directory.
§01

What it is

fnm (Fast Node Manager) is a Node.js version manager built in Rust. It installs and switches between Node.js versions instantly, supports .node-version and .nvmrc files, and works on macOS, Linux, and Windows. fnm is a drop-in replacement for nvm with dramatically faster performance.

fnm is for any JavaScript or TypeScript developer who works across multiple projects requiring different Node.js versions.

The project is actively maintained with regular releases and a growing user community. Documentation covers common use cases, and the open-source nature means you can inspect the source code, contribute fixes, and adapt the tool to your specific requirements.

§02

How it saves time or tokens

Traditional version managers like nvm add noticeable shell startup latency (200-500ms per new terminal). fnm loads in under 1ms because it is a compiled Rust binary, not a shell script. Automatic version switching via .node-version files means you never run the wrong Node version in a project directory.

§03

How to use

  1. Install fnm via curl, brew, or cargo.
  2. Add the shell integration to your shell profile (bash, zsh, fish, or PowerShell).
  3. Run fnm install <version> and fnm use <version> to manage Node.js versions.
§04

Example

# Install fnm
curl -fsSL https://fnm.vercel.app/install | bash

# Or via Homebrew
brew install fnm

# Add to .zshrc
eval "$(fnm env --use-on-cd)"

# Install and use Node.js versions
fnm install 22
fnm use 22
node --version  # v22.x.x

# Auto-switch: create .node-version
echo '20' > .node-version
cd .  # fnm switches to Node 20 automatically
§05

Related on TokRepo

§06

Common pitfalls

  • Forgetting to add eval "$(fnm env --use-on-cd)" to your shell profile means automatic version switching will not work.
  • fnm and nvm can conflict if both are installed. Remove nvm initialization from your shell profile before switching to fnm.
  • On Windows, fnm requires the --shell powershell flag for proper integration with PowerShell.

Before adopting this tool, evaluate whether it fits your team's existing workflow. Read the official documentation thoroughly, and start with a small proof-of-concept rather than a full migration. Community forums, GitHub issues, and Stack Overflow are valuable resources when you encounter edge cases not covered in the documentation.

Questions fréquentes

How much faster is fnm than nvm?+

fnm is approximately 40x faster than nvm for shell startup. nvm is a bash script that adds 200-500ms to every new terminal session. fnm is a compiled Rust binary that loads in under 1ms.

Does fnm support .nvmrc files?+

Yes. fnm reads both .node-version and .nvmrc files. When you cd into a directory containing either file, fnm automatically switches to the specified Node.js version if you have --use-on-cd enabled.

Can fnm replace nvm completely?+

For most users, yes. fnm supports the same core commands (install, use, list, default) and reads the same version files. Some nvm-specific features like reinstalling global packages on upgrade are handled differently in fnm.

Does fnm work on Windows?+

Yes. fnm has native Windows support via PowerShell and cmd. Install via winget, scoop, or chocolatey. The --shell powershell flag enables automatic version switching in PowerShell sessions.

How does fnm handle multiple Node versions simultaneously?+

fnm uses per-shell version resolution. Each terminal session can use a different Node.js version. The version is determined by the .node-version file in the current directory, the default alias, or an explicit fnm use command.

Sources citées (3)
  • fnm GitHub— fnm is a fast and simple Node.js version manager built in Rust
  • fnm README— fnm supports .node-version and .nvmrc files
  • Rust Language— Rust provides zero-cost abstractions for CLI performance

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires