Getting Started
1. Install Nodeup
Choose one installation method from Installation, then verify the binary:
nodeup show home prints the data, cache, and config roots that Nodeup will use for runtimes, downloads, settings, and overrides.
2. Install a Node.js Runtime
Install a durable channel selector first:
The install command resolves channels through the Node.js release index, downloads the matching archive for the current host, verifies SHASUMS256.txt, and extracts the runtime into Nodeup's toolchains directory.
Check installed runtimes:
3. Set the Default Runtime
nodeup default <runtime> installs exact or channel-selected runtimes when needed, records the selector, and tracks it for later nodeup update runs.
4. Run Commands
Run a command against a specific runtime:
nodeup run --install <runtime> ... installs a missing version before executing the delegated command. Without --install, a missing version fails with a not-found error and a recovery hint.
5. Configure a Directory Override
Pin a project directory to a runtime:
Set or remove an override for another directory:
Runtime resolution for normal dispatch is explicit selector, then nearest directory override, then global default. See Runtime Resolution.
Exact-Version Pins
Use exact versions when a project or CI job needs a fixed runtime:
Exact-version selectors may include or omit the v prefix. Nodeup stores tracked exact versions in canonical v<semver> form, treats 22.1.0 and v22.1.0 as the same selector, and keeps exact versions immutable during nodeup update. Use exact versions when you need a fixed runtime. Use channels such as lts or current when you want nodeup update to move the selector as new releases become available.
To move a pin from one exact runtime to another, install or select the newer exact version explicitly:
6. Use Shims
When the same binary is linked or copied as node, npm, npx, yarn, or pnpm, Nodeup detects the executable name and dispatches to the active runtime:
The command creates or repairs all managed aliases in the default shim directory:
- macOS and Linux:
$HOME/.local/bin - Windows:
$HOME\.local\bin
If that directory is not already on PATH, human output includes the exact shell command for the current session. Add the same directory to your shell profile or user PATH for future sessions.
Use a custom shim directory when needed:
The Windows examples create .exe Nodeup shim aliases. Batch wrappers that call nodeup.exe do not preserve the wrapper name as Nodeup's argv[0], so use copied or linked executable aliases for managed shim dispatch. The delegated package-manager files inside a Windows Node.js runtime are usually bin/npm.cmd, bin/npx.cmd, bin/yarn.cmd, and bin/pnpm.cmd. Keep the shim directory before other Node.js directories on PATH; use where npm or Get-Command npm -All if a different command is shadowing the shim.
Managed alias dispatch installs a missing version selected by the active selector before running the command.
7. Verify Automation Output
Use JSON mode for scripts:
Handled failures in JSON mode are written to stderr as:
JSON payloads never include ANSI styling.