PolyNode is a CLI tool that helps install and manage multiple versions of Node.js on the same device.
- Supported operating systems and CPU architectures
- How to install
- How to use
- Searching for available Node.js versions
- Searching for a specific Node.js version
- Downloading and switching to a new version of Node.js
- Downloading a new version of Node.js
- Switching to a different downloaded version of Node.js
- Printing your current version of Node.js
- Printing all downloaded versions of Node.js
- Deleting a downloaded version of Node.js
- Printing your current version of PolyNode
- How to configure
- How to uninstall
- Future development
- Information
- Linux (x64 and ARM64)
- macOS (x64 and ARM64)
- Windows 10 and newer (x64 and ARM64)
PolyNode only supports Bash or Zsh by default. During the install process, PolyNode edits either .bashrc or .zshrc to add two locations to the PATH: PolyNode's home directory ~/.PolyNode
and the symlink for Node.js ~/.PolyNode/nodejs
. You can get PolyNode to work for other shells by adding these directories to your PATH environment variable.
PolyNode does not require sudo/admin privileges to install.
If you have a previous version of PolyNode installed, you do not have to uninstall it before installing the new version.
Please uninstall all Node.js downloads that weren't installed by PolyNode before running the setup executable.
- Navigate to Releases.
- Download the latest Linux .tar.xz file appropriate for your CPU architecture.
- Extract the .tar.xz file and run the setup executable.
- Navigate to Releases.
- Download the latest Darwin .tar.gz file appropriate for your CPU architecture.
- Extract the .tar.gz file and run the setup executable.
- Navigate to Releases.
- Download the latest Windows .zip file appropriate for your CPU architecture.
- Extract the .zip file and run setup.exe.
PolyNode does not require sudo/admin privileges to use the polyn
command.
polyn search
Using a prefix will match anything with this prefix. So polyn search 1
will match with any Node.js version that starts with "1".
If you want to search for a specific major version, add a "." at the end of your prefix. polyn search 18.
will print all Node.js v18 releases.
polyn search <prefix>
The install
command is equivalent to the add
command followed by the use
command.
polyn install <version>
You can also use the lts
keyword to download the latest LTS release without providing a specific version.
polyn install lts
The latest
keyword will download the latest release of Node.js, regardless if it's an LTS version or not.
polyn install latest
polyn add <version>
polyn add lts
polyn add latest
polyn use <version>
polyn current
polyn ls
or
polyn list
polyn rm <version>
or
polyn remove <version>
polyn version
PolyNode's configuration is handled through a JSON file named .polynrc
located in PolyNode's home directory (~/.PolyNode
for Linux/macOS and %LOCALAPPDATA%\Programs\PolyNode
for Windows). Please see below for the default configuration for .polynrc
:
{
"nodeMirror": "https://nodejs.org/dist"
}
This configuration file is limited at the moment. I hope to expand its capabilities over time.
This field is a string
that represents the URL to download Node.js. Default value is "https://nodejs.org/dist"
.
PolyNode does not require sudo/admin privileges to uninstall.
- Run the
~/.PolyNode/uninstall/uninstall
executable.
- Run
%LOCALAPPDATA%\Programs\PolyNode\uninstall\uninstall.exe
.
The original scope of this project was to be able to install and manage multiple versions of Bun, Deno, and Node.js. It currently only supports Node.js, but I would like to support Bun and Deno in the future.
PolyNode draws a lot of inspiration, especially in regards to syntax, from other, more well-known projects, like: nvm, nvm-windows, and nvs.
Go 1.23