[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-83038":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":16,"stars7d":17,"stars30d":18,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":20,"archived":21,"fork":21,"defaultBranch":22,"hasWiki":23,"hasPages":21,"topics":24,"createdAt":10,"pushedAt":10,"updatedAt":45,"readmeContent":46,"aiSummary":47,"trendingCount":16,"starSnapshotCount":16,"syncStatus":48,"lastSyncTime":49,"discoverSource":50},83038,"MacClean","iliyami\u002FMacClean","iliyami","The open-source Mac cleaner, optimizer, and malware scanner. A free alternative to CleanMyMac — built with Swift 6 and SwiftUI.","https:\u002F\u002Fgithub.com\u002Filiyami\u002FMacClean",null,"Swift",206,9,1,12,0,68,91,3,"BSD 3-Clause \"New\" or \"Revised\" License",false,"main",true,[25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44],"appkit","cleanmymac","cleanmymac-alternative","darwin","disk-cleaner","duplicate-finder","homebrew-cask","mac-cleaner","mac-utility","macos","macos-app","malware-scanner","no-subscription","open-source","privacy","swift","swift6","swiftui","system-cleaner","uninstaller","2026-06-12 02:04:30","\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fapp_icon.png\" width=\"150\" alt=\"Mac Clean Icon\" \u002F>\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">Mac Clean\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>The open-source Mac cleaner, optimizer, and malware scanner.\u003C\u002Fstrong>\u003Cbr>\n  A feature-complete, free alternative to CleanMyMac — built with Swift 6 and SwiftUI.\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fplatform-macOS%2014%2B-blue?style=flat-square\" alt=\"macOS 14+\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fswift-6.0-orange?style=flat-square\" alt=\"Swift 6\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Ftests-403%20passing-brightgreen?style=flat-square\" alt=\"Tests\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Flicense-BSD--3--Clause-green?style=flat-square\" alt=\"License\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fsecurity-audited-purple?style=flat-square\" alt=\"Security\" \u002F>\n  \u003Cimg src=\"https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPRs-welcome-ff69b4?style=flat-square\" alt=\"PRs Welcome\" \u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fdemo.png\" width=\"700\" alt=\"Mac Clean Screenshot\" \u002F>\n\u003C\u002Fp>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>Install in one command:\u003C\u002Fstrong>\n\u003C\u002Fp>\n\n```bash\nbrew tap iliyami\u002Fmacclean && brew install --cask mac-clean\n```\n\n\u003Cp align=\"center\">\n  Or grab the \u003Ca href=\"https:\u002F\u002Fgithub.com\u002Filiyami\u002FMacClean\u002Freleases\u002Flatest\">latest DMG\u003C\u002Fa> from Releases.\n\u003C\u002Fp>\n\n---\n\n## What is Mac Clean?\n\nMac Clean is a **free, open-source** macOS app that cleans junk files, removes malware, optimizes performance, uninstalls apps completely, and visualizes disk usage — all from a single, beautiful interface. It replicates every major feature of CleanMyMac while being fully transparent and community-driven.\n\n**No subscriptions. No telemetry. No ads. Just a clean Mac.**\n\n## How Mac Clean compares\n\n|  | Mac Clean | CleanMyMac | Pearcleaner | PureMac | OnyX | Mole |\n|---|:---:|:---:|:---:|:---:|:---:|:---:|\n| **Price** | Free | $39.95\u002Fyr | Free | Free | Free | Free (CLI) |\n| **Open source** | ✅ BSD-3 | ❌ | ✅ Fair-code | ✅ MIT | ❌ | ✅ MIT |\n| **Telemetry** | ❌ None | ⚠️ Yes | ❌ None | ❌ None | ❌ None | ❌ None |\n| **Native GUI app** | ✅ | ✅ | ✅ | ✅ | ✅ | ❌ CLI (paid GUI separate) |\n| **Smart Scan (one-click)** | ✅ | ✅ | ❌ | ➖ Partial | ❌ | ➖ Interactive CLI |\n| **System Junk (16 categories)** | ✅ | ✅ | ➖ | ✅ | ➖ Limited | ✅ |\n| **Universal Binary thinning** | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |\n| **Malware scanner** | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |\n| **Browser privacy cleaner** | ✅ | ✅ | ❌ | ❌ | ➖ | ❌ |\n| **Uninstaller with leftover detection** | ✅ 10-level | ✅ | ✅ Focus | ❌ | ❌ | ✅ |\n| **Disk treemap visualizer** | ✅ | ❌ | ❌ | ❌ | ❌ | ➖ Analyzer |\n| **Duplicate finder** | ✅ | ✅ | ❌ | ❌ | ❌ | ❌ |\n| **Menu bar system monitor** | ✅ | ✅ Menu | ❌ | ❌ | ❌ | ❌ |\n| **Maintenance scripts** | ✅ | ✅ | ❌ | ❌ | ✅ Strong | ➖ |\n| **In-app activity log viewer** | ✅ | ❌ | ❌ | ❌ | ❌ | N\u002FA CLI |\n| **Notarized by Apple** | ❌ | ✅ | ✅ | ✅ | ✅ | N\u002FA |\n| **macOS version** | 14+ | 13+ | 13+ | 13+ | varies | varies |\n\n> CleanMyMac is a great product — they deserve the revenue from users who want a polished, supported experience. Mac Clean is for everyone who'd rather have transparent source code and zero subscription.\n\n## Features\n\n### Cleanup\n| Module | Description |\n|--------|------------|\n| **Smart Scan** | One-click scan combining cleanup, protection, and performance analysis with live progress across 13 modules |\n| **System Junk** | 16 scan categories — user\u002Fsystem caches, logs, language files, broken preferences, broken login items, document versions, iOS backups, Xcode junk, **Universal Binary thinning** (detects fat Mach-O binaries with both arm64 and x86_64 slices and rewrites them to your native arch via `lipo`), deleted users, and more |\n| **Mail Attachments** | Find cached attachments from Apple Mail, Outlook, and Spark |\n| **Trash Bins** | Empty trash from all locations including external drives |\n\n### Protection\n| Module | Description |\n|--------|------------|\n| **Malware Removal** | Signature-based scanning with 3 depths (Quick \u002F Balanced \u002F Deep), checks launch agents\u002Fdaemons, browser extensions, and known malware patterns |\n| **Privacy** | Clean Safari, Chrome, and Firefox data — history, cookies, cache. System traces cleanup with time filters |\n\n### Performance\n| Module | Description |\n|--------|------------|\n| **Optimization** | Manage login items and launch agents with enable\u002Fdisable toggles |\n| **Maintenance** | 10 system tasks — free RAM, run maintenance scripts, repair permissions, rebuild Launch Services, reindex Spotlight, flush DNS, thin Time Machine snapshots. Tasks are tagged with severity (safe \u002F disruptive) and \"Run All\" requires explicit confirmation; long-running tasks can be cancelled mid-flight |\n\n### Applications\n| Module | Description |\n|--------|------------|\n| **Uninstaller** | 10-level app matching engine that finds every associated file across 17+ Library subdirectories. Complete removal, app reset, unused app detection |\n| **Updater** | Check for available updates across installed apps via Sparkle appcast feeds |\n\n### Files\n| Module | Description |\n|--------|------------|\n| **Space Lens** | Squarified treemap visualization of disk usage with drill-down navigation |\n| **Large & Old Files** | Find files >50 MB sorted by size and last access date |\n| **Duplicates** | Progressive detection — size grouping → partial SHA-256 (4KB) → full hash → inode verification |\n| **Shredder** | Secure file erasure with standard, permanent, and secure overwrite modes |\n\n### Menu Bar Widget\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"assets\u002Fmenu_bar.png\" width=\"300\" alt=\"Mac Clean menu bar widget\" \u002F>\n\u003C\u002Fp>\n\nA glassmorphism menu bar widget that puts your Mac's vitals one click away — an independent process that launches at login and is toggled from the app's sidebar. No need to open the main window just to check in.\n\n- **Live stat rings** — CPU load, memory pressure, disk usage, and battery in a 2×2 ring grid (`host_processor_info`, `vm_statistics64`, APFS capacity, IOKit power source), color-graded green → amber → red\n- **Network, uptime & swap** — real-time up\u002Fdown throughput, system uptime, and swap usage\n- **Recommendations** — actionable, dismissible tips (\"User caches grew to 2.52 GB — run System Junk\") with one-tap actions, suppressed for 30 days once dismissed\n- **Protection status** — last malware-scan time and threat count, color-coded by freshness\n- **Connected devices** — external volumes (with free space) and external displays at a glance\n- **Health alerts** — background notifications when disk runs critically low or memory pressure stays high (throttled, opt-in)\n- **One click to the app** — jump straight into Mac Clean\n\n## Architecture\n\n```\nMac Clean\n├── MacClean          — Main SwiftUI app (14 modules, 15 views)\n├── MacCleanKit       — Shared framework (models, constants, protocols)\n├── MacCleanHelper    — XPC privileged helper (LaunchDaemon for root ops)\n├── MacCleanMenu      — Menu bar monitor (independent process)\n└── MacCleanTestRunner — Standalone test suite (56 tests)\n```\n\n### Tech Stack\n\n| Layer | Technology |\n|-------|-----------|\n| Language | Swift 6 with strict concurrency |\n| UI | SwiftUI + AppKit hybrid |\n| Concurrency | Actors, TaskGroup, async\u002Fawait, @Sendable |\n| Database | GRDB.swift (SQLite) with WAL mode |\n| File Scanning | URLResourceKey prefetching on APFS |\n| Incremental Updates | FSEvents with historical replay |\n| Privileged Ops | SMAppService + NSXPCConnection |\n| System Stats | Mach APIs (host_processor_info, vm_statistics64, proc_pidinfo) |\n\n### Safety Model\n\nMac Clean is designed to **never cause data loss**:\n\n- **Protected paths blocklist** — `\u002FSystem`, `\u002Fusr`, `\u002Fbin`, `\u002Fsbin`, Apple system apps are untouchable\n- **macOS firmlink canonicalization** — `\u002Fvar`↔`\u002Fprivate\u002Fvar`, `\u002Ftmp`↔`\u002Fprivate\u002Ftmp`, `\u002Fetc`↔`\u002Fprivate\u002Fetc` resolved to a single canonical form so symlink-redirect detection doesn't false-positive on legitimate system paths\n- **Pre-scan cleanability filter** — items the current process couldn't trash (root-owned children of system caches, macOS data-vaulted dirs under `~\u002FLibrary\u002FCaches\u002Fcom.apple.*`) are dropped at scan time so they never reach the UI as cleanable\n- **Trash-first deletion** — all removals go to Trash by default\n- **Dry-run mode** — preview what would be deleted without touching anything\n- **TOCTOU prevention** — symlinks re-resolved immediately before deletion\n- **Chunked cleanup** — large selections (50k+) prompt a confirmation modal; the engine splits the work into 5k-item chunks honoring `Task.isCancelled` between chunks so cancellation is responsive\n- **Recursive byte accounting** — directory size is walked instead of stat'd, so the \"X freed\" count on the completion screen reflects reality\n- **Orphan safety policy** — orphan cleanup restricted to caches\u002Flogs only\n- **In-app activity log viewer** — every error during clean is logged with full path; the post-clean screen has a \"View Log\" button that opens an in-app sheet with errors-only filter and copy-to-clipboard so you can paste a bug report verbatim. Logs auto-prune after 30 days\n- **Kernel-enforced XPC privilege gate** — the privileged helper uses `NSXPCListener.setCodeSigningRequirement` (macOS 13+) so the kernel itself rejects connections from any process whose code signature doesn't match the main app's identifier and team\n\n## Installation\n\n### Homebrew (recommended — one command, no warnings)\n\n```bash\nbrew tap iliyami\u002Fmacclean\nbrew install --cask mac-clean\n```\n\nThe Cask automatically handles Gatekeeper for you. Launch from Spotlight or Applications — no warnings, no right-clicks, no commands.\n\n### One-line installer\n\n```bash\ncurl -fsSL https:\u002F\u002Fraw.githubusercontent.com\u002Filiyami\u002FMacClean\u002Fmain\u002Fscripts\u002Finstall.sh | bash\n```\n\nThis downloads the latest DMG, installs the app to `\u002FApplications`, and removes the quarantine flag automatically.\n\n### DMG download\n\nDownload the latest DMG from [Releases](https:\u002F\u002Fgithub.com\u002Filiyami\u002FMacClean\u002Freleases\u002Flatest) and drag Mac Clean to your Applications folder. On first launch, either right-click the app and choose **Open**, or run once:\n\n```bash\nsudo xattr -dr com.apple.quarantine \"\u002FApplications\u002FMac Clean.app\"\n```\n\n### Build from source\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Filiyami\u002FMacClean.git\ncd MacClean\nswift build\nswift run MacCleanTestRunner   # run 56 tests\nbash scripts\u002Fbuild-dmg.sh      # build local DMG\n```\n\n### Granting Full Disk Access\n\nSome modules (Mail Attachments, Privacy, Malware) need Full Disk Access to scan protected areas:\n\n1. Open **System Settings → Privacy & Security → Full Disk Access**\n2. Click **+** and add **Mac Clean.app** from Applications\n3. Restart Mac Clean\n\n## Why Mac Clean isn't notarized by Apple\n\nApple charges **$99\u002Fyear** for a Developer ID — the only way to bypass Gatekeeper warnings on macOS. Mac Clean is free, open-source, and built by volunteers. Paying Apple's annual gatekeeping tax just so users can open the app without a warning isn't worth it when:\n\n1. The source is right here for you to read\n2. Homebrew install handles it automatically — `brew install --cask mac-clean` and you're done\n3. The one-line installer handles it automatically\n4. The whole \"Gatekeeper warning\" thing is just an extra `xattr` command for direct DMG installs\n\nIf our community ever wants to fund a Developer ID (or some other open-source organization wants to sponsor one), we'll happily ship notarized builds. Until then, **no paywall just to launch a free app**.\n\nFor maintainers with a Developer ID who want to ship notarized builds:\n\n```bash\nexport APPLE_DEVELOPER_ID='Developer ID Application: Your Name (TEAMID)'\nxcrun notarytool store-credentials 'MacClean' --apple-id YOU@example.com --team-id TEAMID\nexport NOTARY_PROFILE='MacClean'\nbash scripts\u002Fbuild-dmg.sh --notarize\n```\n\n## Requirements\n\n- macOS 14 (Sonoma) or later\n- For building from source: Swift 6 toolchain (Xcode 16+)\n\n## Project Structure\n\n```\nSources\u002F\n├── MacClean\u002F\n│   ├── App\u002F                    # App entry point, state, content view\n│   ├── Core\u002F\n│   │   ├── Scanner\u002F            # FileTreeScanner, TargetedScanner, ScanCoordinator\n│   │   ├── Cleaner\u002F            # CleaningEngine, SafetyGuard\n│   │   ├── Cache\u002F              # GRDB database layer\n│   │   └── FSMonitor\u002F          # FSEvents incremental watcher\n│   ├── Modules\u002F                # 13 scan modules\n│   │   ├── SystemJunk\u002F         # 16 junk categories\n│   │   ├── Malware\u002F            # Signature scanner + real-time monitor\n│   │   ├── Uninstaller\u002F        # 10-level app matching engine\n│   │   ├── SpaceLens\u002F          # Squarified treemap algorithm\n│   │   ├── Duplicates\u002F         # Progressive hash pipeline\n│   │   └── ...\n│   ├── Views\u002F                  # SwiftUI views (14 module views + shared components)\n│   ├── ViewModels\u002F             # @Observable view models\n│   ├── Services\u002F               # PermissionManager, XPCClient\n│   └── Utilities\u002F              # SuperEllipse shape, extensions\n├── MacCleanKit\u002F                # Shared models, constants, protocols\n├── MacCleanHelper\u002F             # XPC privileged helper (root operations)\n├── MacCleanMenu\u002F               # Menu bar system monitor\n└── MacCleanTestRunner\u002F         # 56 standalone tests\n```\n\n## Tests\n\n```bash\nswift test\n```\n\nXCTest-based suite covering:\n\n- **`SafetyGuard`** — 24 adversarial tests (symlinks, traversal, NULL bytes, SIP, protected apps, file caps, idempotence)\n- **`CleaningEngine`** — 9 integration tests (dry-run, trash, permanent, error handling, operation log)\n- **`PlistJunkFilter`** — 9 tests including Apple-system-domain safety contract\n- **`ScanCoordinator`** state machine — scan\u002Fcancel\u002Fcategory-filter\u002Finclude-heavy\n- **`TargetedScanner`** integration — runs against synthetic temp directory fixtures\n- **All 16 system junk categories** — pure target declarations + the filter logic on the procedural ones (`BrokenPreferences`, `BrokenLoginItems`, `UniversalBinaries`, `DeletedUsers`)\n- **`SquarifiedTreemap`** — empty, single, multi-node, area conservation, aspect-ratio properties\n- **`AppMatching`** — all 10 levels of the uninstaller pattern engine\n- **`DuplicateDetection`** — size groups, partial\u002Ffull hash groups, inode dedup\n- **`MalwareSignatures`** — name patterns + suspicious launch agent payloads\n- **`MaintenanceTask`** — all 10 tasks have descriptions, icons, executable paths\n- **`FileGroup`** — by-size \u002F by-type \u002F by-age grouping\n- **`AppcastParser`** — Sparkle XML parsing\n- **`VolumeInfo`** — usage math, equality\n- **`AppDatabase`** — GRDB cache CRUD, migrations, invalidation\n- **`FSEventMonitor`** — invalidated-path computation\n- **`AppDiscovery`**, **`AppPathFinder`** — smoke tests\n- **End-to-end** — synthetic fixture → scan → results → clean cycle\n\nTest infrastructure (`Tests\u002FMacCleanTestSupport\u002F`) provides `withTempHome`, `withFakeApp`, `withFakePlist`, and other fixture helpers so tests stay deterministic and never touch the user's real home.\n\nCoverage target: **85%+ overall**, **100% on `SafetyGuard` and `CleaningEngine`** (the death-and-life files). See [`docs\u002FTESTING.md`](docs\u002FTESTING.md) for the full roadmap.\n\n## Security\n\nMac Clean takes security seriously:\n\n- **No network access** — the app never phones home, no telemetry, no analytics\n- **No elevated privileges by default** — XPC helper only activated for maintenance tasks\n- **Code signature verification** — XPC helper validates caller identity\n- **Protected paths** — 27+ Apple system apps and all SIP-protected paths are blocklisted\n- **Open source** — every line of code is auditable\n\n### Security Audit Checklist\n\n- [x] No command injection vectors (all Process args are hardcoded constants)\n- [x] No arbitrary file deletion (SafetyGuard validates every path)\n- [x] TOCTOU race condition prevention (symlink re-resolution before delete)\n- [x] File operation caps (10,000 file limit per operation)\n- [x] XPC caller validation (code signature check)\n- [x] No secrets or credentials in source\n- [x] Trash-first policy (recoverable by default)\n- [x] Operation audit log (every action recorded)\n\n## Contributing\n\nWe welcome contributions! Please read our [Contributing Guidelines](CONTRIBUTING.md) before submitting a PR.\n\n### Quick Start\n\n1. Fork the repo\n2. Create a feature branch (`git checkout -b feature\u002Famazing-feature`)\n3. Make your changes\n4. Run tests (`swift run MacCleanTestRunner`)\n5. Commit (`git commit -m 'Add amazing feature'`)\n6. Push (`git push origin feature\u002Famazing-feature`)\n7. Open a Pull Request\n\n## License\n\nThis project is licensed under the **BSD 3-Clause License** — see the [LICENSE](LICENSE) file for details.\n\nThis means you can use, modify, and redistribute this code, but you **must**:\n- Include the original copyright notice\n- Include the license text\n- **Not** use the name \"Mac Clean\" or contributors' names to endorse derived products without permission\n\n## Acknowledgments\n\nInspired by the open-source Mac utility community:\n- [Pearcleaner](https:\u002F\u002Fgithub.com\u002Falienator88\u002FPearcleaner) — app uninstaller patterns\n- [Mole](https:\u002F\u002Fgithub.com\u002Ftw93\u002FMole) — cleanup categories\n- [Tencent Lemon Cleaner](https:\u002F\u002Fgithub.com\u002FTencent\u002Flemon-cleaner) — modular architecture\n- Squarified Treemap algorithm by Bruls, Huizing & van Wijk (2000)\n\n---\n\n\u003Cp align=\"center\">\n  \u003Cstrong>Mac Clean is free software built by the community, for the community.\u003C\u002Fstrong>\u003Cbr>\n  If you find it useful, please star the repo and share it with others.\n\u003C\u002Fp>\n","Mac Clean 是一个开源的 Mac 清理、优化和恶意软件扫描工具，提供了一个免费且功能全面的 CleanMyMac 替代方案。项目使用 Swift 6 和 SwiftUI 构建，核心功能包括清理垃圾文件、移除恶意软件、优化系统性能、完全卸载应用程序以及可视化磁盘使用情况。Mac Clean 无订阅费用、无遥测数据收集、无广告，强调用户隐私保护。适用于需要保持 Mac 系统干净、高效运行，并希望避免商业软件潜在隐私风险的用户。",2,"2026-06-04 02:30:26","CREATED_QUERY"]