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 corepack@0.17.0, npm@8.19.2
v20.13.1 194 MB @openai/codex@0.1.0, corepack@0.28.0, npm@10.5.2
v22.16.0 260 MB @electron/asar@4.0.0, autocannon@8.0.0, corepack@0.32.0, npm@10.9.2, pnpm@10.23.0, typescript@5.9.3
v24.13.0 555 MB @openai/codex@0.87.0, corepack@0.34.5, npm@11.6.2, pnpm@10.28.0
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.