8000 GitHub - haomingz/Mole-Win: 🐹 Deep clean and optimize your Windows. · GitHub
[go: up one dir, main page]

Skip to content
haomingzPublic
forked from tw93/Mole

About

🐹 Deep clean and optimize your Windows.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

 
 

Latest commit

 

History

1,509 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

macOS · Windows

Mole CLI for Windows

Deep clean, uninstall apps, optimize, analyze disk, and monitor your Windows PC. Free open-source CLI.

English · 中文 · 繁體 · 日本語 · 한국어 · Deutsch · Français · Українська · Русский

Stars Version License Commits Twitter Telegram

Mole CLI for Windows menu

💡 This branch is the free open-source Windows CLI (mo). Prefer a native app? Mole for Windows is a separate download with review-before-delete cleanup, app updates, startup management, disk drill-downs, and live status. The macOS CLI lives on the main branch.

Features

  • All-in-one CLI toolkit: Combines CCleaner, IObit Uninstaller, WinDirStat, and Task Manager style workflows in one terminal command
  • Deep clean: Removes temp files, caches, logs, and browser leftovers to reclaim disk space
  • Smart uninstaller: Removes apps together with their leftover install folders
  • Disk analyzer: Explores disk usage with an interactive TUI and finds large files
  • System maintenance: Flushes DNS, optimizes the system drive, and checks disk health
  • Live monitoring: Shows real-time CPU, memory, disk, network, and process stats

Quick Start

Mole runs on Windows 10 and 11 with the built-in Windows PowerShell 5.1. The script install needs Git and, when the source differs from the latest release, Go to build the native tools. It installs into %LOCALAPPDATA%\Programs\mole-cli, and adds mo and mole to your PATH.

Install via Scoop

scoop install mole

Or via script

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

Mole is only distributed through this GitHub repository, Scoop, and mole.fit for the Windows app. Sites offering a "Mole-based" app or asking you to paste an encoded command into a terminal are not affiliated with Mole.

With an AI agent

Tell your agent:

Install Mole for me by reading https://raw.githubusercontent.com/tw93/Mole/main/llms.txt

Or install the skill yourself. With it, Claude Code, Codex, Cursor and other agents show every cleanup with --dry-run before anything is removed, and leave app uninstalls and administrator steps to you. Update with npx skills update -g -y.

npx skills add tw93/Mole -a claude-code codex cursor -g -y

As a host plugin: /plugin marketplace add tw93/Mole then /plugin install mole@mole in Claude Code, or codex plugin marketplace add tw93/Mole then codex plugin add mole@mole in Codex.

Run

mo                           # Interactive menu
mo clean                     # Deep cleanup
mo uninstall                 # Remove installed apps + their leftovers
mo optimize                  # Refresh caches & services
mo analyze                   # Visual disk explorer
mo status                    # Live system health dashboard
mo purge                     # Clean project build artifacts

mo update                    # Update Mole
mo remove                    # Remove Mole from this PC
mo --help                    # Show help
mo --version                 # Show installed version

Preview safely

mo clean --dry-run
mo uninstall --dry-run
mo optimize --dry-run
mo purge --dry-run
mo history
mo history --json

mo clean --dry-run --debug   # Preview + detailed logs
mo clean --whitelist         # Manage protected paths
mo clean --system            # Include system-level cleanup (run as administrator)
mo purge --paths             # Configure project scan directories
mo analyze D:\               # Analyze another drive
mo uninstall --list          # List installed apps, JSON when piped
mo analyze --json D:\        # Disk report as JSON
Other install options

To review the code before installing, clone the windows branch and run the installer in place. It keeps .git, so mo update works later:

$installDir = "$env:LOCALAPPDATA\Programs\mole-cli"
git clone --branch windows https://github.com/tw93/Mole.git $installDir
powershell -ExecutionPolicy Bypass -File "$installDir\install.ps1" -InstallDir $installDir -AddToPath

Add -CreateShortcut for a Start Menu entry. To uninstall, run mo remove.

Safety

Mole can delete files, so it validates paths and protects system and profile locations. uninstall, purge, and remove ask for confirmation before removing anything. When Mole cannot prove an item is safe to change, it skips it.

  • clean, uninstall, and purge can delete files, so review them with --dry-run first and add --debug when needed
  • clean and purge delete permanently; verified uninstall leftovers go to the Recycle Bin, the app's own uninstaller keeps its own behavior, and files deleted in mo analyze go to the Recycle Bin
  • Run Mole as your normal user; system-level steps are skipped unless PowerShell runs as administrator
  • Protect paths with mo clean --whitelist
  • Cleanup activity is recorded in %USERPROFILE%\.config\mole\operations.log; review it with mo history or disable it with MO_NO_OPLOG=1
  • C:\Windows, C:\Program Files, Windows Defender folders, and your profile root are never touched

Review SECURITY.md for reporting guidance and safety boundaries.

Features in Detail

The screenshots below come from a test PC. Available items and sizes depend on your PC.

Clean

mo clean --dry-run

mo clean --dry-run preview

The detailed list holds every path the preview found. Copy any of them into the whitelist to keep it.

Uninstall

mo uninstall

Lists installed programs from the registry and Windows Apps, largest first, then removes the ones you pick with their own uninstaller and cleans the leftover install folder. mo uninstall --dry-run shows which uninstaller each app would use and what would be removed, without running anything.

mo uninstall app list

Optimize

mo optimize --dry-run

mo optimize --dry-run preview

Steps such as disk optimization and the ARP cache flush need administrator access and are skipped otherwise; run PowerShell as administrator to include them.

Analyze

mo analyze
mo analyze D
7C97
:\

mo analyze overview

An interactive disk explorer with the same layout as the macOS version: arrow keys move through folders, Backspace goes back, T lists the largest files, and Del moves the selected items to the Recycle Bin after a confirmation.

Status

mo status

mo status dashboard

A live dashboard with a health score, CPU, memory, disk, power, network, and the busiest processes.

Purge

mo purge --dry-run

Finds build artifacts (node_modules, target, build, dist, venv, and more) in your project folders and lets you pick which projects to clean; nothing is selected until you choose. Configure the scanned folders with mo purge --paths.

Community

Thanks to everyone who helped build Mole. Go follow them. ❤️

Mole contributors

Support

  • Getting Mole for Windows is the most direct way to support Mole's development
  • If Mole helped you, give it a star, share it, or open an issue or PR
  • Contributions are welcome; read CONTRIBUTING.md first
  • I have two cats, TangYuan and Coke, and if Mole makes your life a little easier, feel free to treat them to canned food 🥩

License

Mole is open source under GPL-3.0; see LICENSE. Any modified version you share must remain under the same license. If you fork Mole, please use a distinct name and credit Mole as the upstream source; see TRADEMARK.md.

About

🐹 Deep clean and optimize your Windows.

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0