Windows support for Mole - A system maintenance toolkit.
- Windows 10/11
- PowerShell 5.1 or later (pre-installed on Windows 10/11)
- Go 1.24+ (for building TUI tools)
Recommended: Run this single command in PowerShell:
iwr -useb https://raw.githubusercontent.com/tw93/Mole/windows/quick-install.ps1 | iexThis will automatically download and install Mole with PATH configuration.
If you prefer to review the code first or customize the installation:
# Clone the repository
git clone https://github.com/tw93/Mole.git
cd Mole
# Switch to windows branch
git checkout windows
# Run the installer
.\install.ps1 -AddToPath
# Optional: Create Start Menu shortcut
.\install.ps1 -AddToPath -CreateShortcut
# Optional: Custom install location
.\install.ps1 -InstallDir C:\Tools\Mole -AddToPath.\install.ps1 -Uninstall# Interactive menu
mole
# Show help
mole -ShowHelp
# Show version
mole -Version
# Commands
mole clean # Deep system cleanup
mole clean -DryRun # Preview cleanup without deleting
mole uninstall # Interactive app uninstaller
mole optimize # System optimization
mole purge # Clean developer artifacts
mole analyze # Disk space analyzer
mole status # System health monitor| Command | Description |
|---|---|
clean |
Deep cleanup of temp files, caches, and logs |
uninstall |
Interactive application uninstaller |
optimize |
System optimization and health checks |
purge |
Clean project build artifacts (node_modules, etc.) |
analyze |
Interactive disk space analyzer (TUI) |
status |
Real-time system health monitor (TUI) |
| Variable | Description |
|---|---|
MOLE_DRY_RUN=1 |
Preview changes without making them |
MOLE_DEBUG=1 |
Enable debug output |
MO_ANALYZE_PATH |
Starting path for analyze tool |
windows/
βββ 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
βββ 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
β βββ 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)
The analyze and status commands require Go to be installed:
cd windows
# 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 will auto-build if Go is availableMole stores its configuration in:
- Config:
~\.config\mole\ - Cache:
~\.cache\mole\ - Whitelist:
~\.config\mole\whitelist.txt - Purge paths:
~\.config\mole\purge_paths.txt
-
install.ps1- Windows installer -
mole.ps1- Main CLI entry point -
lib/core/*- Core utility libraries
-
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
-
cmd/analyze/- Disk usage analyzer (Go) -
cmd/status/- Real-time system monitor (Go) -
bin/analyze.ps1- Analyzer wrapper -
bin/status.ps1- Status wrapper
-
tests/- Pester tests - GitHub Actions workflows
-
scripts/build.ps1- Build automation
Same license as the main Mole project.