nvm-info
v0.4.0
Published
CLI tool to analyze Node.js versions installed via nvm - view disk usage and global packages
Maintainers
Readme
nvm-info
A small CLI that shows how much space each nvm-installed Node version takes, plus what global packages live under it. The currently active Node version is highlighted with a marker and cyan text in the table output.
Quick start
Run it once:
npx -y nvm-info@latestOr install globally:
npm i -g nvm-info
nvm-infoExample
Version ▲ Size Packages
-- ------------ ---------- --------------------------------------------------
v18.12.0 156 MB [email protected], [email protected]
v20.13.1 194 MB @openai/[email protected], [email protected], [email protected]
▶ v22.16.0 260 MB @electron/[email protected], [email protected], [email protected],
[email protected], [email protected], [email protected]
v24.13.0 555 MB @openai/[email protected], [email protected], [email protected],
[email protected]
Total 1.1 GB
Press 1/2/3 to sort by column, q to quitKeyboard:
| Key | Action |
| --- | --------------------- |
| 1 | Sort by version |
| 2 | Sort by size |
| 3 | Sort by package count |
| q | Quit |
Press the same key again to reverse sort order.
How it works
nvm-info scans your $NVM_DIR/versions/node directory. For each installed Node.js version it:
- Calculates total disk usage
- Reads global packages from
lib/node_modules - Renders a sortable table in the terminal
Requirements
- Node.js
>= 18 nvminstalled and configuredNVM_DIRavailable in your shell
Typical NVM_DIR setup:
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh"Install from source
git clone https://github.com/this-self/nvm-info.git
cd nvm-info
npm install
npm run build
npm linkDevelopment
npm install
npm run dev
npm run dev:watch
npm run build
npm run formatTodo
See TODO for upcoming ideas and future work.
Contributing
PRs welcome. Keep changes focused and include context in the description.
License
MIT — see LICENSE.
