TwinSweep is a cross-platform duplicate file cleaner for Windows and macOS. It is built with Tauri 2, Rust, React, TypeScript, and SQLite, with a desktop UI for scanning, reviewing, marking, exporting, and safely cleaning duplicate files.
Project status: source-runnable development version. The application already supports the core duplicate-cleaning workflow, while advanced media similarity, archive scanning, and several professional automation features are still being expanded.
- Regular duplicate file scanning with size pre-grouping, partial hashing, full SHA-256 hashing, and byte comparison.
- Duplicate folder detection from recursive folder signatures.
- Search roots with
IncludedandProtectedstates. - Duplicate matching scopes:
No,Yes,Master,External only,External + Master, andInternal only. - Search filters for extensions, size, zero-byte files, modified date, and image dimensions.
- Attribute matching for file name, similar file name, extension, size, created time, modified time, drive, and folder name.
- Basic image similarity grouping using perceptual-style image hashing.
- FFmpeg/ffprobe detection for audio/video similarity and media preview readiness.
- Selection Assistant rules for keeping newest, oldest, shortest path, or longest path files.
- Cleanup dry-run plans with blocking checks before execution.
- Cleanup actions modeled for trash delete, permanent delete, move, copy, rename, shortcut, symlink, and hardlink workflows.
- Safety checks for protected roots, system paths, missing keepers, target conflicts, and deleting every file in a duplicate group.
- CSV export for duplicate file results.
- Saved scans, structured SQLite result storage, settings persistence, and virtual folder catalog import/export commands.
- Simplified Chinese and English UI.
TwinSweep is designed around review-first cleanup:
- Cleanup starts with a dry-run plan.
- Deleting every file in the same duplicate group is blocked.
- Files under
Protectedscan roots are blocked from cleanup. - Important system paths are protected by default.
- Permanent deletion requires explicit confirmation text.
- Cleanup execution writes an audit log.
- The default cleanup path is trash/recycle-bin deletion.
- Desktop shell: Tauri 2
- Core engine: Rust
- Frontend: React 19, TypeScript, Vite
- State and UI support: Zustand, i18next, Recharts, lucide-react
- Storage: SQLite through Rust commands
- Media tools: optional
ffmpegandffprobeonPATH
.
├── docs/
│ └── requirements.md # Product and technical requirements
├── src/ # React/TypeScript desktop UI
│ ├── App.tsx
│ ├── store.ts
│ ├── tauriClient.ts
│ └── features/
├── src-tauri/
│ ├── src/
│ │ ├── scanner.rs # File discovery and duplicate matching
│ │ ├── cleanup.rs # Dry-run and cleanup execution
│ │ ├── storage.rs # SQLite persistence
│ │ ├── commands.rs # Tauri IPC commands
│ │ ├── media.rs # Media tool detection and image metrics
│ │ ├── selection.rs # Selection assistant logic
│ │ └── virtual_folders.rs # Offline folder catalogs
│ └── tests/
└── README.md
- Windows 10/11 or macOS
- Node.js 24+
- pnpm 11+
- Rust 1.96+
- WebView2 Runtime on Windows
- Optional:
ffmpegandffprobeonPATHfor audio/video similarity and media preview
Install dependencies:
pnpm installRun frontend tests:
pnpm testRun Rust tests:
cargo test --manifest-path src-tauri\Cargo.tomlBuild the frontend:
pnpm buildStart the Tauri desktop app in development mode:
pnpm tauri dev- Choose search criteria.
- Add scan locations from the available location list or system folder picker.
- Start a scan.
- Review duplicate file and duplicate folder results.
- Mark files manually or with Selection Assistant rules.
- Build a cleanup dry-run plan.
- Review warnings, blocking errors, targets, and reclaimable space.
- Execute cleanup or export results to CSV.
- Save or load scan sessions when needed.
- Background scan task queue with real pause, resume, cancel, and progress events.
- Higher-quality image similarity with pHash/dHash, histogram checks, EXIF date, GPS grouping, RAW/HEIC support.
- Audio fingerprinting through FFmpeg/Chromaprint-style signatures.
- Video key-frame and thumbnail similarity matching.
- Archive scanning for zip, gz, rar, bz2, tgz, 7z, tar, and jar when external tools are available.
- Large-result virtual scrolling and paginated SQLite queries in the UI.
- CSV import, batch script export, and full duplicate folder export UI.
- More complete move/copy/rename/link execution options and conflict policies.
- Cache management, log viewer, theme settings, and reset-all-data UI.
No license has been selected yet. Do not redistribute until a license is added.