Skip to content

Mole: the open-source Bash+Go tool replacing $60+ of paid Mac apps

· 7 min read

Keeping a Mac clean costs money. CleanMyMac X runs about $40/year. DaisyDisk is $10–12 depending on where you buy it. iStat Menus is $12. AppCleaner is free, but limited. If you want the full stack — cleanup, uninstallation, disk analysis, and system monitoring — you’re looking at $60+ and four separate apps cluttering your menu bar.

Mole replaces all of them with a single mo command. It’s a free, MIT-licensed CLI tool that’s accumulated over 40,000 GitHub stars since its September 2025 release. The whole thing is built from Bash scripts and a Go TUI, and it’s genuinely one of the most thoughtfully engineered shell-based tools I’ve come across.

What Mole actually does

Mole organises its functionality into six subcommands, each targeting a different maintenance task:

mo clean — the big one. Scans and removes system caches, application logs, browser data, Xcode artifacts, npm/Maven caches, Flutter build files, and Expo bundles. This is your CleanMyMac replacement.

mo uninstall — removes applications along with their leftover files scattered across Application Support, Containers, LaunchAgents, Preferences, and a dozen other locations macOS doesn’t clean up for you. Supports Homebrew cask --zap for apps installed through Homebrew.

mo analyze — a visual disk usage explorer rendered in the terminal. Think DaisyDisk, but in your shell. Identifies large files and old directories, and routes deletions through Finder’s Trash for safety.

mo status — a real-time dashboard showing CPU, memory, disk, network, GPU, and power metrics. Calculates a health score. This covers what iStat Menus does, minus the menu bar icon.

mo purge — specifically targets developer build artifacts: node_modules, target, build, DerivedData, Pods, venv, and similar directories. If you’ve ever wondered where 50GB of disk space went, it was probably node_modules three projects deep.

mo installer — finds and removes .dmg and .pkg files from Downloads, Desktop, Homebrew caches, iCloud, and Mail downloads. The kind of files you download once and forget about for years.

The developer-awareness is what sets Mole apart from general-purpose cleaners. It knows about Xcode’s CoreSimulator and DeviceSupport directories, JetBrains Toolbox caches, Puppeteer’s Chromium downloads, React Native build output, and CocoaPods. If you’re a developer on macOS, this tool was built for your actual workflow.

The hybrid Bash+Go architecture

Mole’s tech stack is unusual. The core file operations — scanning, deletion, cache cleanup — are plain Bash scripts living in bin/ and lib/. The interactive TUI features (mo status and mo analyze) are written in Go using the Bubble Tea framework.

This split makes pragmatic sense. Bash is ideal for file operations — find, rm, du are already the right tools for the job, and wrapping them in shell functions keeps the code auditable. You can read every line of what Mole will delete. Go + Bubble Tea, on the other hand, gives the dashboard and disk explorer a responsive, interactive interface that Bash simply can’t deliver.

The codebase enforces discipline on both sides. Bash scripts require set -euo pipefail headers and BSD-compatible commands (since macOS ships BSD userland). Go files are kept under 500 lines each. Quality tooling includes shellcheck and shfmt for the shell code, golangci-lint for Go, and bats-core for automated testing. There’s a pre-commit hook setup and a CI pipeline that runs on every PR.

For distribution, everything compiles down to a single binary you install via Homebrew:

bash
brew install mole

Or via curl if you prefer:

bash
curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash

Safety-first design

A tool that deletes files had better be careful about it. Mole takes this seriously — there’s a dedicated SECURITY_AUDIT.md in the repository documenting its safety architecture.

The --dry-run flag is available on all major destructive commands. Run mo clean --dry-run and you’ll see exactly what would be removed, with file sizes, before anything is touched. This alone puts it ahead of most cleanup tools that just show a “free X GB” button.

Path validation rejects empty paths, relative paths, traversal segments (..), and control characters. System roots — /, /System, /bin, /usr, /etc, /var — are permanently protected, even with sudo. Only specific subdirectories under protected roots are allowlisted for maintenance (like /private/tmp and /private/var/log).

There’s a 30-day inactivity requirement before orphaned application data gets flagged for removal. Keychains, credentials, VPN configurations, and Time Machine backups are handled conservatively. Symlink targets are validated before deletion, and sudo-deletion of symlinks is refused outright.

Every operation gets logged to ~/Library/Logs/mole/operations.log. If something goes wrong, you have a full audit trail.

How it compares to the paid alternatives

Here’s the concrete breakdown:

ToolPriceWhat Mole covers
CleanMyMac X~$40/yearCache cleanup, system junk, app uninstallation
DaisyDisk$10–12Disk space analysis and visualization
iStat Menus$11.99System monitoring (CPU, memory, disk, network)
AppCleanerFreeApp uninstallation with leftover removal

Mole covers the core functionality of all four. What it doesn’t do: malware scanning (CleanMyMac includes this), persistent menu bar widgets (iStat Menus’ specialty), and there’s no undo for most operations beyond the Trash safety net in mo analyze.

The CLI-only interface is a genuine trade-off. If you want to drag-and-drop apps onto an uninstaller, Mole isn’t that. But if you’re already comfortable in a terminal — and if you’re a developer, you probably are — the scriptability is a feature, not a limitation. Mole outputs JSON via --json, integrates with Raycast and Alfred, and supports shell tab completion. You can wire mo clean --json into a cron job or monitoring script in ways that CleanMyMac never could.

Getting started

The recommended first run is gentle:

bash
brew install mole

# See what's taking up space
mo status

# Preview what would be cleaned, without deleting anything
mo clean --dry-run

# If the list looks right, run it for real
mo clean

For developers specifically, mo purge is worth running on its own:

bash
# Find and remove build artifacts across all your projects
mo purge

Users regularly report freeing multiple gigabytes on their first run. One Medium review described clearing 3 GB of Adobe cache alone. Another user reported reclaiming 95 GB of accumulated junk. Your mileage will vary — the --dry-run preview lets you see exactly what’s there before committing.

If you use Touch ID, mo touchid configures sudo authentication through Touch ID — a nice quality-of-life addition that isn’t strictly about cleaning but fits the “maintain your Mac” scope.

tw93’s open-source philosophy

Mole comes from tw93, a product engineer whose GitHub bio reads “Anything added dilutes everything else.” That philosophy shows across their projects:

  • Pake (~47k stars) — wraps any webpage into a native desktop app using Rust and Tauri. One command, one concern.
  • MiaoYan (~7.8k stars) — a lightweight Markdown editor in Swift. No plugin system, no collaboration features, just fast Markdown editing.
  • Kaku — a terminal built specifically for AI coding workflows.

Each project uses a different language — Rust, Swift, Bash+Go — chosen to fit the domain rather than forced into a single stack. There’s something refreshing about a developer who picks the right tool for each job rather than building everything in their comfort zone.

The release cadence is remarkable too. Mole ships roughly weekly, with detailed changelogs and themed version codenames — many borrowed from Monster Hunter (recent releases include “Razewing Ratha” and “Rathalos”). The commit history on main has nearly 1,900 entries as of March 2026. This isn’t a weekend project that got stars and stalled.

Worth trying

If you’re a developer on macOS who’s never audited what’s eating your disk space, run mo status and mo clean --dry-run. The results might surprise you. Xcode’s DerivedData alone can quietly consume tens of gigabytes, and node_modules directories from forgotten projects compound fast.

Mole won’t match every feature of every app it aims to replace. But it covers 90% of what most developers actually need from those tools, it’s transparent about what it does, and it’s free. The code is readable enough to audit yourself if you’re cautious about running cleanup scripts — and honestly, you should be. That Mole makes auditing easy is one of its best features.

The repo is at github.com/tw93/Mole.

If you enjoyed this, you might also like

👤

Written by

Daniel Dewhurst

Lead AI Solutions Engineer building with AI, Laravel, TypeScript, and the craft of software.

Comments