Skip to content
Rafaelpta

Rafaelpta/dupehound

CLILive in production

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

85 42 since joining 8RustPush 3d agoListed 1mo ago4 open issuesMIT
aiclicode-qualitydeveloper-toolsduplicate-detectionruststatic-analysistree-sitter
  • id100.0%
View on GitHub

Report a problem

1 Review

TypeScriptPythonShell

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.