๐ node_module-nuke
The nuclear option for those pesky node_modules directories
๐ฅ What is this?
Are you tired of node_modules directories multiplying like rabbits and eating your disk space? Do you have more node_modules folders than actual projects? Has your SSD started crying every time you run npm install?
Fear no more! node_module-nuke is here to save the day (and your storage).
This blazingly fast Rust-powered tool will hunt down every single node_modules directory on your system and give you the power to DELETE THEM ALL with the satisfaction of watching your free disk space counter go brrrrr.
๐ฏ Why node_modules directories are the worst
- ๐ฆ They're basically black holes that suck up disk space
- ๐ They make your backups slower than dial-up internet
- ๐ They hide in every corner of your filesystem like digital dust bunnies
- ๐ธ They cost you money in cloud storage fees
- ๐คก They contain 47,000 packages just to center a div
- ๐ Each one could house a small family of dependencies
- ๐ They have more files than the Library of Congress
- ๐ They're probably visible from space at this point
โจ Features
- โก Blazingly fast - Written in Rust because life's too short for slow tools
- ๐ฏ Surgical precision - Only targets
node_modulesdirectories (your code is safe!) - ๐ Progress bars - Watch your disk space come back to life in real-time
- ๐โโ๏ธ Parallel processing - Uses all your CPU cores to maximize the carnage
- ๐งช Dry run mode - Preview the destruction before committing to it
- ๐จ Pretty output - Because even nuclear warfare should look good
- ๐ก๏ธ Exclude paths - Protect your production builds (if you must)
๐ Installation
From crates.io (once published):
From source (local development):
# Clone the repository
# Install locally
Just run it without installing:
๐ฆ Publishing to crates.io
For maintainers who want to publish this tool:
-
Prepare your package:
# Make sure everything builds -
Update Cargo.toml metadata:
[] = "node_module-nuke" = "0.1.0" = "2021" = "Efficiently delete node_modules directories with nuclear precision" = "MIT" = "https://github.com/yourusername/node_module-nuke" = "https://github.com/yourusername/node_module-nuke" = "https://docs.rs/node_module-nuke" = ["cli", "node_modules", "cleanup", "disk-space", "nodejs"] = ["command-line-utilities", "filesystem"] -
Login to crates.io:
# Enter your API token from https://crates.io/me -
Publish:
# Dry run first to check everything # Actually publish -
After publishing, users can install with:
๐ฎ Usage
Basic nuclear strike (current directory):
Target a specific directory:
See what would be destroyed (dry run):
Maximum verbosity (watch the world burn):
Limit the depth of destruction:
Spare some directories from the apocalypse:
Get help (you'll need it):
๐ช Example Output
Scan complete in 0.42s:
- Folders found: 47
- Total size: 12.34 GB
- Estimated savings: 12.34 GB
Proceed with deletion? (yes/no): yes
Deleting... โโโโโโโโโโโโโโโโโโโโ 47/47 [00:03] Freed: 12.34 GB
Deletion complete in 3.14s:
- Folders deleted: 47
- Space freed: 12.34 GB
Your SSD just sighed with relief.
โ ๏ธ Warning
This tool is nuclear. It will delete node_modules directories. Forever. Gone. Poof. ๐จ
Make sure you can recreate them with npm install or yarn install before proceeding.
(But let's be honest, you probably should have done this ages ago.)
๐ค Contributing
Found a bug? Want to make it even more destructive? PRs welcome!
Just remember: with great power comes great responsibility. Use this tool wisely.
๐ License
MIT - Because even nuclear weapons should be free and open source.
"I used to have 50GB of node_modules. Now I have 50GB of free space and inner peace." - Happy User
"This tool gave me back my weekend. And my sanity." - Another Happy User
"node_modules directories hate this one simple trick!" - Definitely Not Clickbait