Skip to content

tw93/Mole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

1,287 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

Mole Logo

Mole

Deep clean and optimize your Windows.

Stars Channel License Commits Twitter Telegram

Warning

Experimental Status: The Windows version is currently not mature. If your computer is critical or contains important data, please do not use this tool.

Features

  • All-in-one toolkit: CCleaner, IObit Uninstaller, WinDirStat, and Task Manager combined into a single PowerShell toolkit
  • Deep cleaning: Scans and removes temp files, caches, and browser leftovers to reclaim gigabytes of space
  • Smart uninstaller: Thoroughly removes apps along with AppData, preferences, and hidden remnants
  • Disk insights: Visualizes usage, manages large files, and refreshes system services
  • Live monitoring: Real-time stats for CPU, memory, disk, and network to diagnose performance issues
  • Source channel updates: Install from the windows branch and refresh to the latest source with mo update

Platform Support

Mole is designed for Windows 10/11. This is the native Windows version ported from the macOS original. For macOS users, please visit the main branch for the native macOS version.

Requirements

  • Windows 10/11
  • PowerShell 5.1 or later (pre-installed on Windows 10/11)
  • Git (required for source-channel install and mo update)
  • Go 1.24+ (optional, only needed when building TUI tools locally)

Quick Start

Quick Install (One-Liner)

Recommended: Run this single command in PowerShell:

iwr -useb https://raw.githubusercontent.com/tw93/Mole/windows/quick-install.ps1 | iex

This will clone the latest windows branch into your install directory and configure PATH.

Manual Installation

If you prefer to review the code first or customize the installation:

# Clone the windows branch into your install directory
$installDir = "$env:LOCALAPPDATA\Mole"
git clone --branch windows https://github.com/tw93/Mole.git $installDir
cd $installDir

# Run the installer in place (keeps .git for mo update)
.\install.ps1 -InstallDir $installDir -AddToPath

# Optional: Create Start Menu shortcut
.\install.ps1 -InstallDir $installDir -AddToPath -CreateShortcut

Run:

mo                       # Interactive menu
mo clean                 # Deep cleanup
mo uninstall             # Remove apps + leftovers
mo optimize              # Refresh caches & services
mo analyze               # Visual disk explorer
mo status                # Live system health dashboard
mo update                # Pull the latest windows source
mo remove                # Remove Mole from this system
mo purge                 # Clean project build artifacts

mo --help                # Show help
mo --version             # Show installed version

mo clean --dry-run       # Preview the cleanup plan
mo clean --whitelist     # Manage protected caches
mo clean --dry-run --debug # Detailed preview with risk levels

mo optimize --dry-run    # Preview optimization actions
mo optimize --debug      # Run with detailed operation logs
mo purge --paths         # Configure project scan directories

Source-channel installs can later be refreshed with:

mo update

If a matching Windows prerelease exists for the installed version, Mole will reuse/download prebuilt analyze and status binaries before falling back to a local Go build.

macOS Parity

Windows is closest to macOS on these commands:

  • clean
  • uninstall
  • optimize
  • analyze
  • status
  • purge
  • update
  • remove

Still missing or intentionally platform-specific compared with main:

  • installer: no dedicated Windows installer-file cleanup command yet
  • completion: no PowerShell completion setup command yet
  • touchid: macOS-only, not applicable on Windows
  • Release channels: Windows currently uses a git source channel, not Homebrew/stable release installs
  • Update options: mo update --nightly is not implemented on Windows
  • Optimization controls: mo optimize --whitelist is not implemented on Windows
  • Some UI depth: macOS status and analyze expose richer device-specific details than Windows today
  • Windows prereleases use Vx.y.z-windows tags so they stay isolated from the macOS stable release channel

Tips

  • Safety: Built with strict protections. Preview changes with mo clean --dry-run.
  • Be Careful: Although safe by design, file deletion is permanent. Please review operations carefully.
  • Debug Mode: Use --debug for detailed logs (e.g., mo clean --debug). Combine with --dry-run for comprehensive preview including risk levels and file details.
  • Navigation: Supports arrow keys for TUI navigation.
  • Configuration: Use mo clean --whitelist to manage protected paths, mo purge --paths to configure scan directories.

Features in Detail

Deep System Cleanup

mo clean
Scanning cache directories...

  โœ“ User temp files                              12.3GB
  โœ“ Browser cache (Chrome, Edge, Firefox)         8.5GB
  โœ“ Developer tools (Node.js, npm, Python)       15.2GB
  โœ“ Windows logs and temp files                   4.1GB
  โœ“ App-specific cache (Spotify, Slack, VS Code)  6.8GB
  โœ“ Recycle Bin                                    9.2GB

====================================================================
Space freed: 56.1GB | Free space now: 180.3GB
====================================================================

Smart App Uninstaller

mo uninstall
Select Apps to Remove
โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•โ•
โ–ถ โ˜‘ Adobe Photoshop 2024     (4.2GB) | Old
  โ˜ IntelliJ IDEA             (2.8GB) | Recent
  โ˜ Premiere Pro              (3.4GB) | Recent

Uninstalling: Adobe Photoshop 2024

  โœ“ Removed application
  โœ“ Cleaned 52 related files across 8 locations
    - AppData, Caches, Preferences
    - Logs, Registry entries
    - Extensions, Plugins

====================================================================
Space freed: 4.8GB
====================================================================

System Optimization

mo optimize
System: 12/32 GB RAM | 280/460 GB Disk (61%) | Uptime 6d

  โœ“ Clear Windows Update cache
  โœ“ Reset DNS cache
  โœ“ Clean event logs and diagnostic reports
  โœ“ Refresh Windows Search index
  โœ“ Clear thumbnail cache
  โœ“ Optimize startup programs
  โœ“ System repairs (Font/Icon/Store/Search)

====================================================================
System optimization completed
====================================================================

Disk Space Analyzer

mo analyze
Analyze Disk  C:\Users\YourName\Documents  |  Total: 156.8GB

 โ–ถ  1. โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ  48.2%  |  ๐Ÿ“ Downloads           75.4GB  >6mo
    2. โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  22.1%  |  ๐Ÿ“ Videos              34.6GB
    3. โ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  14.3%  |  ๐Ÿ“ Pictures            22.4GB
    4. โ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  10.8%  |  ๐Ÿ“ Documents           16.9GB
    5. โ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘   5.2%  |  ๐Ÿ“„ backup_2023.zip      8.2GB

  โ†‘โ†“โ†โ†’ Navigate  |  O Open  |  F Show  |  Del Delete  |  L Large files  |  Q Quit

Live System Status

Real-time dashboard with system health score, hardware info, and performance metrics.

mo status
Mole Status  Health โ— 92  Desktop PC ยท Intel i7 ยท 32GB ยท Windows 11

โš™ CPU                                    โ–ฆ Memory
Total   โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 45.2%       Used    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  58.4%
Load    0.82 / 1.05 / 1.23 (8 cores)    Total   18.7 / 32.0 GB
Core 1  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘  78.3%      Free    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  41.6%
Core 2  โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  62.1%      Avail   13.3 GB

โ–ค Disk                                   โšก Power
Used    โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  67.2%      Status  AC Power
Free    156.3 GB                         Temp    58ยฐC
Read    โ–ฎโ–ฏโ–ฏโ–ฏโ–ฏ  2.1 MB/s
Write   โ–ฎโ–ฎโ–ฎโ–ฏโ–ฏ  18.3 MB/s

โ‡… Network                                โ–ถ Processes
Down    โ–ฎโ–ฎโ–ฏโ–ฏโ–ฏ  3.2 MB/s                 Code       โ–ฎโ–ฎโ–ฎโ–ฎโ–ฏ  42.1%
Up      โ–ฎโ–ฏโ–ฏโ–ฏโ–ฏ  0.8 MB/s                 Chrome     โ–ฎโ–ฎโ–ฎโ–ฏโ–ฏ  28.3%

Health score based on CPU, memory, disk, temperature, and I/O load. Color-coded by range.

Project Artifact Purge

Clean old build artifacts (node_modules, target, build, dist, etc.) from your projects to free up disk space.

mo purge
Select Categories to Clean - 18.5GB (8 selected)

โžค โ— my-react-app      3.2GB | node_modules
  โ— old-project       2.8GB | node_modules
  โ— rust-app          4.1GB | target
  โ— next-blog         1.9GB | node_modules
  โ—‹ current-work      856MB | node_modules  | Recent
  โ— django-api        2.3GB | venv
  โ— vue-dashboard     1.7GB | node_modules
  โ— backend-service   2.5GB | node_modules

Use with caution: This will permanently delete selected artifacts. Review carefully before confirming. Recent projects โ€” less than 7 days old โ€” are marked and unselected by default.

Custom scan paths can be configured with mo purge --paths.

Installation Options

Manual Installation

# Install to custom location from a cloned windows branch
.\install.ps1 -InstallDir C:\Tools\Mole -AddToPath

# Create Start Menu shortcut
.\install.ps1 -InstallDir C:\Tools\Mole -AddToPath -CreateShortcut

# Refresh the source channel later
mo update

Uninstall

.\install.ps1 -Uninstall

Configuration

Mole stores its configuration in:

  • Config: ~\.config\mole\
  • Cache: ~\.cache\mole\
  • Whitelist: ~\.config\mole\whitelist.txt
  • Purge paths: ~\.config\mole\purge_paths.txt

Directory Structure

mole/ (windows branch)
โ”œโ”€โ”€ mole.ps1          # Main CLI entry point
โ”œโ”€โ”€ install.ps1       # Windows installer
โ”œโ”€โ”€ Makefile          # Build automation for Go tools
โ”œโ”€โ”€ go.mod            # Go module definition
โ”œโ”€โ”€ go.sum            # Go dependencies
โ”œโ”€โ”€ bin/
โ”‚   โ”œโ”€โ”€ clean.ps1     # Deep cleanup orchestrator
โ”‚   โ”œโ”€โ”€ uninstall.ps1 # Interactive app uninstaller
โ”‚   โ”œโ”€โ”€ optimize.ps1  # System optimization
โ”‚   โ”œโ”€โ”€ purge.ps1     # Project artifact cleanup
โ”‚   โ”œโ”€โ”€ analyze.ps1   # Disk analyzer wrapper
โ”‚   โ”œโ”€โ”€ status.ps1    # Status monitor wrapper
โ”‚   โ”œโ”€โ”€ update.ps1    # Source channel updater
โ”‚   โ””โ”€โ”€ remove.ps1    # Self-uninstall wrapper
โ”œโ”€โ”€ cmd/
โ”‚   โ”œโ”€โ”€ analyze/      # Disk analyzer (Go TUI)
โ”‚   โ”‚   โ””โ”€โ”€ main.go
โ”‚   โ””โ”€โ”€ status/       # System status (Go TUI)
โ”‚       โ””โ”€โ”€ main.go
โ””โ”€โ”€ lib/
    โ”œโ”€โ”€ core/
    โ”‚   โ”œโ”€โ”€ base.ps1      # Core definitions and utilities
    โ”‚   โ”œโ”€โ”€ common.ps1    # Common functions loader
    โ”‚   โ”œโ”€โ”€ file_ops.ps1  # Safe file operations
    โ”‚   โ”œโ”€โ”€ log.ps1       # Logging functions
    โ”‚   โ”œโ”€โ”€ tui_binaries.ps1 # TUI binary restore/build helpers
    โ”‚   โ””โ”€โ”€ ui.ps1        # Interactive UI components
    โ””โ”€โ”€ clean/
        โ”œโ”€โ”€ user.ps1      # User cleanup (temp, downloads, etc.)
        โ”œโ”€โ”€ caches.ps1    # Browser and app caches
        โ”œโ”€โ”€ dev.ps1       # Developer tool caches
        โ”œโ”€โ”€ apps.ps1      # Application leftovers
        โ””โ”€โ”€ system.ps1    # System cleanup (requires admin)

Building TUI Tools

Install Go if you want to build the analyze and status tools locally:

# From the repository root

# Build both tools
make build

# Or build individually
go build -o bin/analyze.exe ./cmd/analyze/
go build -o bin/status.exe ./cmd/status/

# The wrapper scripts try bin/ first, then Windows prerelease assets,
# then auto-build if Go is available

Support

  • If Mole saved you disk space, consider starring the repo or sharing it with friends.
  • Have ideas or fixes? Check our Contributing Guide, then open an issue or PR to help shape Mole's future.
  • Love Mole? Buy Tw93 an ice-cold Coke to keep the project alive and kicking! ๐Ÿฅค

Community Love

Phase 1: Core Infrastructure โœ…

  • install.ps1 - Windows installer
  • mole.ps1 - Main CLI entry point
  • lib/core/* - Core utility libraries

Phase 2: Cleanup Features โœ…

  • bin/clean.ps1 - Deep cleanup orchestrator
  • bin/uninstall.ps1 - App removal with leftover detection
  • bin/optimize.ps1 - System optimization
  • bin/purge.ps1 - Project artifact cleanup
  • lib/clean/* - Cleanup modules

Phase 3: TUI Tools โœ…

  • cmd/analyze/ - Disk usage analyzer (Go)
  • cmd/status/ - Real-time system monitor (Go)
  • bin/analyze.ps1 - Analyzer wrapper
  • bin/status.ps1 - Status wrapper
  • bin/update.ps1 - Source channel updater
  • bin/remove.ps1 - Self-uninstall wrapper

Phase 4: Testing & CI (Planned)

  • tests/ - Pester tests
  • GitHub Actions workflows
  • scripts/build.ps1 - Build automation

Mole wouldn't be possible without these amazing contributors. They've built countless features that make Mole what it is today. Go follow them! โค๏ธ

Contributors

Join thousands of users worldwide who trust Mole to keep their systems clean and optimized.

License

MIT License โ€” feel free to enjoy and participate in open source.