nodeup
nodeup is a Rust-based Node.js version manager with rustup-like commands, deterministic runtime resolution, and managed alias dispatch for node, npm, and npx.
Overview
- Manage multiple Node.js runtimes from one CLI.
- Resolve active runtime consistently with explicit, override, and default selectors.
- Use human-friendly output for operators and JSON output for automation.
- Run
node,npm, andnpxthrough one binary by executable-name dispatch.
Quick Command Reference
nodeup toolchain list [--quiet|--verbose]nodeup toolchain install <runtime>...nodeup toolchain uninstall <runtime>...nodeup toolchain link <name> <path>nodeup default [runtime]nodeup show active-runtimenodeup show homenodeup update [runtime]...nodeup checknodeup override listnodeup override set <runtime> [--path <path>]nodeup override unset [--path <path>] [--nonexistent]nodeup which [--runtime <runtime>] <command>nodeup run [--install] <runtime> <command>...nodeup self updatenodeup self uninstallnodeup self upgrade-datanodeup completions <shell> [command]
Runtime Resolution Precedence
Runtime resolution follows a stable order:
- Explicit selector (
run <runtime>,which --runtime <runtime>) - Directory override (
override set) - Global default (
default)
If no selector resolves, commands fail with deterministic not-found errors.
Output and Logging
- Global output mode:
--output human|json(default:human) humanmode:- command results and logs are written for operators
- default log filter is
nodeup=infofor management commands
jsonmode:- success payloads are written to stdout as JSON
- handled failures are written to stderr as JSON envelopes
- fields:
kind,message,exit_code messagefollows<cause>. Hint: <next action>for actionable recovery guidance
- fields:
- default logging is off unless explicitly enabled via
RUST_LOG
completionscommand:- always writes raw completion script text to stdout
- does not wrap completion output in JSON, even when
--output jsonis set
Color control:
NODEUP_LOG_COLOR=always|auto|never(defaultalways)NO_COLORdisables color whenNODEUP_LOG_COLORis unset orauto
Completions
nodeup completions generates shell completion scripts for:
bashzshfishpowershellelvish
Scope filtering:
nodeup completions <shell>generates completions for all top-level commands.nodeup completions <shell> <command>accepts only top-level command scopes:toolchain,default,show,update,check,override,which,run,self,completions- invalid scopes fail with
invalid-input.
Testing Strategy
nodeup validation combines unit tests and end-to-end CLI integration tests.
- Unit tests cover selectors, resolver, release index cache behavior, logging mode selection, and installer helpers.
- CLI integration tests cover command contracts, JSON error envelopes, selector precedence, override lifecycle, update/check branches, self-management commands, and alias dispatch (
node,npm,npx).
Run locally from repository root:
Troubleshooting
- Runtime not installed:
- use
nodeup toolchain install <runtime>ornodeup run --install <runtime> ...
- use
- No selector resolved:
- set one with
nodeup default <runtime>ornodeup override set <runtime>
- set one with
- Linked runtime failures:
- verify
<path>/bin/nodeexists beforetoolchain link
- verify
- JSON parsing issues in automation:
- use
--output jsonand keepRUST_LOGunset (oroff) to avoid log noise
- use
- Error troubleshooting:
- follow the
Hint:action in the error message first, then rerun withRUST_LOG=nodeup=debugwhen deeper diagnostics are needed
- follow the
Documentation Links
- Project index:
docs/project-nodeup.md - Runtime contract:
docs/crates-nodeup-foundation.md - Public guide:
apps/public-docs/nodeup.mdx