Skip to content
guptaprakhariitrPublic

About

Twinned — fast, native duplicate-file finder for macOS. Free & open. A free replacement for subscription dedupe apps.

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

TwinnedApp

Reclaim disk space on your Mac.

Three tools in one window:

  • Duplicates — find byte-for-byte duplicates (SHA-256) and visually similar images (perceptual dHash), then move the copies to Trash in one click.
  • Big Files — scan a folder and list the biggest / oldest / least-recently-opened files with a minimum-size filter; multi-select and move to Trash.
  • Disk Map — a recursive treemap of where your space goes, with drill-in navigation into the heaviest subfolders.

Watch live scan progress with an ETA, see exactly how much space you can get back. 100% local. Free and open source.

A free, native macOS replacement for paid duplicate finders and disk-space cleaners.

TwinnedApp

The screenshots below are generated by TwinnedApp itself (swift run TwinnedChecks docs/images). To use your own, drop PNGs into docs/images/ and update the links.


What it does

Grouped results with per-group reclaim totals and a smart KEEP suggestion Reclaim gigabytes — a one-click move-to-Trash of the redundant copies

Capabilities

Area Features
Input Pick folders · drag & drop folders · scan multiple locations at once
Exact duplicates Size-bucketed, then SHA-256 content hash — true byte-for-byte matches only
Similar images Perceptual difference-hash (dHash) — clusters near-identical images within a configurable Hamming distance (default 10)
Live progress Real-time scan progress with file counts and an ETA while large folder trees are walked and hashed
Results Grouped by duplicate set · per-file sizes · per-group and total "Reclaim X GB" summary
Keep heuristic Suggests keeping the copy that does not look like a duplicate (avoids copy / (1)) and, among ties, the shortest path
Big Files Scan a folder → sort by Largest, Oldest (modification date), or Least recently opened (access date) · minimum-size filter · multi-select → move to Trash
Disk Map Recursive folder-size treemap — every node's size is the sum of its subtree (own files + descendants) · proportional tiles, biggest-first · drill into heavy subfolders with a breadcrumb back
Cleanup Move to Trash only — TwinnedApp never hard-deletes, so everything is recoverable
Trust 100% local — your files never leave your Mac · no telemetry in the shipped build

Architecture

TwinnedApp is fully open source and builds entirely from source under AGPL-3.0. (The internal Swift package name is Twinned; the app's display name is TwinnedApp.)

Sources/Twinned          executable (@main)  — app entry, menus, settings, logging bootstrap
Sources/TwinnedUI        library             — the three reclaim screens + their view models
Engines/DedupEngine      library             — DedupEngine (SHA-256 + dHash) and SpaceEngine (Big Files sizing/sorting + recursive Disk Map tree)
Packages/Core            shared modules      — DesignSystem, CommonUI, SettingsKit, RemoteConfigKit, LicenseKit, UpdateKit, LogKit, ScreenshotKit

The deterministic cores live in the engine package and are covered by golden tests; the view models wrap them and are covered by wiring tests (see Tests below).

How detection & sizing work

  • Exact duplicates: files are bucketed by size, then each multi-file bucket is hashed with SHA-256 of its contents. Any hash bucket with more than one file is an exact-duplicate group.
  • Similar images: each image is reduced to a 9×8 grayscale grid and turned into a 64-bit difference-hash (dHash). Images within a configurable Hamming distance (default 10) are clustered into similar groups.
  • Keep heuristic: TwinnedApp suggests keeping the copy whose name does not look like a duplicate (avoids copy / (1)) and, among ties, the shortest path.
  • Big Files (SpaceEngine): a folder scan produces FileEntry values (size + modification + access dates); sorting is a total order (ties broken by path) so results are deterministic, and the min-size filter runs before the sort.
  • Disk Map (SpaceEngine.diskTree): folder sizes are computed bottom-up into a DiskNode tree where, for every node, totalBytes == ownBytes + Σ(child subtree totals). Children are sorted biggest-first for a stable treemap.

Feature flags & logging

  • Feature flags (paid features, in-app updates, force-update) are built but gated OFF via Firebase Remote Config (RemoteConfigKit) and can be flipped on later with no app update. GoogleService-Info.plist is not committed — it is gitignored, and the app runs fine without it (feature flags simply stay off).
  • Logging: every run writes to ~/Library/Containers/com.plainware.twinned/Data/Library/Logs/Plainware/Twinned.log (sandboxed) — tail -f it to debug.

Build & run (no Xcode required)

swift build
swift run Twinned

Package an .app bundle:

Scripts/bundle.sh --package-dir . --product Twinned --name TwinnedApp \
  --bundle-id com.plainware.twinned --info-plist Resources/Info.plist \
  --entitlements Resources/Twinned.entitlements --icon Resources/AppIcon.icns --open

Run the tests:

swift test                              # TwinnedUI view-model / wiring tests
( cd Engines/DedupEngine && swift test) # DedupEngine + SpaceEngine golden tests
swift run TwinnedChecks ./screenshots   # legacy logic checks + regenerate screenshots

The golden tests cover the deterministic cores (duplicate detection, Big Files sorting/filtering, and the recursive Disk Map sizing). The wiring tests prove every control works: a folder scan populates the list, sort/filter change the order, the treemap tiles match the engine's sizes and drill-in navigates, and the multi-select → Trash action calls the right API (via an injected hook — no real file is trashed). TwinnedChecks must print ✅ ALL CHECKS PASSED.

License

Licensed under the GNU Affero General Public License v3.0 (AGPL-3.0) — see LICENSE. © 2026 Prakhar Gupta.

About

Twinned — fast, native duplicate-file finder for macOS. Free & open. A free replacement for subscription dedupe apps.

Resources

Contributing

Security policy

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages