LinuxCommandLibrary

get-nodeversions

Display available Node.js versions for installation

TLDR

List all installed Node.js versions

$ Get-NodeVersions
copy

List all available Node.js versions
$ Get-NodeVersions -Remote
copy

List all available Node.js 20.x versions
$ Get-NodeVersions -Remote -Filter ">=20.0.0 <21.0.0"
copy

SYNOPSIS

get-nodeversions [OPTIONS]

PARAMETERS

-h, --help
    Show usage and options

--json
    Output as JSON array

--lts
    Filter to LTS versions only

--current
    Show Current branch versions

--all
    Include all versions including EOL

--remote
    Force fetch from remote API

--cache
    Use cached data if available

-v, --version
    Display tool version

DESCRIPTION

get-nodeversions is a utility command primarily used within Node.js installation scripts and version management tools to fetch and display the list of available Node.js versions from official release servers.

It queries the Node.js API endpoint (typically https://nodejs.org/dist/index.json) to retrieve metadata on all published releases, including version numbers, release dates, LTS status, and download links for various platforms.

This command is handy for scripting automated setups, such as in Docker containers, CI/CD pipelines (e.g., GitHub Actions, Jenkins), or custom installers, where you need to dynamically select the latest LTS or specific version without manual checks.

Output is human-readable by default but supports JSON for programmatic use. It differentiates between "Current", "LTS", and "Maintenance" stages per Node.js release policies.

While not part of core Linux distributions, it appears in NodeSource repositories, some nvm extensions, or standalone npm packages like node-version-list. Requires network access and optionally curl/wget. Fast execution (<1s typically) with built-in caching in some implementations.

It does not install versions—pair with tools like nvm or direct downloads for that.

CAVEATS

Not a standard Linux command; specific to Node.js tools like NodeSource scripts or npm packages. Requires internet for remote fetches. May vary by implementation.

TYPICAL OUTPUT

v20.11.0 (LTS Active)
v18.19.0 (LTS Maintenance)
v22.0.0 (Current)

API SOURCE

Fetches from nodejs.org/dist/index.json for authenticity.

HISTORY

Emerged around 2018-2020 in Node.js ecosystem for simplifying version discovery amid frequent releases. Tied to Node.js semver schedule changes; popularized in NodeSource DEB/RPM repos and Docker Node images.

SEE ALSO

nvm(1), n list-remote(1), volta list(1), fnm list-remote(1), node(1)

Copied to clipboard