Ladies and gentlemen, may I present thefck: a simple tool for finding duplicate files and browsing the indexed results through an embedded Vue 3 app.
A single binary containing all the fun you can think of. And since it’s written in Go, it might even compile and run on your system.
thefck indexes files in a directory tree, stores file metadata in a bbolt database, flags duplicate content, and serves a bundled Vue 3 SPA for browsing the index.
Because most duplicate-file finders are a giant clusterfuck: gazillions of esoteric options, wrapped in build requirements that make your package manager weep.
Yo, I crawl the tree, I hash the block,
I find the dupe and I make it talk.
bbolt in the back, Vue in the front,
one binary doing the whole damn stunt.Mic drop.
Each indexed file stores:
- File date
- File size
- Absolute path
- Filename
- Checksum
- Duplicate status
Checksums use github.com/cespare/xxhash/v2. The index is stored in bbolt.
- Go 1.25 or newer
- Node.js and npm, only when rebuilding the SPA
Scan the current directory:
go run ./srcScan a specific directory:
go run ./src /path/to/filesUse a custom database:
go run ./src --db /path/to/checksums.db /path/to/filesReport new, changed, and missing files while scanning:
go run ./src --report-changes /path/to/filesDuplicate reporting is enabled by default. Disable it with:
go run ./src --report-duplicates=false /path/to/filesStart the bundled web UI:
go run ./src serve --db checksums.db --addr 127.0.0.1:8080Then open:
http://127.0.0.1:8080
The API is available at:
http://127.0.0.1:8080/api/files
The SPA table is searchable and sortable. It starts filtered to duplicate files, shows the active filters above the table, and paginates at 200 files per page.
Build the command-line app:
go build -o thefck ./srcRun it:
./thefck --report-changes /path/to/files
./thefck serve --db checksums.db --addr 127.0.0.1:8080The SPA source lives in js/. It builds into src/web/dist/, which is embedded into the Go binary.
Install dependencies:
cd js
npm installBuild the SPA:
npm run buildThen rebuild the Go binary:
cd ..
go build -o thefck ./srcjs/node_modules/is ignored.js/package-lock.jsonis intentionally kept for reproducible frontend installs.- Generated SPA assets in
src/web/dist/are part of the Go embed flow. - The database file is skipped during scans when it lives inside the scanned directory.