mirror of
https://github.com/tw93/Mole.git
synced 2026-02-04 16:14:44 +00:00
Add isolated Windows support in windows/ directory with zero changes to existing macOS code. Phase 1 includes: - install.ps1: Windows installer with PATH and shortcut support - mole.ps1: Main CLI entry point with menu system - lib/core/base.ps1: Core definitions, colors, icons, constants - lib/core/common.ps1: Common functions loader - lib/core/file_ops.ps1: Safe file operations with protection checks - lib/core/log.ps1: Logging functions with colors - lib/core/ui.ps1: Interactive UI components (menus, confirmations) - go.mod/go.sum: Go module for future TUI tools - README.md: Windows-specific documentation Closes #273
2.5 KiB
2.5 KiB
Mole for Windows
Windows support for Mole - A system maintenance toolkit.
Requirements
- Windows 10/11
- PowerShell 5.1 or later (pre-installed on Windows 10/11)
- Optional: Go 1.24+ (for building TUI tools)
Installation
Quick Install
# Clone the repository
git clone https://github.com/tw93/Mole.git
cd Mole/windows
# Run the installer
.\install.ps1 -AddToPath
Manual Installation
# Install to custom location
.\install.ps1 -InstallDir C:\Tools\Mole -AddToPath
# Create Start Menu shortcut
.\install.ps1 -AddToPath -CreateShortcut
Uninstall
.\install.ps1 -Uninstall
Usage
# Interactive menu
mole
# Show help
mole -ShowHelp
# Show version
mole -Version
Environment Variables
| Variable | Description |
|---|---|
MOLE_DRY_RUN=1 |
Preview changes without making them |
MOLE_DEBUG=1 |
Enable debug output |
Directory Structure
windows/
├── mole.ps1 # Main CLI entry point
├── install.ps1 # Windows installer
├── go.mod # Go module definition
├── go.sum # Go dependencies
└── 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
Configuration
Mole stores its configuration in:
- Config:
~\.config\mole\ - Cache:
~\.cache\mole\ - Whitelist:
~\.config\mole\whitelist.txt
Development
Phase 1: Core Infrastructure (Current)
install.ps1- Windows installermole.ps1- Main CLI entry pointlib/core/*- Core utility libraries
Phase 2: Cleanup Features (Planned)
bin/clean.ps1- Deep cleanup orchestratorbin/uninstall.ps1- App removal with leftover detectionbin/optimize.ps1- Cache rebuild and service refreshbin/purge.ps1- Aggressive cleanup modelib/clean/*- Cleanup modules
Phase 3: TUI Tools (Planned)
cmd/analyze/- Disk usage analyzer (Go)cmd/status/- Real-time system monitor (Go)bin/analyze.ps1- Analyzer wrapperbin/status.ps1- Status wrapper
Phase 4: Testing & CI (Planned)
tests/- Pester tests- GitHub Actions workflows
scripts/build.ps1- Build automation
License
Same license as the main Mole project.