@happyvibess/node-cleaner
Version:
๐งน Interactive CLI tool to find and clean node_modules directories and free up space
115 lines (80 loc) โข 3.47 kB
Markdown
# ๐งน node-cleaner
[](https://www.npmjs.com/package/@happyvibess/node-cleaner)
[](https://www.npmjs.com/package/@happyvibess/node-cleaner)
[](https://opensource.org/licenses/MIT)
> ๐ A beautiful CLI tool to find and clean node_modules directories and free up disk space
```
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
โ โ
โ ๐งน Node Cleaner v1.2.0 โ
โ Free up space by removing node_modulesโ
โ โ
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
โจ Scanning for node_modules directories...
โ Found 3 node_modules directories
๐ Space usage summary:
โโ /project1/node_modules (156.2 MB)
โโ /project2/node_modules (89.4 MB)
โโ /project3/node_modules (124.8 MB)
Total space used: 370.4 MB
? Select directories to clean: (Press <space> to select)
โฏ โป /project1/node_modules
โป /project2/node_modules
โป /project3/node_modules
```
## โจ Features
- ๐ Smart scanning for node_modules directories
- ๐ Interactive selection with directory sizes
- ๐ฏ Customizable scan depth
- ๐ Lightning-fast cleaning
- ๐ Detailed space usage statistics
- โก๏ธ Progress bars and beautiful UI
- โ
Safe deletion with confirmation
## ๐ Installation
```bash
# Install globally (recommended)
npm install -g @happyvibess/node-cleaner
# Or use with npx
npx @happyvibess/node-cleaner
```
## ๐ป Usage
```bash
# Basic usage (scans current directory)
node-cleaner
# Scan specific directory
node-cleaner -p /path/to/directory
# Set maximum scan depth (default: 4)
node-cleaner -d 5
# Skip confirmation (use with caution)
node-cleaner -f
```
## ๐ Options
| Option | Description | Default |
|--------|-------------|---------|
| `-p, --path <path>` | Directory to scan | Current directory |
| `-d, --depth <number>` | Maximum depth to scan | 4 |
| `-f, --force` | Skip confirmation | false |
| `-v, --version` | Show version | - |
| `-h, --help` | Show help | - |
## ๐ Example Output
```
Cleaning |โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 100% || 3/3 directories
โจ Cleanup complete!
3 directories cleaned
Your project is now lighter and faster
Total space freed: 370.4 MB
```
## ๐ค Contributing
Contributions, issues and feature requests are welcome!
1. Fork the repository
2. Create your feature branch (`git checkout -b feature/amazing-feature`)
3. Commit your changes (`git commit -m 'Add amazing feature'`)
4. Push to the branch (`git push origin feature/amazing-feature`)
5. Open a Pull Request
## โ Support
If you find this tool helpful, you can support its development by buying me a coffee!
[](https://www.buymeacoffee.com/happyvibess)
## ๐ License
This project is [MIT](LICENSE) licensed.
---
<p align="center">Made with โค๏ธ by <a href="https://github.com/happyvibess">happyvibess</a></p>