← Back to archive

Repo of the Day

tw93/Mole: 🐹 Clean, uninstall, analyze, optimize, and monitor your Mac from the terminal.

Published: Sep 15, 2026

Open repository ↗

🐹 Clean, uninstall, analyze, optimize, and monitor your Mac from the terminal. - tw93/Mole

Summary

Mole is an open-source CLI (mo) for macOS that combines cleanup, app uninstall, disk exploration, system maintenance, and live monitoring in a single terminal binary. It requires macOS 12 or later and runs on both Intel and Apple Silicon, with installation via Homebrew or the project's install script. The repository is licensed under GPL-3.0; a separate paid native Mac app called Mole for Mac exists but is not part of this codebase.

What it is useful for

Mole targets everyday Mac maintenance tasks that developers usually juggle with several paid utilities. mo clean clears user and app caches, logs, browser caches, developer caches like npm and pnpm, and leftovers from already-removed apps. mo uninstall removes an app together with its preferences, launch agents, and support files, keeping shared data when another copy still uses it. mo analyze is a keyboard-driven terminal disk explorer that shows where space is going and can move selected items to Trash. mo optimize runs bounded maintenance such as DNS cache flushing, QuickLook thumbnail refreshes, and Spotlight reindexing, while mo status provides a read-only dashboard for CPU, memory, disk, network, and power. mo purge finds rebuildable project artifacts like node_modules, target, and dist across configured scan directories, and mo installer clears leftover DMG, PKG, and ISO files from Downloads and similar locations.

How engineers can use it

Install the CLI with brew install mole (CLI only) or curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash. Run mo for an interactive menu, or jump to a subcommand such as mo clean, mo analyze, or mo status. Append --dry-run to destructive commands (clean, uninstall, purge, installer, remove) to preview, and add --debug for more detail. Protect items you want to keep via mo clean --whitelist and mo optimize --whitelist, which persist in ~/.config/mole/whitelist. Operations are logged to ~/Library/Logs/mole/operations.log; review them with mo history and disable logging with MO_NO_OPLOG=1. For automation and monitoring, mo status --json, mo status --watch --interval 2s, and mo analyze --json <path> produce scriptable output. The README also documents optional Raycast and Alfred launchers installed via a separate script.

Documented limits: Mole is built for macOS, with an experimental Windows build on a separate branch only. Commands that touch system-owned files can still prompt for administrator access even when Mole is installed under ~/.local/bin. mo analyze may return partial results and still exits successfully, so the README recommends checking scan_status in JSON output before relying on it programmatically.