TreeMap
A free, open-source disk-space visualizer. Squarified treemap, duplicate hunting, disk-full forecasting, and cleanup that only ever moves files to the Trash.
翻译准备中
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证macOS app to compare, sync (mirror / difference / union) and clean up two drives or folders — preview-first, archive instead of delete, junk & duplicate cleanup, AI chat.
翻译准备中
取自仓库 README
正在加载完整 README。 以下为已保存的摘录。
A native macOS app (SwiftUI) to compare, sync and clean up two storage locations — external drives, local folders, or any two folders. It was originally built to manage two external drives kept in different places (A: 8 TB, B: 10 TB) that only occasionally get plugged into the same Mac. The UI is bilingual (Traditional Chinese / English) and can be switched live from the toolbar.查看完整 README ↗
A native macOS app (SwiftUI) to compare, sync and clean up two storage locations — external drives, local folders, or any two folders. It was originally built to manage two external drives kept in different places (A: 8 TB, B: 10 TB) that only occasionally get plugged into the same Mac. The UI is bilingual (Traditional Chinese / English) and can be switched live from the toolbar.
Website · Download for Mac · Install guide
Download the latest DiskManager-<version>.dmg from Releases, open it and drag DiskManager.app into Applications.
The app is not notarized by Apple, so Gatekeeper blocks it on first launch:
macOS 15 Sequoia and later: open the app once and dismiss the warning, then go to System Settings › Privacy & Security, scroll to Security and click Open Anyway.
macOS 14 Sonoma: in Finder, right-click the app › Open, then click Open.
Any version: remove the quarantine flag in Terminal:
xattr -dr com.apple.quarantine /Applications/DiskManager.app
Enable DiskManager under System Settings › Privacy & Security › Full Disk Access (see Permissions below).
The website has the full step-by-step install guide.
Requirements: macOS 14 Sonoma or later, Apple Silicon. You can also build from source (see Building).
The layout has three rows, top to bottom: mode → target space A (the source of truth; never modified, highlighted with the accent color) → operated space B (the side that gets changed). For the opposite direction, press the "Swap" button between the two rows — existing scan results are reused, no rescan needed. That is why there are no mirrored duplicate modes such as B→A or A−B. In union mode both sides are equal and neither is highlighted.
Three modes (switch instantly; the plan is recomputed from cached scan results without rescanning):
| Mode | Behavior |
|---|---|
| Mirror | Make operated space B match target space A (one-way mirror with A as the source of truth) |
| Difference | Preview only the items that exist in B but not in A, then archive them or move them to the Trash after confirmation; nothing is copied or overwritten |
| Union | Fill in missing files on both sides; when the same file differs, the one with the newer modification time wins and the overwritten version is archived first. Items whose age can't be determined, or that conflict in type, are left untouched and listed |
In mirror mode, extra files on the operated space are handled as you choose: keep, move to archive folder (default), or move to Trash.
Changing folder A or B after a plan has been previewed invalidates the plan immediately; you must rescan before running it.
_DiskManager_Archive/<timestamp>/ by default.Folder / folder are not treated as two different items on case-insensitive volumes.Finds removable junk in a storage space. Everything is listed for you to check first; items go to the Trash by default, and permanent deletion needs an extra confirmation.
.fcpbundle / .imovielibrary libraries. Original Media is never included..img / .dmg / .iso / .sparseimage, etc. (e.g. SD card backup images) — whether to delete them is up to you..DS_Store, AppleDouble (._ files, picked up with a POSIX readdir pass because Foundation APIs hide them), Spotlight indexes, .fseventsd, and leftover .dmtmp-* temp files from interrupted copies in older versions..thumbnails, Lightroom Previews.lrdata, Premiere Media Cache, etc.Each category is further grouped into subcategories (e.g. system clutter → .DS_Store / AppleDouble / Spotlight index …), each with its own count, size and group checkbox; individual files appear only when expanded, so you won't drown in thousands of .DS_Store files.
The junk scan skips _DiskManager_Archive (the safety net) and .Trashes.
"AI Analysis" in the toolbar opens a chat panel on the right where you can hand results to an LLM for analysis (which folders take the most space, whether extra files are safe to delete, which duplicate to keep …):
api.anthropic.com / api.openai.com; usage is billed to your own account. The model picker lists both providers' models (in Claude / GPT sections), and the provider's key is chosen by the model you pick. Default: claude-opus-5.make app # builds dist/DiskManager.app and dist/DiskManager-<version>.dmg; icon comes from scripts/AppIcon.png
macOS doesn't let apps request Full Disk Access themselves; you have to enable DiskManager under System Settings › Privacy & Security › Full Disk Access (then relaunch the app). Without it, scanning triggers a separate prompt for Desktop / Documents / Downloads / external and network volumes, and protected folders are skipped. The shield icon on the right of the toolbar shows the current status and opens that settings pane when clicked; the first scan also reminds you if access hasn't been granted.
make app automatically signs with an installed Apple Development / Developer ID identity (override with CODESIGN_IDENTITY=). This matters: Full Disk Access is tied to the app's code signature. An ad-hoc signature changes on every build, so macOS silently revokes the grant; with a real identity the grant survives rebuilds.
xed . # open in Xcode (SPM package)
swift run # run directly
swift test # unit tests (scan / diff / difference / union / junk scan / similar folders / end-to-end sync)
# Scale smoke test (generates 80k files to measure scan memory; slow, skipped by default)
DM_SCALE_TEST=1 swift test --filter ScaleSmokeTests
Note: every scan / copy / delete loop must wrap each item in autoreleasepool. Foundation's enumeration and file APIs create lots of autoreleased objects, and background threads have no drain point, so memory grows without bound on large drives (measured: +43 MB for 80k files; several GB before the fix).
Layout:
Sources/DiskManagerCore/ — pure logic, UI-independent, fully testable:
TreeScanner scanning, Differ mirror/union diffing, SyncEngine execution, CopyFile (a copyfile(3) wrapper with progress, cancellation and metadata)JunkScanner junk classification + duplicate fingerprints, JunkEngine deletionReportJSONExporter JSON export of sync plans / cleanup reports (full version for saving, capped version for the AI)Sources/DiskManager/ — SwiftUI UI (bilingual strings are written inline in pairs as tr(zh, en)); the AI chat panel is ChatPanelView / ChatState / ClaudeClient + OpenAIClient (each using its provider's streaming API, no third-party dependencies) / KeychainStoreThe core APIs work on "any two folder URLs" (Differ.diff(source:dest:), SyncEngine.execute(...)) and have no notion of A/B. Extending to N drives only requires a drive list plus pairwise runs at the UI layer; the core stays unchanged. Combined with the manifest database on the roadmap (recording which files are backed up to which drive), this enables scenario 1 and multi-drive setups.
._) files are not synced (Foundation enumeration doesn't return them; they are metadata sidecars that copyfile recreates when needed). The cleanup tab can find and delete them.