mirror of
https://github.com/tw93/Mole.git
synced 2026-02-15 15:10:07 +00:00
feat: add one-liner install and fix installation docs
- Add quick-install.ps1 for one-command installation - Fix installation docs to include 'git checkout windows' step - Add .gitignore rules for main branch specific files - Users can now install with: iwr -useb https://...quick-install.ps1 | iex Addresses installation confusion from Issue #309
This commit is contained in:
5
.gitignore
vendored
5
.gitignore
vendored
@@ -14,3 +14,8 @@ bin/*.exe
|
|||||||
# Test artifacts
|
# Test artifacts
|
||||||
*.test
|
*.test
|
||||||
coverage.out
|
coverage.out
|
||||||
|
|
||||||
|
# Main branch specific files
|
||||||
|
ANTIGRAVITY.md
|
||||||
|
CLAUDE.md
|
||||||
|
windows-readme-update.md
|
||||||
|
|||||||
36
README.md
36
README.md
@@ -10,25 +10,36 @@ Windows support for [Mole](https://github.com/tw93/Mole) - A system maintenance
|
|||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
### Quick Install
|
### Quick Install (One-Liner)
|
||||||
|
|
||||||
|
**Recommended:** Run this single command in PowerShell:
|
||||||
|
|
||||||
|
```powershell
|
||||||
|
iwr -useb https://raw.githubusercontent.com/tw93/Mole/windows/quick-install.ps1 | iex
|
||||||
|
```
|
||||||
|
|
||||||
|
This will automatically download and install Mole with PATH configuration.
|
||||||
|
|
||||||
|
### Manual Installation
|
||||||
|
|
||||||
|
If you prefer to review the code first or customize the installation:
|
||||||
|
|
||||||
```powershell
|
```powershell
|
||||||
# Clone the repository
|
# Clone the repository
|
||||||
git clone https://github.com/tw93/Mole.git
|
git clone https://github.com/tw93/Mole.git
|
||||||
cd Mole/windows
|
cd Mole
|
||||||
|
|
||||||
|
# Switch to windows branch
|
||||||
|
git checkout windows
|
||||||
|
|
||||||
# Run the installer
|
# Run the installer
|
||||||
.\install.ps1 -AddToPath
|
.\install.ps1 -AddToPath
|
||||||
```
|
|
||||||
|
|
||||||
### Manual Installation
|
# Optional: Create Start Menu shortcut
|
||||||
|
|
||||||
```powershell
|
|
||||||
# Install to custom location
|
|
||||||
.\install.ps1 -InstallDir C:\Tools\Mole -AddToPath
|
|
||||||
|
|
||||||
# Create Start Menu shortcut
|
|
||||||
.\install.ps1 -AddToPath -CreateShortcut
|
.\install.ps1 -AddToPath -CreateShortcut
|
||||||
|
|
||||||
|
# Optional: Custom install location
|
||||||
|
.\install.ps1 -InstallDir C:\Tools\Mole -AddToPath
|
||||||
```
|
```
|
||||||
|
|
||||||
### Uninstall
|
### Uninstall
|
||||||
@@ -134,6 +145,7 @@ go build -o bin/status.exe ./cmd/status/
|
|||||||
## Configuration
|
## Configuration
|
||||||
|
|
||||||
Mole stores its configuration in:
|
Mole stores its configuration in:
|
||||||
|
|
||||||
- Config: `~\.config\mole\`
|
- Config: `~\.config\mole\`
|
||||||
- Cache: `~\.cache\mole\`
|
- Cache: `~\.cache\mole\`
|
||||||
- Whitelist: `~\.config\mole\whitelist.txt`
|
- Whitelist: `~\.config\mole\whitelist.txt`
|
||||||
@@ -142,11 +154,13 @@ Mole stores its configuration in:
|
|||||||
## Development Phases
|
## Development Phases
|
||||||
|
|
||||||
### Phase 1: Core Infrastructure ✅
|
### Phase 1: Core Infrastructure ✅
|
||||||
|
|
||||||
- [x] `install.ps1` - Windows installer
|
- [x] `install.ps1` - Windows installer
|
||||||
- [x] `mole.ps1` - Main CLI entry point
|
- [x] `mole.ps1` - Main CLI entry point
|
||||||
- [x] `lib/core/*` - Core utility libraries
|
- [x] `lib/core/*` - Core utility libraries
|
||||||
|
|
||||||
### Phase 2: Cleanup Features ✅
|
### Phase 2: Cleanup Features ✅
|
||||||
|
|
||||||
- [x] `bin/clean.ps1` - Deep cleanup orchestrator
|
- [x] `bin/clean.ps1` - Deep cleanup orchestrator
|
||||||
- [x] `bin/uninstall.ps1` - App removal with leftover detection
|
- [x] `bin/uninstall.ps1` - App removal with leftover detection
|
||||||
- [x] `bin/optimize.ps1` - System optimization
|
- [x] `bin/optimize.ps1` - System optimization
|
||||||
@@ -154,12 +168,14 @@ Mole stores its configuration in:
|
|||||||
- [x] `lib/clean/*` - Cleanup modules
|
- [x] `lib/clean/*` - Cleanup modules
|
||||||
|
|
||||||
### Phase 3: TUI Tools ✅
|
### Phase 3: TUI Tools ✅
|
||||||
|
|
||||||
- [x] `cmd/analyze/` - Disk usage analyzer (Go)
|
- [x] `cmd/analyze/` - Disk usage analyzer (Go)
|
||||||
- [x] `cmd/status/` - Real-time system monitor (Go)
|
- [x] `cmd/status/` - Real-time system monitor (Go)
|
||||||
- [x] `bin/analyze.ps1` - Analyzer wrapper
|
- [x] `bin/analyze.ps1` - Analyzer wrapper
|
||||||
- [x] `bin/status.ps1` - Status wrapper
|
- [x] `bin/status.ps1` - Status wrapper
|
||||||
|
|
||||||
### Phase 4: Testing & CI (Planned)
|
### Phase 4: Testing & CI (Planned)
|
||||||
|
|
||||||
- [ ] `tests/` - Pester tests
|
- [ ] `tests/` - Pester tests
|
||||||
- [ ] GitHub Actions workflows
|
- [ ] GitHub Actions workflows
|
||||||
- [ ] `scripts/build.ps1` - Build automation
|
- [ ] `scripts/build.ps1` - Build automation
|
||||||
|
|||||||
87
quick-install.ps1
Normal file
87
quick-install.ps1
Normal file
@@ -0,0 +1,87 @@
|
|||||||
|
#!/usr/bin/env pwsh
|
||||||
|
# Mole Quick Installer for Windows
|
||||||
|
# One-liner install: iwr -useb https://raw.githubusercontent.com/tw93/Mole/windows/quick-install.ps1 | iex
|
||||||
|
|
||||||
|
#Requires -Version 5.1
|
||||||
|
|
||||||
|
$ErrorActionPreference = "Stop"
|
||||||
|
Set-StrictMode -Version Latest
|
||||||
|
|
||||||
|
# Colors
|
||||||
|
$ESC = [char]27
|
||||||
|
$Colors = @{
|
||||||
|
Green = "$ESC[32m"
|
||||||
|
Yellow = "$ESC[33m"
|
||||||
|
Cyan = "$ESC[36m"
|
||||||
|
Red = "$ESC[31m"
|
||||||
|
NC = "$ESC[0m"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Write-Step {
|
||||||
|
param([string]$Message)
|
||||||
|
Write-Host " $($Colors.Cyan)→$($Colors.NC) $Message"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Write-Success {
|
||||||
|
param([string]$Message)
|
||||||
|
Write-Host " $($Colors.Green)✓$($Colors.NC) $Message"
|
||||||
|
}
|
||||||
|
|
||||||
|
function Write-ErrorMsg {
|
||||||
|
param([string]$Message)
|
||||||
|
Write-Host " $($Colors.Red)✗$($Colors.NC) $Message"
|
||||||
|
}
|
||||||
|
|
||||||
|
# Main installation
|
||||||
|
try {
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host " $($Colors.Cyan)Mole Quick Installer$($Colors.NC)"
|
||||||
|
Write-Host " $($Colors.Yellow)Installing experimental Windows version...$($Colors.NC)"
|
||||||
|
Write-Host ""
|
||||||
|
|
||||||
|
# Check prerequisites
|
||||||
|
Write-Step "Checking prerequisites..."
|
||||||
|
|
||||||
|
if (-not (Get-Command git -ErrorAction SilentlyContinue)) {
|
||||||
|
Write-ErrorMsg "Git is not installed. Please install Git first:"
|
||||||
|
Write-Host " https://git-scm.com/download/win"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Success "Git found"
|
||||||
|
|
||||||
|
# Create temp directory
|
||||||
|
$TempDir = Join-Path $env:TEMP "mole-install-$(Get-Random)"
|
||||||
|
Write-Step "Downloading Mole..."
|
||||||
|
|
||||||
|
# Clone windows branch
|
||||||
|
git clone --quiet --depth 1 --branch windows https://github.com/tw93/Mole.git $TempDir 2>&1 | Out-Null
|
||||||
|
|
||||||
|
if (-not (Test-Path "$TempDir\install.ps1")) {
|
||||||
|
Write-ErrorMsg "Failed to download installer"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
Write-Success "Downloaded to temp directory"
|
||||||
|
|
||||||
|
# Run installer
|
||||||
|
Write-Step "Running installer..."
|
||||||
|
Write-Host ""
|
||||||
|
|
||||||
|
& "$TempDir\install.ps1" -AddToPath
|
||||||
|
|
||||||
|
Write-Host ""
|
||||||
|
Write-Success "Installation complete!"
|
||||||
|
Write-Host ""
|
||||||
|
Write-Host " Run ${Colors.Green}mole$($Colors.NC) to get started"
|
||||||
|
Write-Host ""
|
||||||
|
|
||||||
|
} catch {
|
||||||
|
Write-ErrorMsg "Installation failed: $_"
|
||||||
|
exit 1
|
||||||
|
} finally {
|
||||||
|
# Cleanup
|
||||||
|
if (Test-Path $TempDir) {
|
||||||
|
Remove-Item $TempDir -Recurse -Force -ErrorAction SilentlyContinue
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user