Free, open-source macOS cleaner with a native SwiftUI app, a CLI, and cleanup for caches, Xcode, Homebrew and Docker, with no telemetry.
Himanshu-Sangshetti/twinfold
A macOS app and CLI that frees disk space by turning identical files into APFS clones that share storage, without deleting any file.
- Stars
- 62
- Forks
- 2
- Open issues
- 0
- Last commit
- 13 days ago
What is it?
Twinfold finds identical files on a Mac, such as the same node_modules in several projects or duplicate downloads, and converts the extra copies into APFS clones. Each file keeps its own name, dates and permissions, but the copies share one set of disk blocks, so the space is reclaimed without removing anything. If a shared file is later edited, only that file changes.
Before any change is made, the app shows the matching sets by kind, by folder and file by file, and lets you exclude files you want left alone. Each save is checked byte for byte and against metadata, and it is recorded in a journal so that every run can be undone from History or with the undo command.
Besides the SwiftUI app, Twinfold ships a command line tool with scan, reclaim and undo commands, and it runs as an MCP server so AI agents such as Claude or Cursor can scan and save duplicates after a confirmation step. The app is MIT licensed, with an optional Pro tier for automatic background runs.
Key features
- 01Converts duplicate files into APFS clones so they share disk blocks while keeping their names and metadata.
- 02Shows every duplicate set with the space that would be freed before any change is made.
- 03Verifies each copy byte for byte and checks its metadata before swapping it in.
- 04Records every run in History with one-step undo.
- 05Provides a command line tool with scan, reclaim and undo commands.
- 06Works as an MCP server so AI agents can scan and save duplicates after confirmation.
Use cases
- Freeing space taken by repeated node_modules or virtualenv packages across many projects.
- Removing duplicate downloads or videos saved in several folders without losing any copy.
- Letting an AI agent find and save duplicates in a projects folder after you approve the plan.
Quick start
- 1
Clone the repository
git clone https://github.com/Himanshu-Sangshetti/twinfold && cd twinfold - 2
Build the command line tool and copy it to your PATH
swift build -c release && cp .build/release/twinfold /usr/local/bin/ - 3
Scan folders to see how much space identical files could share (changes nothing)
twinfold scan
Things to know
- Requires macOS 14 or later and an APFS volume.
- The app is not notarized by Apple, so macOS will warn on first launch.
- Automatic saving and the menu bar features require a paid Pro license.
In collections
Topics
FAQ
- What is twinfold?
- A macOS app and CLI that frees disk space by turning identical files into APFS clones that share storage, without deleting any file. Twinfold finds identical files on a Mac, such as the same node_modules in several projects or duplicate downloads, and converts the extra copies into APFS clones. Each file keeps its own name, dates and permissions, but the copies share one set of disk blocks, so the space is reclaimed without removing anything. If a shared file is later edited, only that file changes.
- Is twinfold free to use? What license does it have?
- twinfold is open source under the MIT license. Check the license terms before using it in commercial products.
- Is twinfold still maintained?
- Actively maintained. The last commit to twinfold was on Oct 25, 2026.
- What can I use twinfold for?
- Freeing space taken by repeated node_modules or virtualenv packages across many projects. Removing duplicate downloads or videos saved in several folders without losing any copy. Letting an AI agent find and save duplicates in a projects folder after you approve the plan.
- How do I install twinfold?
- Clone the repository: git clone https://github.com/Himanshu-Sangshetti/twinfold && cd twinfold Build the command line tool and copy it to your PATH: swift build -c release && cp .build/release/twinfold /usr/local/bin/ Scan folders to see how much space identical files could share (changes nothing): twinfold scan
- Where can I get twinfold?
- The source code and installation instructions are on GitHub: https://github.com/Himanshu-Sangshetti/twinfold
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
Open-source Mac screen and camera recorder with an iPhone camera companion, plus a Windows capture app, for recording and editing takes.
A free, open source macOS uninstaller that removes an app along with every leftover file, showing why each belongs to it.
An open source macOS menu bar manager that hides unused icons and lets you find any menu bar item from the keyboard.
A tiny, fully native macOS launcher with a global hotkey, app search, clipboard history, snippets and Raycast extension support.
A macOS app that turns the MacBook notch into a Dynamic Island-style panel for media controls, system stats, and quick utilities.