1
0
mirror of https://github.com/tw93/Mole.git synced 2026-02-04 13:16:47 +00:00

feat: add --dry-run preview mode for cleanup and interactive d shortcut

This commit is contained in:
Tw93
2025-10-03 10:51:59 +08:00
parent f79ba5cfb5
commit ee98bd2e96
3 changed files with 125 additions and 32 deletions

View File

@@ -23,6 +23,7 @@ curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash
```bash
mole # Interactive main menu
mole clean # Deep system cleanup
mole clean --dry-run # Preview cleanup (no deletions)
mole uninstall # Interactive app uninstaller
mole analyze [path]# Analyze disk space (default: home directory)
mole --help # Show help
@@ -117,6 +118,37 @@ $ mole analyze ~/Downloads
Items (sorted by size):
### Dry Run Preview
Before actually deleting, you can preview what would be removed:
```bash
mole clean --dry-run
```
In interactive menu: select Clean System and press `d` instead of Enter.
Sample output:
```bash
$ mole clean --dry-run
🧪 Dry Run mode: showing what would be removed (no deletions).
▶ System essentials
→ User app cache (45.2GB, dry)
→ User app logs (2.1GB, dry)
→ Trash (12.3GB, dry)
▶ Browser cleanup
→ Chrome cache (8.4GB, dry)
→ Safari cache (2.1GB, dry)
====================================================================
🧪 DRY RUN COMPLETE!
💾 Potential reclaimable space: 72.00GB (no changes made) | Free space now: 223.5GB
====================================================================
```
TYPE SIZE NAME
────────────────────────────────────────────────────────────────────────────────
▶ 📁 33.72GB materials ← Use arrow keys to select