Skip to content

Releases: tw93/Mole

V1.18.0 Robustness 🍘

02 Jan 12:03

Choose a tag to compare

Mole Logo

Mole V1.18.0

Deep clean and optimize your Mac.

Changelog

  1. Shell Completion: Add tab completion for bash, zsh, and fish. Run mo completion to auto-install.
  2. Zig & Browser Cleanup: Clean Zig build artifacts (.zig-cache, zig-out) and outdated Chrome/Edge versions.
  3. Smart Vendor Protection: Automatically detect and skip Rails vendor directories during purge.
  4. Installation Improvements: Enhanced install.sh with better error handling, version/edge install support, and --update flow.
  5. Testing & Quality: Added 2000+ lines of new tests covering completion, browser cleanup, purge protection, app cache cleaning.
  6. Bug Fixes: Fixed pnpm Corepack hang, fixed mo purge fd pattern matching, improved macOS compatibility docs.

更新日志

  1. Shell 补全支持:支持 bash/zsh/fish 自动补全,运行 mo completion 即可安装。
  2. Zig & 浏览器清理:清理 Zig 构建产物(.zig-cachezig-out)及旧版 Chrome/Edge。
  3. 智能 Vendor 保护:purge 时自动检测并跳过 Rails vendor 目录,防止误删依赖。
  4. 安装流程增强install.sh 增强健壮性,支持指定版本/edge 安装及 --update 更新。
  5. 测试与质量:新增 2000+ 行测试,覆盖补全、浏览器清理、purge 保护、缓存清理等场景。
  6. Bug 修复:修复 pnpm Corepack 卡住问题、修复 mo purge fd 匹配问题、改进 macOS 兼容性文档。

Thanks to @jjmartres, @JackPhallen, @LmanTW, and @thijsvanhal for their contributions! If you find Mole useful, a ⭐ Star is always appreciated.

https://github.com/tw93/Mole

V1.17.0 Better 🧤

30 Dec 10:21

Choose a tag to compare

Mole Logo

Mole V1.17.0

Deep clean and optimize your Mac.

Changelog

  1. Homebrew Core Release Flow: Releases now auto-submit official formula updates, and users can upgrade easily with brew install mole.
  2. Cloud Storage Protection: Automatically safeguards iCloud Drive, Dropbox, and other cloud directories from accidental cleanup.
  3. Preview Mode for Optimize: mo optimize --dry-run adds a safe preview mode before applying changes.
  4. Smarter Purge Experience: mo purge now includes pagination and intelligent project detection for large lists.
  5. Clean Performance Boost: mo clean is significantly faster via pre-expanded whitelist patterns, stat for regular files, and adaptive serial/parallel processing to reduce subshell overhead.
  6. Stability & Quality: Fixed size calculation (Issue #203), fixed 0KB/du failure cleanup skips, improved network detection/CI stability, and added MOLE_TEST_MODE for faster tests.

更新日志

  1. Homebrew Core 发布流程:发布时自动提交官方 Formula,用户可通过 brew install mole 便捷更新。
  2. 云存储保护:自动保护 iCloud Drive、Dropbox 等云目录,避免误清理。
  3. 优化预览模式:mo optimize --dry-run 支持预览,不直接执行优化。
  4. 清理体验改进:mo purge 添加分页与智能项目检测,大列表浏览更顺畅。
  5. 清理性能大幅提升:预展开白名单、普通文件改用 stat、根据文件规模智能切换串并行,显著降低小文件 subshell 开销。
  6. 稳定性与质量:修复 size 计算语法错误(Issue #203)、修复 0KB/du 失败可能跳过清理的问题,改进网络检测与 CI 稳定性,并加入 MOLE_TEST_MODE 提升测试速度。

Thanks to everyone who provided feedback and reported bugs. Your input makes Mole better. If you
find Mole useful, a Star is always appreciated.

https://github.com/tw93/Mole

V1.16.1 Safer 🪐

29 Dec 12:59

Choose a tag to compare

Mole Logo

Mole V1.16

Deep clean and optimize your Mac.

Changelog

  1. Security & Distribution Re-Architecture: Major security overhaul removing all pre-compiled binaries from the git repository to eliminate opaque blob risks. Binaries are now built transparently via GitHub Actions and V-prefixed releases, strictly adhering to Vigilant Mode principles.
  2. Smart Installer & Auto-Update: Completely rewritten install.sh and mo update logic with intelligent architecture detection (Apple Silicon/Intel). It now fetches verified artifacts from GitHub Releases while maintaining a seamless fail-safe mechanism for offline or dev environments (auto-fallback to local source compilation).
  3. Intelligent Project Purge: mo purge now features auto-discovery for scanning project directories (Node.js, Rust, Xcode, etc.) across your system, plus a new --paths flag for custom scan targets. Added support for cleaning .dart_tool (Flutter/Dart) artifacts.
  4. Enhanced System Hygiene: New orphaned startup item cleanup detects and removes LaunchAgents/Daemons left behind by uninstalled apps using bundle identifier matching.
  5. Stability & Fixes: Fixed macOS update check timeouts, refined Homebrew formula update automation, and resolved bash syntax issues with variable handling. Removed the redundant --force-rescan flag (now handled natively via 'R' key in UI).
  6. Documentation & User Experience: Updated SECURITY_AUDIT.md to reflect the new secure supply chain model. Improved spinner feedback for clearer long-running operations.

更新日志

  1. 安全性与分发架构重构:彻底移除了 Git 仓库中所有预编译二进制文件,消除了不透明文件的安全隐患。所有二进制文件现通过 GitHub Actions 透明构建并发布,严格遵循 Vigilant Mode 安全准则。
  2. 智能安装与自动更新:全新重写的 install.sh 和 mo update 逻辑,支持智能识别系统架构(Apple Silicon/Intel),自动从 GitHub Releases 拉取验证过的产物,同时具备离线或开发环境下的自动源码编译回退机制。
  3. 智能化项目清理mo purge 新增 自动探测 功能,可全盘扫描各类项目目录(Node.js, Rust, Xcode 等),并支持通过 --paths 参数指定自定义扫描路径;新增对 .dart_tool (Flutter/Dart) 的清理支持。
  4. 系统卫生增强:引入 残留启动项 清理功能,通过 Bundle ID 匹配智能识别并安全移除已卸载应用遗留的 LaunchAgents/Daemons。
  5. 稳定性与修复:修复了 macOS 系统更新检测超时问题,优化了 Homebrew Formula 的自动更新流程,解决了 Bash 变量处理相关的语法隐患;移除了冗余的 --force-rescan 参数(交互界面已支持 'R' 键刷新)。
  6. 文档与体验:同步更新 SECURITY_AUDIT.md 以反映全新的供应链安全模型;优化了耗时操作的 Spinner 状态反馈,视觉体验更佳。

Thanks to everyone who provided feedback and reported bugs. Your input makes Mole better. If you find Mole useful, a Star is always appreciated.

https://github.com/tw93/Mole

V1.15 Ultraman 🥷🏻

28 Dec 02:09

Choose a tag to compare

Mole Logo

Mole V1.15

Deep clean and optimize your Mac.

Changelog

  1. Performance breakthroughs across core paths: Homebrew detection optimized with fast-path symlink checks and Cellar pre-validation, delivering up to 10× faster startup in common setups. Application scanning now uses intelligent metadata caching with automatic invalidation, dramatically speeding up repeated analyze/cleanup runs.
  2. Smarter volume scanning: Added protocol-based detection to safely skip network volumes (SMB/NFS/AFP/WebDAV), combined with 1-second timeout protection to avoid slow hangs. External volume scans now run with significantly lower overhead.
  3. Hardened file safety & system stability: Restricted chown operations strictly to the user's home directory with multiple validation gates. Improved Darwin version detection with conservative fallbacks, and disabled risky LaunchServices rebuilds on macOS Sonoma/Sequoia to prevent System Settings corruption. Updated firewall management to use socketfilterfw command for improved reliability on modern macOS.
  4. Expanded cleanup & platform support: Introduced dedicated pnpm cache cleaning, streamlined cache path handling, added configurable depth control for project artifact cleanup, and included Legcord (Discord client) in the protected applications list. Added Trash whitelist protection for ~/.Trash and external volume Trash directories.
  5. Polished terminal UX: Added ANSI capability checks for safe line clearing, eliminated spinner conflicts during sudo/Touch ID prompts, unified check icons and output structure, and improved visual hierarchy for clearer, more stable terminal interactions with section-level progress spinners.
  6. Codebase simplification & reliability: Extracted centralized is_path_whitelisted() helper function, eliminating 47 lines of duplicate code across 3 files. Removed 301 lines of redundant logic from optimization tasks, consolidated spinner and logging helpers, strengthened shell array handling, and standardized BSD stat usage to avoid conflicts with GNU coreutils.
  7. Major test suite expansion: Added 540+ new tests covering performance benchmarks, permission-safety validation, user file handling edge cases, uninstall robustness, and firewall management, ensuring consistent behavior across diverse macOS environments.
  8. Documentation & internal updates: Updated SECURITY_AUDIT.md with the latest protection model, documented Trash whitelist mechanisms, rebuilt Go binaries (analyze-go, status-go) with recent improvements.

更新日志

  1. 核心性能显著提升:针对 Homebrew 安装场景引入快速路径检测与 Cellar 预校验,常见情况下启动速度提升 10 倍以上;应用扫描新增元数据缓存与自动失效机制,大幅加快 analyze / cleanup 的重复执行速度。
  2. 更智能的磁盘卷处理:通过协议识别自动跳过 SMB / NFS / AFP / WebDAV 等网络卷,并加入 1 秒超时保护,避免网络阻塞;外置磁盘扫描开销明显降低。
  3. 文件权限与系统稳定性全面加固chown 操作严格限制在用户主目录内,增加多重校验防止误伤系统文件;改进 Darwin 版本识别策略;在 macOS Sonoma / Sequoia 上禁用高风险 LaunchServices 重建,防止系统设置异常;升级防火墙管理方式,使用 socketfilterfw 命令提高现代 macOS 系统上的可靠性。
  4. 清理能力与生态支持增强:新增 pnpm 缓存清理;项目构建产物清理支持可配置深度;将 Legcord(第三方 Discord 客户端)加入受保护应用列表;新增 回收站白名单保护,支持 ~/.Trash 及外置卷回收站目录。
  5. 终端交互体验打磨:增加 ANSI 能力检测,避免清屏异常;修复 sudo / Touch ID 场景下的视觉闪烁;统一状态图标与输出结构;添加分段级进度 spinner,整体显示更稳定、更清晰。
  6. 代码质量与可维护性提升:提取统一的 is_path_whitelisted() 辅助函数,消除 47 行重复代码;精简优化任务模块 301 行冗余逻辑;统一 spinner 与日志处理;增强 shell 数组与 glob 边界处理;强制使用 BSD stat,避免与 GNU coreutils 冲突。
  7. 测试体系大幅扩展:新增 540+ 项测试,涵盖性能基准、权限安全校验、用户文件处理边界情况、卸载流程健壮性、防火墙管理等,覆盖更多真实 macOS 使用场景。
  8. 文档与内部更新SECURITY_AUDIT.md 同步最新防护策略;补充回收站白名单机制说明;重建 Go 二进制(analyze-gostatus-go)。

Thanks to everyone who provided feedback and reported bugs. Your input makes Mole better. If you find Mole useful, a Star is always appreciated.

https://github.com/tw93/Mole

V1.14.5 Merry Christmas🎄

22 Dec 09:20

Choose a tag to compare

Mole Logo

Mole V1.14

Dig deep like a mole to clean your Mac.

Changelog

  1. New purge mode for developers: Interactive scanning and cleanup of heavy build artifacts (e.g. node_modules, Maven/Gradle outputs), designed to reclaim large amounts of disk space. Introduced PURGE_SEARCH_PATHS for flexible configuration of project root directories.
  2. Major analyze upgrade: Added multi-select batch deletion, improved size calculation accuracy (fixed exclude-directory logic), enforced depth-first delete ordering to prevent errors, and provided a clearer separation between Home and Library disk usage.
  3. Enhanced system safeguards: Centralized critical-component whitelist to protect System Settings, Control Center, Spotlight, and login items. Disabled risky LaunchServices rebuild operations, while continuing to support user-defined custom whitelists.
  4. UI & performance improvements: Layout now adapts to terminal width; fixed alignment issues with emoji, special characters, and CJK text; optimized mdls timeout handling for faster scan and uninstall flows; refreshed mo status icons and styles.
  5. Tests & audit updates: Added automated coverage for Library exclusion rules, parent–child deletion ordering, and critical component detection. Updated SECURITY_AUDIT.md to v1.14.0 to reflect current protection strategies.

更新日志

  1. 新增 purge 项目清理模式:面向开发者,支持交互式扫描并清理 node_modules、Maven / Gradle 构建产物等重载目录,显著释放磁盘空间;新增 PURGE_SEARCH_PATHS,用于灵活配置项目根路径。
  2. analyze 模块重大升级:支持多选批量删除,优化体积统计准确性(修复排除目录逻辑问题),删除流程按深度优先排序以避免报错,并更清晰地区分 Home 与 Library 的空间占用。
  3. 系统级安全防护增强:集中式关键组件白名单,重点保护 macOS 系统设置、控制中心、Spotlight 与启动项;禁用高风险的 LaunchServices 重建操作,同时保留用户自定义白名单能力。
  4. UI 与性能优化:布局可随终端宽度自适应;修复 Emoji / 特殊符号 / 中日韩字符对齐问题;优化 mdls 超时策略,提升扫描与卸载性能;更新 mo status 图标与样式。
  5. 测试与审计更新:新增针对 Library 排除规则、父子目录删除顺序、关键组件识别的自动化测试;SECURITY_AUDIT.md 更新至 v1.14.0,完整反映当前防护策略。

Thanks to everyone who provided feedback and reported bugs. Your input makes Mole better. If you find Mole useful, a Star is always appreciated.

https://github.com/tw93/Mole

V1.13 Merry Christmas 🎄

14 Dec 12:22

Choose a tag to compare

Mole Logo

Mole V1.13

Dig deep like a mole to clean your Mac.

Changelog

  1. Turbocharged Core & UX: Re-architected with parallel Go processing for near-instant metrics. Added 'F' key support for instant UI refreshes, significantly smoothing the uninstallation workflow.
  2. Safety Hardening 2.0: Updated SECURITY_AUDIT.md details our "Iron Dome" protection, now covering AI models (Claude, Ollama), network tools, and login items. We explicitly removed risky setting resets to guarantee stability.
  3. Deep & Smart Cleaning: Now targets local APFS snapshots and Spotlight user caches to reclaim hidden space, while intelligently scrubbing ephemeral build artifacts like .next and __pycache__.
  4. Developer-First Logic: Enhanced recognition for IDEs (JetBrains, VSCode) preserves workspaces. Added AGENT.md to standardize AI-assisted development protocols.
  5. Robust Modular Architecture: Complete codebase modularization improves stability, with strictly handled TCC permissions and safer root operations.

🎉 A little 🎄 Christmas surprise awaits you in the terminal!


Thanks to everyone who provided feedback and reported bugs. Your input makes Mole better. If you find Mole useful, a Star is always appreciated.

https://github.com/tw93/Mole

V1.12 Inner Core 🎄

08 Dec 11:28

Choose a tag to compare

Mole Logo

Mole V1.12

Dig deep like a mole to clean your Mac.

Changelog

  1. Smarter Cleanup: mole clean now includes new rules for AI models, Docker, and browser caches. The --dry-run option allows you to export and review the full file list before deletion, ensuring you know exactly what will be removed, --debug supports more detailed content output for better troubleshooting.
  2. Uninstall UX: Added a 24-hour cache for app scanning results, so you don't have to wait for a full scan every time. The interface now supports real-time filtering to quickly locate and select apps for removal, optimize the uninstalled and more complete content of dozens of IDE editors.
  3. Enhanced Safety & Whitelisting: Default protection added for network tools (Surge, Clash, Mihomo). mole optimize now supports a --whitelist argument, allowing you to select and skip specific checks (e.g., Firewall/Gatekeeper).
  4. Visuals & Monitoring: mole status now identifies CPU/GPU core counts and adds real-time metrics for Battery, Load, and Network. mole analyze is smoother with async pre-fetching and a history stack for navigation.
  5. Core Architecture: Massive refactor of common.sh into modular libraries. Introduced a unified Sudo manager (Touch ID/KeepAlive), safer file operations, and added 130+ automated tests for stability.

更新日志

  1. 清理能力升级mole clean 新增对 AI 模型、Docker 及浏览器缓存的清理规则,--dry-run 模式现在支持导出详细清单供审查,让你在执行前对清理内容更加了解,--debug 支持更详细的内容输出,用于更好排查问题。
  2. 卸载体验优化:引入 24 小时扫描缓存机制,二次进入无需等待,列表支持实时关键词过滤,帮助你快速定位并选择需要卸载的应用,优化数十种 IDE 编辑器的卸载更全的内容。
  3. 安全与白名单:增强应用保护,默认排除 Surge、Clash、Mihomo 等网络工具,mole optimize 新增 --whitelist 参数,支持选择跳过防火墙或 Gatekeeper 等特定检查。
  4. 可视化与监控mole status 支持识别 CPU/GPU 核心数量,并新增电池健康、系统负载及网络吞吐的实时监控,mole analyze 支持异步预加载和历史记录栈,大文件浏览更顺滑。
  5. 核心代码重构:将核心库拆分为模块化组件;引入统一的 Sudo 管理器(支持 Touch ID 和后台保活),所有文件操作接入安全 API,新增 130+ 自动化测试用例确保稳定性。

Thanks to everyone who provided feedback and reported bugs. Your input makes Mole better. If you find Mole useful, a Star is always appreciated.

https://github.com/tw93/Mole

V1.11 Better 👩‍🎨

29 Nov 14:36

Choose a tag to compare

Mole Logo

Mole V1.11

Dig deep like a mole to clean your Mac.

Changelog

  1. Cleanup runs much faster now with optimized scanning, and protects more dev tools like renv, JetBrains IDEs, and OpenVPN configs from accidental deletion.
  2. Vim users rejoice: all menus now support h/j/k/l navigation, plus analyze view has refresh, and menus auto-fit your terminal height.
  3. Optimize command preserves Finder cache so your window positions and sidebar settings stay intact.
  4. Password input is more reliable, fixing lid-close wake issues, Intel CPU errors, and iTerm2 exit quirks.
  5. Under the hood: 1000+ line cleanup script split into 7 modules, added health checks and security scans, plus 400+ new test cases for stability.

更新日志

  1. 清理速度快了不少,扫描算法优化过了。保护规则也更全,renv、JetBrains 全家桶、OpenVPN 配置这些不会被误删。
  2. Vim 党福音:所有菜单都能用 h/j/k/l 导航了,analyze 支持刷新,列表高度自动适配终端窗口。
  3. Optimize 命令不再删 Finder 缓存,你的窗口位置、侧边栏设置这些都会保留。
  4. 密码输入更靠谱了,修了合盖唤醒输不了密码、Intel CPU 报错、iTerm2 卡退出这些问题。
  5. 代码层面:1000+ 行的清理脚本拆成了 7 个模块,加了健康检查和安全扫描,新写了 400+ 条测试用例提升稳定性。

Thanks to everyone who provided feedback and reported bugs. Your input makes Mole better. If you find Mole useful, a Star is always appreciated.

https://github.com/tw93/Mole

V1.10 Even Cooler 🐂

21 Nov 10:06

Choose a tag to compare

Mole Logo

Mole V1.10

Dig deep like a mole to clean your Mac.

Changelog

  1. System Status Dashboard is now built in. Run mo status to try it out.
  2. The Go analyzer has been split into cache / scan / format modules, with the analyzer/status binaries and related scripts kept on a regular update cycle.
  3. Analysis, cleaning, optimization, and uninstall flows have been polished end to end: scan warm-up, cleaning tips, large-file view, window layout, and menu interactions are all tuned for better performance and a smoother experience.
  4. Stability and compatibility are further strengthened by fixing Wi-Fi anomalies, whitelist matching, space-containing password auth, Clash protection, and more, plus improved error handling and 43 new test cases to raise coverage.
  5. Automation and workflows have been upgraded so build artifacts, binary refreshes, and CI checks are routinely maintained, keeping the whole development-to-release pipeline consistent and traceable.

更新日志

  1. System Status Dashboard 正式接入,建议直接运行 mo status 看一眼。
  2. Go 分析器拆分为缓存 / 扫描 / 格式化三个模块,并对 analyzer/status 二进制及其配套脚本做规律性的更新维护。
  3. 从磁盘分析、清理、优化到卸载,整条链路都做了一轮打磨:包括扫描预热、清理提示、大文件列表、窗口布局和菜单交互等细节优化,在性能和使用顺手度上都有明显提升。
  4. 稳定性和兼容性继续加固:修复了 Wi-Fi 异常、白名单匹配、含空格密码认证、Clash 防护等问题,同时增强错误处理逻辑,并补充了 43 条测试用例以提升验证覆盖度。
  5. 自动化流程和工作流进一步完善:常态化提交构建产物、更新二进制以及强化 CI 检查,让从研发到投放的整条链路更加一致、可控且可追溯。

Learn how to use it through this main document. If you find Mole useful, a Star is always appreciated.

https://github.com/tw93/Mole

V1.9 Stronger 🏋️‍♀️

15 Nov 06:19

Choose a tag to compare

Mole Logo

Mole V1.9

Dig deep like a mole to clean your Mac.

Changelog

  1. Added the new mo optimize command with full system tuning (cache refresh, network reset, log cleanup, Spotlight rebuild).
  2. Rewrote the entire disk analysis module in Go with faster concurrent scanning and smart caching.
  3. Improved large-directory handling by auto-collapsing node_modules and optimizing large-file detection.
  4. Strengthened path-safety checks to prevent accidental system deletion and expanded protected directories.
  5. Enhanced whitelist validation to block malformed paths, spaces, and injection attempts like double slashes.
  6. Added post-Base64 decoding validation to prevent null-byte and illegal-path injection risks.
  7. Optimized logging and caching systems to reduce I/O and improve overall performance.
  8. Improved sudo keep-alive stability and refined DS_Store cleanup, need to disable the whitelist.
  9. Overhauled keyboard and UI interactions with simpler inputs, better prompts, and unified Q to exit.
  10. Upgraded code quality with ShellCheck, new unit tests, optimized scripts, many places have been presented in a completely new way.
  11. Fixed the timeout issue during Brew cleanup, optimized the installation experience of Raycast to support 4 commands.

更新日志

  1. 新增 mo optimize 一键系统优化命令,涵盖缓存刷新、网络重置、日志清理、Spotlight 重建等全套操作。
  2. 使用 Go 语言重写磁盘分析模块,支持并发扫描并引入智能缓存,大幅提升分析速度。
  3. 优化大型目录处理,自动折叠 node_modules,并改进大文件检测与展示逻辑。
  4. 加强路径安全校验,防止误删系统文件,并扩大关键系统目录的保护范围。
  5. 升级白名单校验机制,严格拒绝异常路径、空格路径和 // 注入风险。
  6. Base64 解码后新增完整性与非法字符校验,避免批量卸载中的路径注入问题。
  7. 优化日志与缓存系统,减少 I/O 消耗并提升整体性能。
  8. 改进 sudo 保活稳定性,并增强 DS_Store 清理逻辑,需关闭白名单。
  9. 全面优化键盘与界面交互,输入更简洁、提示更清晰,统一使用 Q 退出。
  10. 提升代码质量:加入 ShellCheck、完善单测、优化脚本,很多地方的展示焕然一新。
  11. 修复Brew清理时候的超时问题,Raycast 安装体验优化支持4个命令。

Learn how to use it through this main document. If you think mole is useful to you, welcome to Star

https://github.com/tw93/Mole