nodeup is a Rust-based Node.js version manager with rustup-like commands and deterministic runtime selection.
- Manage multiple Node.js runtimes with a single CLI.
- Resolve runtime precedence consistently across default, override, and explicit execution.
- Use stable human and JSON output modes for both operators and automation.
- Toolchain lifecycle:
toolchain list|install|uninstall|link - Runtime selection:
default,override set|unset|list,show active-runtime - Runtime-aware execution:
run,which - Self-management:
self update|uninstall|upgrade-data - Shell completion generation:
completions <shell> [command]
Tag contract:
nodeup@v<semver>
Package manager:
- macOS/Linux:
brew install delinoio/tap/nodeup - Homebrew installs prebuilt archives on macOS Intel, macOS Apple Silicon, and Linux amd64
- Linux arm64 is not yet published for the Homebrew package
Windows direct install:
./scripts/install/nodeup.ps1 -Version latest -Method direct
Script installer:
./scripts/install/nodeup.sh --version latest --method package-manager./scripts/install/nodeup.ps1 -Version latest -Method directDirect installers verify Sigstore bundle sidecars (*.sigstore.json) and only support bundle-enabled releases.
Set a global default runtime:
nodeup default ltsInstall and run with an explicit runtime:
nodeup toolchain install 24.0.0
nodeup run --install 24.0.0 node -vUse a project directory override:
nodeup override set lts --path /path/to/project- Explicit runtime selector in command invocation (
run,which --runtime) - Directory override selector (
override set) - Global default selector (
default)
nodeup reads the nearest package.json from the current directory upward and applies
strict packageManager handling for yarn and pnpm.
- Supported format:
<manager>@<exact-semver> - Supported managers:
yarn,pnpm - When present, manager mismatch fails with
conflict. - Malformed values fail with
invalid-input. - Corepack is not used; nodeup runs the selected runtime's
npm exec.
Mapping behavior:
pnpm@x.y.z->pnpm@x.y.zyarn@1.x.y->yarn@1.x.yyarn@2+->@yarnpkg/cli-dist@x.y.z
When packageManager is missing:
- direct
bin/yarnorbin/pnpmis preferred if available - otherwise nodeup falls back to
npm execdefaults:yarn->@yarnpkg/cli-distpnpm->pnpm
--output human|jsonis available for management commands.- Human mode uses pretty
tracinglogs by default. - JSON mode writes machine payloads to stdout and keeps logs off by default unless explicitly enabled.
- Handled failures use an actionable message shape:
<cause>. Hint: <next action>. completionsalways writes raw completion scripts to stdout, even when--output jsonis set.
Human output color control:
--color auto|always|nevercontrols ANSI styling for--output humanoutput.NODEUP_COLOR=auto|always|nevercontrols the same behavior via environment.- Precedence is
--color>NODEUP_COLOR>NO_COLOR>auto. autoenables color only when each output stream is attached to a terminal.--output jsonandcompletionsoutput are always emitted without ANSI styling.
Supported shells:
bashzshfishpowershellelvish
Command scope behavior:
nodeup completions <shell>generates completion output for all top-level commands.nodeup completions <shell> <command>only accepts top-level command scopes (toolchain,default,show,update,check,override,which,run,self,completions).- Invalid shell or scope values fail with
invalid-input.
nodeup is validated with both unit tests and end-to-end CLI integration tests to keep command behavior predictable for operators and automation.
Coverage highlights:
- Command-family coverage for
toolchain,default,show,update,check,override,which,run,self, andcompletions. - Deterministic JSON failure envelopes on stderr (
kind,message,exit_code) with stdout reserved for machine output. - Selector precedence checks across explicit selectors, directory overrides, and global defaults.
- Alias dispatch checks for
node,npm,npx,yarn, andpnpmexecution paths.
To run project validation from repository root:
cargo test -p nodeup