dupehound finds the duplicate code AI agents create when they rewrite logic that already exists under new names. It fingerprints function structure (tree-sitter + MOSS winnowing), so renamed copies still match. Offline, deterministic, no AI. scan, history, CI gate.
No reviews yetBe the first to leave a review for dupehound
Hunter
📌
Hi Product Hunt, this is my first open source project.
Coding agents can't hold your whole repo in context, so they rewrite code that already exists under new names. formatDate becomes renderTimestamp becomes stringifyDate.
dupehound catches it. It fingerprints the structure of every function (tree-sitter normalization plus the MOSS winnowing algorithm used for plagiarism detection), so a renamed copy still matches.
Three commands:
- scan: ranks duplicate clusters and gives the repo a slop score
- history: charts when duplication took off across your git log
- check: fails CI and points the agent back to the original function to reuse
It uses no AI, on purpose. It is deterministic. Finding duplicates means comparing every function against every other and a CI gate has to give the same verdict every time.
It runs offline with no API keys and scans vscode, about 3M lines, in under 4 seconds.
Open source, MIT, written in Rust. The community has already added languages as PRs this week (Ruby and Swift), 9 so far.
brew install rafaelpta/dupehound/dupehound
https://github.com/Rafaelpta/dup...
I'd love your feedback and your contribution.