HubLensCLItw93/Mole
// archived 2026-04-17
tw93

Mole

Other#macOS#CLI#System Optimization#Disk Cleanup
View on GitHub
55

// summary

Mole is a comprehensive command-line toolkit designed to deep clean and optimize macOS systems by removing unnecessary files and managing applications. It provides a suite of utilities for disk analysis, system monitoring, and the removal of build artifacts or installer remnants. The tool prioritizes safety through conservative cleanup defaults and dry-run capabilities to ensure secure system maintenance.

// technical analysis

Mole is a comprehensive, single-binary command-line toolkit designed to deep clean, optimize, and monitor macOS systems. By consolidating the functionality of multiple specialized utilities into one tool, it addresses the fragmentation of system maintenance tasks and helps users reclaim significant disk space. The project prioritizes safety through conservative cleanup boundaries, path validation, and explicit confirmation requirements, while offering advanced users machine-readable outputs for automation and scripting.

// key highlights

01
Combines multiple maintenance functions like cleaning, uninstallation, and disk analysis into a single, lightweight binary.
02
Performs deep system cleaning by removing caches, logs, browser leftovers, and orphaned application data.
03
Features a smart uninstaller that identifies and removes hidden remnants like launch agents and preferences associated with apps.
04
Provides a real-time system dashboard to monitor CPU, memory, disk, and network performance with health scoring.
05
Includes a project artifact purge tool to automatically identify and remove bulky build directories like node_modules or target folders.
06
Supports machine-readable JSON output for disk analysis and system status, enabling seamless integration into automated workflows.

// use cases

01
Deep system cleaning to reclaim disk space by removing caches, logs, and orphaned application data
02
Smart application uninstallation that clears hidden remnants like preferences and launch agents
03
Real-time system health monitoring and disk usage analysis with machine-readable JSON output

// getting started

You can install Mole on macOS using Homebrew with 'brew install mole' or via the provided installation script. Once installed, you can access the interactive menu by running 'mo' in your terminal or use specific commands like 'mo clean' or 'mo status' to perform maintenance tasks. It is recommended to use the '--dry-run' flag with destructive commands to preview changes before execution.