Rafaelpta/dupehound
CLILive in productionFinds the code your AI wrote twice. Fast, offline duplicate-code detector: scan, history chart, CI gate. No AI required.
Finds the code your AI wrote twice. Fast, offline duplicate-code detector: scan, history chart, CI gate. No AI required.
- id100.0%
1 Review
Dupehound addresses a timely problem: agents can reproduce existing logic under new names because they do not inspect an entire repository before writing. It parses functions with tree-sitter, normalizes identifiers and literals, fingerprints structural token windows, and uses an index to find renamed copies deterministically and offline. The scan, history, and CI-focused check commands support exploration, trend analysis, and prevention, while explainable matches and MCP integration are practical additions.
The published planted-duplicate benchmark is useful and includes limitations, but broader evaluation on naturally occurring refactors would clarify precision and recall. Special cases such as generated code, framework boilerplate, required interface implementations, tests, and intentionally duplicated hot paths need transparent policies and regression fixtures. Similarity thresholds and grade labels should remain configurable so teams do not turn a heuristic into an inflexible quality gate. Dupehound is best for large or agent-heavy codebases that want fast, reproducible duplicate detection, especially when findings are reviewed as refactoring suggestions rather than treated as proof that code is bad.
