Skip to content

Kylar514/ps-nvm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

5 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

ps-nvm

Cross-platform Node.js version management for PowerShell users

A pure PowerShell module for managing multiple Node.js versions across Windows, Linux, and macOS without leaving your preferred shell.

🎯 Why ps-nvm?

The Problem with Existing Tools

  • nvm: Bash-only, doesn't work in PowerShell
  • nvm-windows: Windows-only, often requires admin rights
  • fnm: Fast but requires Rust toolchain
  • Manual management: Error-prone PATH and environment variable juggling

βœ… The Solution

This PowerShell module provides a simple interface for managing Node.js versions, using a clean set of commands:

Command Purpose
Get-NodeVersion Lists versions (-Available, -Installed, -Current) with filtering
Set-NodeVersion Internal logic to set environment vars (not for end user use)
Switch-NodeVersion Public-facing command to switch to a specific Node version
Install-NodeVersion Installs a new Node version

πŸ§ͺ Example Usage

# Show all installed versions
Get-NodeVersion -Installed

# Show all available versions that match 24.*
Get-NodeVersion -Available -Versions 24.*
Get-NodeVersion -Available -v 24.*
Get-NodeVersion -Available -like 24.*

# Show currently used Node versions on machine and process level
Get-NodeVersion -Current

# Switch to version 18.16.0
Switch-NodeVersion 18.16.0

# Install a new version
Install-NodeVersion 20.11.1

πŸ“¦ Installation

1. Clone the Repository

git clone https://github.com/Kylar514/ps-nvm.git

2. Import the Module

Manually

  • run this command in pwsh
Import-Module ./ps-nvm/core.psm1

Automatically

  • Add this to your powershell profile
Import-Module "$HOME/Path/To/ps-nvm/core.psm1"

πŸ›  Requirements

  • pwsh core 7+
  • nvm for the directories and env vars

About

Powershell Node Version Manager (OS agnostic)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published