A small CLI that shows how much space each nvm-installed Node version takes, plus what global packages live under it.
Run it once:
npx nvm-info@latest -yOr install globally:
npm i -g nvm-info
nvm-infoVersion ▲ 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 quit
Keyboard:
| 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.
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
- 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"git clone https://github.com/this-self/nvm-info.git
cd nvm-info
npm install
npm run build
npm linknpm install
npm run dev
npm run dev:watch
npm run build
npm run formatSee TODO for upcoming ideas and future work.
PRs welcome. Keep changes focused and include context in the description.
MIT — see LICENSE.