npm install -g nvm-manager
Modern CLI to manage Node.js versions and global npm packages using nvm or nvm-windows.
- Migrate global packages to any Node.js version (
nvm-manager migrate
) - List global npm packages for all Node.js versions (
nvm-manager list-all
) - Cleanup old Node.js versions, keep only latest LTS (
nvm-manager cleanup
) - Install latest Node.js LTS and restore global packages (
nvm-manager install-lts
) - Fix phantom Node.js versions (
nvm-manager fix-failed
) - Interactive prompts, batch options, and rich CLI feedback
- Cross-platform: Windows (nvm-windows), macOS/Linux (nvm)
npm install -g nvm-manager
Migrate global packages:
nvm-manager migrate
List all global packages:
nvm-manager list-all
Cleanup old Node.js versions:
nvm-manager cleanup
Install latest LTS and restore packages:
nvm-manager install-lts
Fix phantom versions:
nvm-manager fix-failed
Show all commands:
nvm-manager --help
- nvm or nvm-windows installed and configured
- Node.js and npm available in your shell
- On Windows: NVM_HOME environment variable set
- If nvm commands are not found, ensure nvm is in your PATH and shell config
- For phantom versions, check and edit your nvm config/settings file
- For permission errors, run with appropriate privileges or manually delete version folders
MIT License
nvm-manager fix-failed
Fixes Node.js versions that show in nvm list
but cannot be uninstalled normally. Attempts manual folder deletion and provides guidance for config file cleanup.
nvm-manager --help # Show all commands
nvm-manager <command> --help # Show help for specific command
- list-all: Switches to each Node version, reads global packages via
npm ls -g --json
, saves to consolidated list - Cleanup: Detects latest LTS, preserves it, prompts to uninstall others with batch options
- Install: Compares installed vs latest package versions, prompts for missing/outdated packages
- Fix-Failed: Attempts
nvm uninstall
, falls back to manual folder deletion, guides through config cleanup
- Phantom versions persist: Check and edit
%NVM_HOME%\settings.txt
to remove stale entries - Permission errors: Run with appropriate privileges or manually delete version folders
- nvm commands not found: Ensure nvm is in your PATH and shell environment is configured
- NVM_HOME not set: Set environment variable pointing to your nvm installation directory
nvm-manager/
├── package.json
├── bin/
│ └── nvm-manager # CLI executable
├── src/
│ ├── index.js # Main CLI entry point
│ ├── utils.js # Shared utilities
│ └── commands/
│ ├── list-all.js # list-all command
│ ├── cleanup.js # Cleanup command
│ ├── install-lts.js # Install command
│ └── fix-failed.js # Fix-failed command
└── README.md
Issues, suggestions, and pull requests welcome!
MIT License - Feel free to use, modify, and distribute.
Developed by Akhil Chaturvedi. Inspired by the need for a modern, cross-platform nvm global package manager and to fill gaps in nvm-windows.
Happy Node.js version management! 🚀