Skip to content
medicagoooPublic

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

7 Commits

Folders and files

Repository files navigation

TwinSweep

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.

Features

  • 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 Included and Protected states.
  • Duplicate matching scopes: No, Yes, Master, External only, External + Master, and Internal 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.

Safety Defaults

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 Protected scan 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.

Tech Stack

  • 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 ffmpeg and ffprobe on PATH

Project Structure

.
├── 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

Requirements

  • Windows 10/11 or macOS
  • Node.js 24+
  • pnpm 11+
  • Rust 1.96+
  • WebView2 Runtime on Windows
  • Optional: ffmpeg and ffprobe on PATH for audio/video similarity and media preview

Getting Started

Install dependencies:

pnpm install

Run frontend tests:

pnpm test

Run Rust tests:

cargo test --manifest-path src-tauri\Cargo.toml

Build the frontend:

pnpm build

Start the Tauri desktop app in development mode:

pnpm tauri dev

Current UI Workflow

  1. Choose search criteria.
  2. Add scan locations from the available location list or system folder picker.
  3. Start a scan.
  4. Review duplicate file and duplicate folder results.
  5. Mark files manually or with Selection Assistant rules.
  6. Build a cleanup dry-run plan.
  7. Review warnings, blocking errors, targets, and reclaimable space.
  8. Execute cleanup or export results to CSV.
  9. Save or load scan sessions when needed.

Documentation

Roadmap

  • 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.

License

No license has been selected yet. Do not redistribute until a license is added.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages