Skip to content
Back to search

Mole

๐Ÿน Clean, uninstall, analyze, optimize, and monitor your Mac. Free open-source CLI, plus a native Mac app.

Safety scan

A static text scan, not a guarantee. Select the badge to see what was scanned and every finding.

Checked today

Check it deeper on your machine

It has changed since its scan on 11 Nov 2026.

As a Claude Code plugin, install it and then ask Claude Code:

/plugin marketplace add keithmackay/mackayi/plugin install scanskillsafety@mackayiDo a deep scan of https://github.com/tw93/Mole with scanskillsafety

Or from a terminal, clone it and run it:

git clone https://github.com/keithmackay/scanskillsafety-skill ~/.claude/skills/scanskillsafetynode ~/.claude/skills/scanskillsafety/cli.cjs --deep 'https://github.com/tw93/Mole'

It checks the exact commit: every file, its packages against OSV (api.osv.dev), how it compares with this page's scan (findsafeskills.com receives the repository's address), and, if you agree, Claude reading every file with your own Claude subscription. It never runs the code.

Badge for your README
findsafeskills safety rating

Markdown

[![findsafeskills safety rating](/api/listings/tw93--mole/badge.svg)](/listings/tw93--mole)

HTML

<a href="/listings/tw93--mole"><img src="/api/listings/tw93--mole/badge.svg" alt="findsafeskills safety rating" /></a>

Install

i

Install instructions from the README

As written by the repo's author. findsafeskills has not verified these steps.

These steps run a script from the network that findsafeskills does not scan.

Mole requires macOS 12 or newer and supports both Intel and Apple Silicon Macs. If Homebrew no longer supports your macOS version, use the script install instead.

**Install via Homebrew**

brew install mole

**Or via script**

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

**With an AI agent**

Tell your agent:

> Install Mole for me by reading https://raw.githubusercontent.com/tw93/Mole/main/llms.txt

Or install the skill yourself. With it, Claude Code, Codex, Cursor and other agents show every cleanup with `--dry-run` before anything is removed, and leave app uninstalls and administrator steps to you. Update with `npx skills update -g -y`.

npx skills add tw93/Mole -a claude-code codex cursor -g -y

As a host plugin: `/plugin marketplace add tw93/Mole` then `/plugin install mole@mole` in Claude Code, or `codex plugin marketplace add tw93/Mole` then `codex plugin add mole@mole` in Codex.

**Run**

mo                           # Interactive menu
mo clean                     # Deep cleanup + already-uninstalled app leftovers
mo uninstall                 # Remove installed apps + their leftovers
mo optimize                  # Refresh caches & services
mo analyze                   # Visual disk explorer (or 'mo analyse')
mo status                    # Live system health dashboard
mo purge                     # Clean project build artifacts
mo installer                 # Find and remove installer files
mo slim                      # Remove Intel code from universal apps

mo touchid                   # Configure Touch ID for sudo
mo completion                # Set up shell tab completion
mo update                    # Update Mole
mo update --nightly          # Update to latest unreleased main build, script install only
mo remove                    # Remove Mole from system
mo --help                    # Show help
mo --version                 # Show installed version

**Preview safely**

mo clean --dry-run
mo uninstall --dry-run
mo optimize --dry-run
mo purge --dry-run
mo installer --dry-run
mo slim --dry-run
mo history
mo history --json

mo clean --dry-run --debug   # Preview + detailed logs
mo optimize --whitelist      # Manage protected optimization rules
mo clean --whitelist         # Manage protected caches
mo purge --paths             # Configure project scan directories
mo analyze /Volumes          # Analyze external drives only
mo analyze /private/tmp      # Review user-owned temporary directories

<details> <summary><strong>Other install options</strong></summary>

To install a specific release, pass any tag from the [releases page](https://github.com/tw93/mole/releases), with or without its leading `V`. To track the development branch instead, pass `main`:

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

`main` installs unreleased code from the default branch, so expect rough edges. `latest` still works as a legacy alias for `main`; despite the name it does not install the newest stable release.

The script normally installs to `/usr/local/bin`, which may ask for an administrator password. Install into a user-owned directory if you want future `mo update` runs to stay password-free:

mkdir -p "$HOME/.local/bin"
curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash -s -- --prefix "$HOME/.local/bin"
export PATH="$HOME/.local/bin:$PATH"

Add the same `PATH` export to `~/.zshrc` or your shell profile for new terminals. Mole updates the installation you invoked, so it keeps using this directory. Commands that change system-owned files may still request administrator access.

**Nix**

On macOS, Nix users can install the flake from `main`, which contains unreleased changes:

nix profile install github:tw93/mole/main#mole
nix profile upgrade mole

What was scanned

The files the safety scan read, as written by the repository's author and shown as plain text. Lines with a finding are marked.

.claude-plugin/marketplace.json ยท Manifest ยท 18 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. {
  2. "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
  3. "name": "mole",
  4. "description": "Agent skill for the Mole CLI on macOS and Windows.",
  5. "owner": {
  6. "name": "Tw93",
  7. "email": "hitw93@gmail.com"
  8. },
  9. "plugins": [
  10. {
  11. "name": "mole",
  12. "description": "Drive the Mole CLI (mo) safely: find what uses disk space, preview cleanup with --dry-run, uninstall apps, and read system health and cleanup history.",
  13. "category": "productivity",
  14. "source": "./plugins/mole",
  15. "homepage": "https://github.com/tw93/Mole"
  16. }
  17. ]
  18. }
README.md ยท README ยท 525 lines

View this file on GitHub (read at the repository's current version: the scan did not record which commit it read)

This file has changed since it was scanned, so this is not exactly the text that was scanned, and no line is marked. The findings are listed with the safety scan above.

  1. <p align="right"><b>macOS</b> ยท <a href="https://github.com/tw93/Mole/tree/windows#readme">Windows</a> ยท <a href="https://github.com/tw93/Mole/tree/linux#readme">Linux</a></p>
  2. <div align="center">
  3. <h1>Mole</h1>
  4. <p><b>Deep clean, uninstall, optimize, analyze disk and monitor your Mac. Free open-source CLI, plus a Mac app.</b></p>
  5. <p>English ยท <a href="README_CN.md">ไธญๆ–‡</a> ยท <a href="README_TW.md">็น้ซ”</a> ยท <a href="README_JA.md">ๆ—ฅๆœฌ่ชž</a> ยท <a href="README_KR.md">ํ•œ๊ตญ์–ด</a> ยท <a href="README_DE.md">Deutsch</a> ยท <a href="README_FR.md">Franรงais</a> ยท <a href="README_PL.md">Polski</a> ยท <a href="README_UA.md">ะฃะบั€ะฐั—ะฝััŒะบะฐ</a> ยท <a href="README_RU.md">ะ ัƒััะบะธะน</a></p>
  6. <a href="https://github.com/tw93/mole/stargazers"><img src="https://img.shields.io/github/stars/tw93/mole?style=flat-square" alt="Stars"></a>
  7. <a href="https://github.com/tw93/mole/releases"><img src="https://img.shields.io/github/v/release/tw93/mole?label=version&style=flat-square" alt="Version"></a>
  8. <a href="LICENSE"><img src="https://img.shields.io/badge/license-GPL_v3-blue.svg?style=flat-square" alt="License"></a>
  9. <a href="https://github.com/tw93/mole/commits"><img src="https://img.shields.io/github/commit-activity/m/tw93/mole?style=flat-square" alt="Commits"></a>
  10. <a href="https://x.com/HiTw93"><img src="https://img.shields.io/badge/follow-Tw93-red?style=flat-square&logo=x" alt="Twitter"></a>
  11. <a href="https://t.me/+9f9gf4ZrFSQ2OWVl"><img src="https://img.shields.io/badge/chat-Telegram-blueviolet?style=flat-square&logo=Telegram" alt="Telegram"></a>
  12. </div>
  13. <p align="center">
  14. <img src="./docs/img/big-mole.png" alt="Mole cleanup results" width="1000" />
  15. </p>
  16. > ๐Ÿ’ก This repo is the free open-source CLI (`mo`). Prefer a native app? [Mole for Mac](https://mole.fit/) is a separate download with review-before-delete cleanup, tested leftovers for 800+ apps, maintenance, disk drill-downs, live status, and fan controls on supported Macs. On Windows, the native app is [Mole for Windows](https://mole.fit/windows). `brew install mole` installs the CLI only.
  17. ## Features
  18. - **All-in-one CLI toolkit**: Combines CleanMyMac, AppCleaner, DaisyDisk, and iStat Menus style workflows in one terminal command
  19. - **Deep clean**: Removes caches, logs, leftovers, and orphaned app data to reclaim disk space
  20. - **Smart uninstaller**: Removes apps together with LaunchAgents, preferences, and leftovers
  21. - **Disk analyzer**: Visualizes disk usage with an interactive TUI, finds large files, and navigates directories
  22. - **System maintenance**: Flushes DNS, refreshes QuickLook/icons, and optimizes system databases
  23. - **Live monitoring**: Shows real-time CPU, memory, disk I/O, network traffic, and process stats
  24. ## Quick Start
  25. Mole requires macOS 12 or newer and supports both Intel and Apple Silicon Macs. If Homebrew no longer supports your macOS version, use the script install instead.
  26. **Install via Homebrew**
  27. ```bash
  28. brew install mole
  29. ```
  30. **Or via script**
  31. ```bash
  32. curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash
  33. ```
  34. **With an AI agent**
  35. Tell your agent:
  36. > Install Mole for me by reading https://raw.githubusercontent.com/tw93/Mole/main/llms.txt
  37. Or install the skill yourself. With it, Claude Code, Codex, Cursor and other agents show every cleanup with `--dry-run` before anything is removed, and leave app uninstalls and administrator steps to you. Update with `npx skills update -g -y`.
  38. ```bash
  39. npx skills add tw93/Mole -a claude-code codex cursor -g -y
  40. ```
  41. As a host plugin: `/plugin marketplace add tw93/Mole` then `/plugin install mole@mole` in Claude Code, `codex plugin marketplace add tw93/Mole` then `codex plugin add mole@mole` in Codex, or `dsh plugin --profile <name> add dsh-mole` in DeepSeek Harness.
  42. **Run**
  43. ```bash
  44. mo # Interactive menu
  45. mo clean # Deep cleanup + already-uninstalled app leftovers
  46. mo uninstall # Remove installed apps + their leftovers
  47. mo optimize # Refresh caches & services
  48. mo analyze # Visual disk explorer (or 'mo analyse')
  49. mo status # Live system health dashboard
  50. mo purge # Clean project build artifacts
  51. mo installer # Find and remove installer files
  52. mo slim # Remove Intel code from universal apps
  53. mo touchid # Configure Touch ID for sudo
  54. mo completion # Set up shell tab completion
  55. mo update # Update Mole
  56. mo update --nightly # Update to latest unreleased main build, script install only
  57. mo remove # Remove Mole from system
  58. mo --help # Show help
  59. mo --version # Show installed version
  60. ```
  61. **Preview safely**
  62. ```bash
  63. mo clean --dry-run
  64. mo uninstall --dry-run
  65. mo optimize --dry-run
  66. mo purge --dry-run
  67. mo installer --dry-run
  68. mo slim --dry-run
  69. mo history
  70. mo history --json
  71. mo clean --dry-run --debug # Preview + detailed logs
  72. mo optimize --whitelist # Manage protected optimization rules
  73. mo clean --whitelist # Manage protected caches
  74. mo purge --paths # Configure project scan directories
  75. mo analyze /Volumes # Analyze external drives only
  76. mo analyze /private/tmp # Review user-owned temporary directories
  77. ```
  78. <details>
  79. <summary><strong>Other install options</strong></summary>
  80. To install a specific release, pass any tag from the [releases page](https://github.com/tw93/mole/releases), with or without its leading `V`. To track the development branch instead, pass `main`:
  81. ```bash
  82. curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash -s -- 1.51.0
  83. curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash -s -- main
  84. ```
  85. `main` installs unreleased code from the default branch, so expect rough edges. `latest` still works as a legacy alias for `main`; despite the name it does not install the newest stable release.
  86. The script normally installs to `/usr/local/bin`, which may ask for an administrator password. Install into a user-owned directory if you want future `mo update` runs to stay password-free:
  87. ```bash
  88. mkdir -p "$HOME/.local/bin"
  89. curl -fsSL https://raw.githubusercontent.com/tw93/mole/main/install.sh | bash -s -- --prefix "$HOME/.local/bin"
  90. export PATH="$HOME/.local/bin:$PATH"
  91. ```
  92. Add the same `PATH` export to `~/.zshrc` or your shell profile for new terminals. Mole updates the installation you invoked, so it keeps using this directory. Commands that change system-owned files may still request administrator access.
  93. **Nix**
  94. On macOS, Nix users can install the flake from `main`, which contains unreleased changes:
  95. ```bash
  96. nix profile install github:tw93/mole/main#mole
  97. nix profile upgrade mole
  98. nix profile remove mole
  99. ```
  100. For a declarative installation, add `github:tw93/mole/main` as a flake input and use its `packages.${system}.mole` package. Update or remove Mole through Nix; `mo update` and `mo remove` leave Nix-managed installations unchanged.
  101. </details>
  102. **On Windows** ([Windows CLI](https://github.com/tw93/Mole/tree/windows#readme))
  103. ```powershell
  104. iwr -useb https://raw.githubusercontent.com/tw93/Mole/windows/quick-install.ps1 | iex
  105. ```
  106. **On Linux** ([Linux CLI](https://github.com/tw93/Mole/tree/linux#readme))
  107. ```bash
  108. curl -fsSL https://raw.githubusercontent.com/tw93/Mole/linux/install.sh | bash
  109. ```
  110. Mole is only distributed through Homebrew, this repository and [mole.fit](https://mole.fit/). `molemac.com`, `moleapp.net` and `molefit.com` are not Mole, and the Windows app at `mole.bluecatbot.com` is a separate community project.
  111. ## Safety
  112. Mole can remove files, so it validates paths, protects shared and system-owned locations, and asks for confirmation when an action needs it. When Mole cannot prove an item is safe to change, it skips or refuses it.
  113. - `clean`, `uninstall`, `purge`, `installer`, `slim`, and `remove` can delete files, so review them with `--dry-run` first and add `--debug` when needed
  114. - Run Mole without `sudo`; it requests administrator access only when needed
  115. - `mo uninstall`, `mo analyze`, and `mo slim` route deletions to Trash by default after confirmation; `clean`, `purge`, and `installer` delete permanently. `mo uninstall --permanent` skips Trash
  116. - Cleanup activity is recorded in `~/Library/Logs/mole/operations.log`; review it with `mo history` or disable it with `MO_NO_OPLOG=1`
  117. - Protect caches with `mo clean --whitelist`, or maintenance items with `mo optimize --whitelist`
  118. - If the whitelist file cannot be read, `clean`, `purge`, and `optimize` stop instead of running without it
  119. Review [SECURITY.md](SECURITY.md) and [SECURITY_AUDIT.md](SECURITY_AUDIT.md) for reporting guidance, safety boundaries, and current limitations.
  120. ## Configuration
  121. Mole runs without configuration. These environment variables adapt it to slow disks, stalled network or cloud mounts; raise a timeout only when Mole reports that a step timed out.
  122. - `MOLE_TIMEOUT_QUICK_DETECT_SEC` (2): command-availability probes
  123. - `MOLE_TIMEOUT_SHORT_QUERY_SEC` (3): lightweight queries such as `df` and `tmutil status`
  124. - `MOLE_TIMEOUT_MEDIUM_PROBE_SEC` (5): probes that walk a directory tree or reach the network
  125. - `MOLE_TIMEOUT_PKG_LIST_SEC` (10): package-manager listings such as `brew list`
  126. - `MOLE_TIMEOUT_PKG_CLEANUP_SEC` (20): cache cleanups that walk the disk
  127. - `MOLE_TIMEOUT_DISK_VERIFY_SEC` (30): filesystem verify and repair
  128. - `MOLE_TIMEOUT_HINT_SCAN_SEC` (15): unbounded user-directory scans
  129. - `MOLE_CLOUD_OFFICE_SECTION_BUDGET_SEC` (300): overall budget for the cloud and Office cleanup section
  130. The number in parentheses is the default in seconds. For example, give the scans more time on a slow disk:
  131. ```bash
  132. MOLE_TIMEOUT_HINT_SCAN_SEC=60 MOLE_TIMEOUT_MEDIUM_PROBE_SEC=15 mo clean
  133. ```
  134. ## Features in Detail
  135. The examples below are shortened. Available items, sizes, and skip reasons depend on your Mac.
  136. ### Clean
  137. `mo clean` reviews known-safe caches, logs, temporary files, developer artifacts, and leftovers from apps that are no longer installed. It empties `~/.Trash` by default; to keep it, select Trash in `mo clean --whitelist`, the same menu that protects caches you want to keep. Volume Trashes such as `/Volumes/*/.Trashes` are not emptied with it. Selections persist in `~/.config/mole/whitelist`. Before adding custom paths, open the menu and press Enter to save the selections, then append one path per line. An existing file replaces the optional defaults; built-in safety protections still apply.
  138. ```text
  139. $ mo clean
  140. Clean Your Mac
  141. โš™ Apple Silicon | Free space: 219.0GB
  142. โžค User essentials
  143. โœ“ User app cache ยท 18 items, 2.4GB
  144. โœ“ User app logs ยท 7 items, 12.8MB
  145. โœ“ Trash ยท emptied, 9 items
  146. โžค App caches
  147. โœ“ App Store cache ยท 8 items, 248.5MB
  148. โžค Browsers
  149. โœ“ Safari cache ยท 24 items, 642.1MB
  150. โœ“ Chrome cache ยท 31 items, 1.2GB
  151. โžค Developer tools
  152. โœ“ npm cache ยท cleaned
  153. โ—Ž pnpm cache ยท skipped (pnpm busy)
  154. ======================================================================
  155. Cleanup complete
  156. Removed: 4.5GB ยท 97 items
  157. Free space: 223.5GB (+4.5GB)
  158. ======================================================================
  159. ```
  160. ### Uninstall
  161. `mo uninstall` removes an installed app together with related files that Mole can tie back to that app. It keeps shared data when another installed copy still uses it. If the app is already gone, use `mo clean` to look for leftovers.
  162. Personal data, including settings and plugins, is kept by default. Press `D` in the removal preview to select individual data paths. `mo uninstall --with-data` starts with that data selected, except browser profiles and App Group containers; the preview lists it separately and `D` still lets you keep any path. After removal, references in shell, Hook, or MCP configuration are listed by file and line only; Mole does not edit those configurations.
  163. ```text
  164. $ mo uninstall
  165. Select Apps to Remove 1/3 selected
  166. โžค โ— Photoshop 2024 4.20GB | 2mo ago
  167. โ—‹ IntelliJ IDEA 2.80GB | 3d ago
  168. โ—‹ Premiere Pro 3.40GB | 2w ago
  169. Files to be removed:
  170. โœ“ Photoshop 2024, 4.20GB
  171. โœ“ /Applications/Adobe Photoshop 2024/Adobe Photoshop 2024.app
  172. Personal data kept:
  173. ~/Library/Application Support/Adobe/Adobe Photoshop 2024
  174. ~/Library/Preferences/com.adobe.Photoshop.plist
  175. D choose personal data
  176. ======================================================================
  177. Uninstall complete
  178. Removed 1 app, freed 4.20GB: Photoshop 2024
  179. ======================================================================
  180. ```
  181. ### Optimize
  182. `mo optimize` runs bounded maintenance for supported Finder, network, database, and macOS services. Tasks that are unnecessary, unsafe at the moment, or unavailable are skipped with a reason. Use `mo optimize --whitelist` to exclude tasks or path patterns, such as a long-lived mounted disk image at `/Volumes/mail` that should not show up as a detach candidate.
  183. ```text
  184. $ mo optimize
  185. Optimize
  186. โš™ System 18/32 GB RAM | 616/926 GB Disk | Uptime 6d
  187. PERFORMANCE DIAGNOSIS
  188. โœ“ No sustained high-CPU bottleneck detected
  189. โžค Finder Cache Refresh
  190. โœ“ QuickLook thumbnails refreshed
  191. โœ“ Icon services cache rebuilt
  192. โžค Network Cache Refresh
  193. โœ“ DNS cache refreshed
  194. โžค Database Optimization
  195. โ—Ž Close these apps before database optimization: Safari
  196. โžค Disk Health
  197. โœ“ Disk verify skipped
  198. ======================================================================
  199. Optimization Complete
  200. Applied 2 optimizations
  201. 13 unchanged | 3 skipped | 1 unavailable
  202. ======================================================================
  203. ```
  204. ### Analyze
  205. `mo analyze` opens a terminal disk explorer. It supports arrow keys and Vim navigation, filtering, multi-selection, Finder preview, and confirmed moves to Trash. External drives are skipped from the default overview; inspect them with `mo analyze /Volumes` or a specific mount path. Use `mo analyze /private/tmp` to review user-owned temporary files without turning them into automatic cleanup targets. File-by-file scans count APFS clones that share all blocks once; fast folder estimates can still count shared blocks more than once.
  206. A size ending in `+` contains measured bytes from a partial scan; `unknown` means the size could not be measured. Results cut short by temporary failures such as timeouts do not replace complete cached measurements, and a later refresh can recover the missing data. Folders macOS will not let the terminal read stay partial until access changes. The terminal list keeps the 30 largest entries, so an unreadable entry may fall outside that list; the total still indicates a partial scan. Directory JSON output includes all scanned entries.
  207. `mo analyze --json /path` includes `scan_status` on the result and each entry: `complete`, `partial`, or `unavailable`. Numeric sizes contain measured bytes; a zero with `unavailable` does not mean an empty directory. Partial scans still exit successfully, so automation should inspect `scan_status`. Completeness applies within Mole's existing scan exclusions and does not promise an atomic filesystem snapshot.
  208. ```text
  209. $ mo analyze
  210. Analyze Disk (302.1GB free)
  211. Select a location to explore:
  212. โ–ถ 1. โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 47.9% | Home 75.4GB
  213. 2. โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 22.0% | User Library 34.6GB
  214. 3. โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 14.2% | Applications 22.4GB
  215. 4. โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 10.7% | System Library 16.9GB
  216. 5. โ–ˆโ–ˆโ–ˆ 5.2% | Old Downloads (90d+) 8.2GB >3mo
  217. ```
  218. ### Status
  219. `mo status` is a read-only dashboard for hardware, system pressure, disk activity, network traffic, power, and processes.
  220. When the IPv4 default route uses a tunnel, network graphs use that interfaceโ€™s rates to avoid counting the same traffic again on its physical carrier. JSON retains per-interface rates, including the routed tunnel; idle non-default tunnels stay hidden.
  221. ```text
  222. $ mo status
  223. Mole Status Health โ— 92 MacBook Pro ยท M4 Pro ยท 32GB ยท macOS 26
  224. โš™ CPU โ–ฆ Memory
  225. Total โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 45.2% Used โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 58.4%
  226. Load 0.82 / 1.05 / 1.23 (8 cores) Total 18.7 / 32.0 GB
  227. Core 1 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘ 78.3% Free โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 41.6%
  228. Core 2 โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 62.1% Avail 13.3 GB
  229. โ–ค Disk โšก Power
  230. Used โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘ 67.2% Level โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆ 100%
  231. Free 156.3 GB Status Charged
  232. Read โ–ฎโ–ฏโ–ฏโ–ฏโ–ฏ 2.1 MB/s Health Normal ยท 423 cycles
  233. Write โ–ฎโ–ฎโ–ฎโ–ฏโ–ฏ 18.3 MB/s Temp 58ยฐC ยท 1200 RPM
  234. โ‡… Network โ–ถ Processes
  235. Down โ–โ–โ–ˆโ–‚โ–โ–โ–โ–โ–โ–โ–โ–โ–‡โ–†โ–…โ–‚ 0.54 MB/s Zombies 3 ยท Chrome (4242) ร—3
  236. Up โ–„โ–„โ–„โ–ƒโ–ƒโ–ƒโ–„โ–†โ–†โ–‡โ–ˆโ–โ–โ–โ–โ– 0.02 MB/s Code โ–ฎโ–ฎโ–ฎโ–ฎโ–ฏ 42.1%
  237. Proxy HTTP ยท 192.168.1.100 Chrome โ–ฎโ–ฎโ–ฎโ–ฏโ–ฏ 28.3%
  238. ```
  239. The health score combines CPU, memory, disk capacity, SMART status, I/O, thermals, battery state, and uptime, with color-coded ranges. Press `k` to toggle the cat, `c` to cycle the number of CPU cores shown, or `q` to quit; display preferences are saved.
  240. <details>
  241. <summary><strong>JSON, NDJSON, and process alerts</strong></summary>
  242. - `mo analyze --json ~/Documents` returns a one-time disk report as JSON
  243. - `mo status --json` returns a one-time status snapshot as JSON
  244. - `mo status | jq '.health_score'` switches to JSON automatically when output is piped
  245. - `mo status --watch --interval 2s` streams newline-delimited JSON from a warm collector
  246. - `mo history --json` returns cleanup activity as JSON. Sessions include `run_id` (an opaque string, empty when no identity was logged) and `attribution`: `run` for identified runs, `command` for legacy command-based grouping, or `ambiguous` when legacy markers cannot distinguish interruption from overlapping runs. Recorded actions remain available; ambiguous counts cannot be assigned reliably to individual runs. An empty `ended_at` means no end marker was recorded
  247. - `mo uninstall --list` returns installed apps as JSON with `name`, `bundle_id`, `source`, `uninstall_name`, `path` and `size`
  248. ```text
  249. $ mo analyze --json ~/Documents
  250. {
  251. "path": "/Users/you/Documents",
  252. "overview": false,
  253. "entries": [
  254. { "name": "Library", "path": "...", "size": 80939438080, "is_dir": true }
  255. ],
  256. "large_files": [
  257. { "name": "backup.zip", "path": "...", "size": 8796093022 }
  258. ],
  259. "total_size": 168393441280,
  260. "total_files": 42187
  261. }
  262. $ mo status --json
  263. {
  264. "host": "MacBook-Pro",
  265. "health_score": 92,
  266. "cpu": { "usage": 45.2, "logical_cpu": 8 },
  267. "memory": { "total": 34359738368, "used": 20078972109, "used_percent": 58.4 },
  268. "disks": [],
  269. "process_collected_at": "2026-08-29T12:30:00Z",
  270. "process_stale": false,
  271. "zombie_count": 3,
  272. "zombie_parents": [
  273. { "pid": 4242, "name": "Google Chrome for Testing", "count": 3 }
  274. ],
  275. "zombie_parents_complete": true,
  276. "uptime": "3d 12h 45m"
  277. }
  278. ```
  279. Zombie diagnostics are read-only and do not affect the health score or terminate processes. Before
  280. Mole has a successful process sample, `process_collected_at`, `process_stale`, `zombie_count`, and
  281. `zombie_parents_complete` are omitted and `zombie_parents` is `null`. Later fast/watch snapshots
  282. reuse the latest successful sample with its original `process_collected_at` and set
  283. `process_stale: true`; a live process sample sets it to `false`. A count of `0` means Mole measured
  284. no zombies. Parent summaries contain at most three known owners;
  285. `zombie_parents_complete: false` means attribution was unavailable, incomplete, or truncated.
  286. If one collector fails, `mo status --json` still prints the metrics that were collected, reports the
  287. failure on stderr, and exits successfully, the same way `--watch` keeps streaming. It exits 1
  288. when none of CPU, memory, disk, or process metrics are available, or when JSON output fails.
  289. Status also supports read-only alerts for processes that stay above a CPU threshold. Use `--proc-cpu-threshold`, `--proc-cpu-window`, or `--proc-cpu-alerts=false` to tune or disable them.
  290. </details>
  291. ### Purge
  292. `mo purge` finds rebuildable project artifacts such as `node_modules`, `target`, `.build`, `build`, and `dist`. It groups artifacts by project and permanently deletes only the items you confirm. Artifacts with file activity in the last 7 days, or activity Mole cannot verify, are unselected by default. Mole uses `fd` when available and falls back to `find`, and protects directories containing deployment keypair files, nested Git repositories, or Git-tracked files. Non-interactive runs require `mo purge --yes`; use `mo purge --dry-run` to review the candidates first.
  293. Use Page Up/Down or `h`/`l` to move a page, `[`/`]` to jump between projects, and `X` to skip a project and advance. `/` searches project paths and artifact names, `n` finds the next match without changing selections, and Enter opens the final path review. Reported space is an estimate; unmeasured artifacts and incomplete scans are identified explicitly.
  294. <details>
  295. <summary><strong>Purge example output</strong></summary>
  296. ```text
  297. $ mo purge
  298. Purge Project Artifacts
  299. Select Artifacts to Purge
  300. 6.00GB, 2 selected
  301. โžค โ— โ”Œ ~/Projects/website 3.80GB | node_modules | 28d
  302. โ—‹ โ”” ~/Projects/website 186MB | dist | <1d
  303. โ— โ”Œ ~/Projects/rust-app 2.20GB | target | 2mo
  304. โ—‹ โ”” ~/Projects/rust-app 22MB | dist | <7d
  305. ======================================================================
  306. Purge complete
  307. Estimated space freed: 6.00GB | Items: 2 | Free: 223.5GB
  308. ======================================================================
  309. ```
  310. </details>
  311. <details>
  312. <summary><strong>Custom Scan Paths</strong></summary>
  313. Run `mo purge --paths` to configure scan directories, or edit `~/.config/mole/purge_paths` directly:
  314. ```shell
  315. ~/Documents/MyProjects
  316. ~/Work/ClientA
  317. ~/Work/ClientB
  318. ```
  319. When custom paths are configured, Mole scans only those directories. Otherwise, it uses defaults like `~/Projects`, `~/GitHub`, `~/dev`, and supported agent worktree containers. Discovery does not save an incomplete result. Artifact scans reach six levels below each configured root; add a nearer root for deeper projects. Purge removes rebuildable artifacts inside worktrees, never the worktrees themselves.
  320. </details>
  321. ### Installer
  322. `mo installer` finds DMG, PKG, MPKG, ISO, XIP, and installer ZIP files in Downloads, Desktop, Homebrew caches, iCloud, Mail, Telegram, and other supported locations, and shows each item's size and source before removal. Discovery has a cumulative time limit: if a scan or metadata probe fails or times out, Mole discards the list and exits without selecting files. Corrupt and unreadable ZIP archives are skipped, symlinked scan roots are supported but symlinks beneath them are not followed, and selected files are checked again against their confirmed identity at the deletion boundary.
  323. <details>
  324. <summary><strong>Installer example output</strong></summary>
  325. ```text
  326. $ mo installer
  327. Select Installers to Remove, 3.83GB, 5 selected
  328. โžค โ— Photoshop_2024.dmg 1.20GB | Downloads
  329. โ— IntelliJ_IDEA.dmg 850.6MB | Downloads
  330. โ— Illustrator_Setup.pkg 920.4MB | Downloads
  331. โ— PyCharm_Pro.dmg 640.5MB | Homebrew
  332. โ— Acrobat_Reader.dmg 220.4MB | Downloads
  333. โ—‹ AppCode_Legacy.zip 410.6MB | Downloads
  334. ======================================================================
  335. Installers cleaned
  336. Removed 5 installers, freed 3.83GB
  337. ======================================================================
  338. ```
  339. </details>
  340. ### Slim
  341. `mo slim` removes the Intel code that universal apps carry on Apple Silicon Macs. It lists the apps you own that are signed with a Developer ID, with the size of each app's Intel code, and changes only the apps you select. Each app is slimmed on a copy, touching only main executables and nested code that carries its own signature; the copy replaces the app only after it keeps its Apple Silicon code and passes code signing and Gatekeeper checks, and the original moves to the Trash. App Store apps, Apple apps, apps set to open using Rosetta, apps owned by another user, and running apps are left alone. It needs no developer tools, and an app update brings the Intel code back.
  342. ## Quick Launchers
  343. <details>
  344. <summary><strong>Raycast and Alfred setup</strong></summary>
  345. Install five launchers for Clean, Uninstall, Optimize, Analyze, and Status:
  346. ```bash
  347. curl -fsSL https://raw.githubusercontent.com/tw93/Mole/main/scripts/setup-quick-launchers.sh | bash
  348. ```
  349. The script adds Raycast commands and, when Alfred preferences are present, matching Alfred workflows with the keywords `clean`, `uninstall`, `optimize`, `analyze`, and `status`.
  350. Raycast needs one manual setup:
  351. 1. Open **Raycast Settings > Extensions > Script Commands**.
  352. 2. Add `~/Library/Application Support/Raycast/script-commands` as a script directory.
  353. 3. Run **Reload Script Directories** in Raycast.
  354. The launchers auto-detect Terminal, iTerm2, Alacritty, kitty, WezTerm, Ghostty, Hyper, WindTerm, and Warp. Set `MO_LAUNCHER_APP=<name>` to choose one; you can also run Mole directly in [Kaku](https://github.com/tw93/Kaku).
  355. </details>
  356. ## Community
  357. Thanks to everyone who helped build Mole. Go follow them. โค๏ธ
  358. <a href="https://github.com/tw93/Mole/graphs/contributors">
  359. <img src="./CONTRIBUTORS.svg?v=2" alt="Mole contributors" width="1000" />
  360. </a>
  361. <br/><br/>
  362. Real feedback from users who shared Mole on ๐•.
  363. <img src="./docs/img/mole-love.png" alt="Community feedback on Mole" width="1000" />
  364. Watch the [Mole tutorial video](https://www.youtube.com/watch?v=UEe9-w4CcQ0) by PAPAYA ้›ป่…ฆๆ•™ๅฎค.
  365. ## Support
  366. - Getting [Mole for Mac](https://mole.fit) is the most direct way to support Mole's development
  367. - If Mole helped you, give it a star, [share it](https://x.com/intent/tweet?url=https://github.com/tw93/Mole&text=Mole%20-%20Deep%20clean%20and%20optimize%20your%20Mac.), or open an issue or PR
  368. - I have two cats, TangYuan and Coke, and if Mole makes your life a little easier, feel free to treat them to <a href="https://cats.tw93.fun?name=Mole" target="_blank">canned food ๐Ÿฅฉ</a>
  369. These lovely people already did ๐Ÿฑ
  370. <a href="https://cats.tw93.fun?name=Mole"><img src="https://raw.githubusercontent.com/tw93/sponsors/main/assets/sponsors.svg" alt="Mole supporters" width="1000" loading="lazy" /></a>
  371. ## License
  372. Mole is open source under GPL-3.0; see [LICENSE](LICENSE). Any modified version you share must remain under the same license. If you fork Mole, please use a distinct name and credit Mole as the upstream source. [Mole for Mac](https://mole.fit) is a separate proprietary app, and Mole is here for the long run.

Ratings and comments

Sign in to rate this skill.

Sign in

Free to use. If itโ€™s helped, pass it on.