https://github.com/gustavorizzon/psnm
Lightweight tool for managing Node.js versions via PowerShell.
https://github.com/gustavorizzon/psnm
javascript nodejs nvm powershell version windows
Last synced: 2 months ago
JSON representation
Lightweight tool for managing Node.js versions via PowerShell.
- Host: GitHub
- URL: https://github.com/gustavorizzon/psnm
- Owner: gustavorizzon
- License: mit
- Created: 2025-02-18T01:44:08.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-18T19:15:47.000Z (about 1 year ago)
- Last Synced: 2025-05-20T05:36:17.290Z (about 1 year ago)
- Topics: javascript, nodejs, nvm, powershell, version, windows
- Language: PowerShell
- Homepage: https://psnm.guzz.dev
- Size: 26.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PowerShell Node Manager
PSNM is a lightweight Node.js version manager built entirely in PowerShell, designed for Windows environments where traditional tools are unavailable or restricted.
## Why PSNM?
Managing multiple Node.js versions on Windows can be painful - especially in corporate environments.
Common problems:
- nvm or fnm not approved
- No access to package managers
- Manual Node.js installations
- Locked-down systems
PSNM solves this by using **only PowerShell and official Node.js binaries**.
## Key Features
- Written entirely in PowerShell
- No external dependencies
- Uses **official Node.js binaries from nodejs.org**
- No admin privileges required
- Session-based version switching
- Supports `.node-version` and `.nvmrc`
- Simple and predictable CLI
## Getting Started
To get started with PowerShell Node Manager, follow these steps:
1. Clone the repository:
```powershell
git clone https://github.com/gustavorizzon/psnm.git $HOME\.psnm
```
2. Add an entry to your PowerShell profile to create an alias for the PowerShell Simple Node Manager:
```powershell
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
if (-not (Test-Path $profile)) { New-Item $profile -Force }
Add-Content -Path $profile -Value "Import-Module $HOME\.psnm\psnm.psm1"
```
3. Restart your PowerShell session to apply the changes made to your profile.
### Commands
| Command | Description |
| ------------------------ | ----------------------------------------------------------------------------------------------------------------------------- |
| `psnm use [version]` | Switches to the specified version of Node.js. If `version` is omitted, it will try to read `.node-version` and `.nvmrc` files |
| `psnm ls` | Lists all installed versions of Node.js. |
| `psnm ls-remote` | Lists all available versions of Node.js. |
| `psnm install ` | Installs the specified version of Node.js from your system |
| `psnm remove ` | Removes the specified version of Node.js from your system |
| `psnm default ` | Sets or shows the default Node.js version |