Switch between Node.js versions when working on multiple projects with different requirements.
Quickly test your code against different Node.js versions to ensure compatibility.
Automatically use the correct Node.js version specified in your project's .nvmrc or .node-version file.
Set up a development environment with the latest LTS Node.js version in seconds.
n is a command-line tool for managing multiple versions of Node.js on the same computer. Node.js is the JavaScript runtime used to build server-side applications and run development tools. Different projects often require different Node.js versions, and n makes it easy to switch between them without manually uninstalling and reinstalling. The tool is intentionally simple: run n on its own to see a list of your installed Node.js versions with an interactive menu you can navigate with arrow keys, then press Enter to activate the one you want. Run n lts to download and install the latest Long Term Support version. Run n 20.12.2 for a specific version number. When a version has already been downloaded, n installs from its local cache, making switches nearly instant. You can also specify a version using labels like lts, latest, or auto, the auto label reads the required version from a .nvmrc, .node-version, or .n-node-version file in the project directory, which is useful when working across projects that specify their own Node.js requirements. n is written as a Bash shell script and works on macOS, Linux, and Windows Subsystem for Linux. It does not require changes to your shell profile (no subshells, no complex initialization) beyond ensuring the install location is on your PATH. Installation can be done via npm, Homebrew, or by downloading the script directly with curl.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.