oh-my-node-modules
v1.6.1
Published
Visualize, analyze, and clean up node_modules directories to reclaim disk space
Maintainers
Readme
oh-my-node-modules
Find and clean up node_modules directories to free disk space.
Install
# With Bun
bun install -g oh-my-node-modules
# With npm
npm install -g oh-my-node-modulesUsage
Interactive mode
onm . # Start in current directory
onm ~/projects # Scan specific directoryKeyboard shortcuts:
↑/↓- NavigateSpace- Toggle selectiond- Delete selecteda- Select alln- Deselect alli- Invert selections- Change sortf- Filterq- Quit?- Help
CLI mode
# Quick scan report
onm --scan .
# JSON output
onm --scan --json .
# Auto-delete large node_modules
onm --auto --min-size 500mb --yes .
# Preview what would be deleted
onm --auto --min-size 1gb --dry-run .Features
- Interactive terminal UI
- Color-coded sizes (red >1GB, yellow >500MB)
- Multi-select with keyboard shortcuts
- Safe deletion with dry-run mode
- Filter by project name or path
- Shows last modified date
Development
Requires Bun.
bun install
bun run build
bun test
bun run dev # Watch modeThe built output works with both Bun and Node.js.
Repository
https://github.com/Lukasdias/oh-my-node-modules
Architecture
See AGENTS.md for codebase documentation.
License
MIT
