DEV Community

Denis
Denis

Posted on

I Made a Free Alternative to CleanMyMac in 200 Lines of Python

Example of interface

TL;DR

I got tired of "disk full" warnings and $90 cleaning apps, so I built MacCleanCLI - a free, open-source terminal tool that safely cleans your Mac.

The Problem 😀

My 256GB MacBook: "Your disk is almost full"

Me: Checks CleanMyMac price... $89.95

Also me: "I can build this"

The Solution πŸŽ‰

# Install
brew in future

git clone https://github.com/qdenka/MacCleanCLI.git
cd MacCleanCLI
pip install -e .
python main.py

# Run
mclean
Enter fullscreen mode Exit fullscreen mode

What It Cleans 🧹

  • System & browser caches
  • Temp files & old logs
  • Downloads folder cruft
  • Duplicate files
  • App leftovers
  • Much more!

Key Features ✨

# Safe by design
PROTECTED_PATHS = ['/System', '/Library/Extensions', '/usr']

# Beautiful UI with Rich
from rich.console import Console
from rich.progress import Progress

# Multi-threaded for speed
with ThreadPoolExecutor(max_workers=4) as executor:
    # Scan all the things!
Enter fullscreen mode Exit fullscreen mode

Results πŸ“Š

  • Before: 12GB free space 😱
  • After: 47GB free space πŸŽ‰
  • Time: 2 minutes
  • Cost: $0

Why It's Different 🌟

Feature MacCleanCLI CleanMyMac
Price Free $89.95
Open Source βœ… ❌
Privacy 100% Local Cloud Features
Terminal-Native βœ… ❌
Customizable βœ… Limited

Try It Now! πŸš€

# See it in action
git clone https://github.com/QDenka/MacCleanCLI
cd MacCleanCLI
python main.py --scan-only
Enter fullscreen mode Exit fullscreen mode

Like it? Star it on GitHub ⭐

Questions? Open an issue!

Want to help? PRs welcome!


What tools have you built to solve your own problems? Share in the comments! πŸ‘‡

Top comments (1)

Collapse
 
jamey_86 profile image
Jamey

Nice posting! Can we have a conversation asap?

Some comments may only be visible to logged-in visitors. Sign in to view all comments.