nvm-rs
A tool to manage Node.js versions on Windows.
Requirements
- Windows
- Rust toolchain (edition 2024)
Installation
From source
From release
Download the latest binary from GitHub Releases.
Quick start
# Set the root directory where Node.js versions will be stored
# Set the symlink path (add to your environment variables)
# NVM_SYMLINK=C:\Program Files\nodejs
# Install the latest version
# Install a specific version
# Switch to a version
# List installed versions
# List available remote versions
# Uninstall a version
Commands
| Command | Alias | Description |
|---|---|---|
nvm install <version> [arch] [--insecure] |
i |
Install a Node.js version. version can be latest, lts, or a semver. arch can be 32 or 64 (defaults to system arch). --insecure skips SSL validation. |
nvm uninstall <version> |
un |
Uninstall a specific version. |
nvm list [--available] |
ls |
List installed versions, or remote versions with --available. |
nvm on |
Enable Node.js version management (creates junction link to the latest installed version). | |
nvm off |
Disable Node.js version management (removes junction link). | |
nvm root [path] |
Set or display the root directory. | |
nvm arch |
Show the current architecture. | |
nvm proxy [url] |
Set a proxy for downloads. Use none to remove. |
|
nvm current |
Display the active Node.js version. | |
nvm node-mirror [url] |
Set or display the Node.js download mirror. | |
nvm npm-mirror [url] |
Set or display the npm download mirror. | |
nvm use <version> [arch] |
Switch to a specific version. |
Configuration
The configuration file is stored next to the nvm.exe binary. The format depends on the enabled feature:
- YAML (default):
settings.txt - TOML:
settings.toml
Configuration fields
| Field | Description |
|---|---|
root |
Directory where Node.js versions are stored. |
proxy |
Proxy URL for downloads. Set to none to disable. |
node_mirror |
Node.js download mirror. Defaults to https://nodejs.org/dist. |
npm_mirror |
npm download mirror. Defaults to https://registry.npmjs.org. |
arch |
Default architecture (32 or 64). |
originalpath |
Previous symlink target (for restoring). |
originalversion |
Previous version (for restoring). |
Environment variables
| Variable | Description |
|---|---|
NVM_SYMLINK |
Path where the Node.js junction link is created (e.g. C:\Program Files\nodejs). |
Features
The crate uses Cargo feature flags to customize the build:
| Feature | Default | Description |
|---|---|---|
default |
yes | Enables ureq + yaml. |
ureq |
(part of default) | Uses ureq as the HTTP client. |
yaml |
(part of default) | Uses YAML-format config (settings.txt). |
toml |
no | Uses TOML-format config (settings.toml). |
debug |
no | Enables tracing logging to console and rotating log files. |
Build examples
# Default build
# With TOML config + debug logging
# Debug logging only
License
MIT