Launched June 23, 2026
dupehound

dupehound

Finds the code your AI wrote twice (deterministic, offline, open-source)

FreeAI Agents2,309 impressions#6 of its week2 comments

Comments

>log in to comment
  • PDFops· 4mo ago

    The "deterministic, offline, open-source" framing is the right call here — shipping your whole codebase to a hosted dedup service is a non-starter for most teams. The case I'd want to know it handles: AI duplication is usually *semantic*, not textual — the model re-implements the same helper with renamed vars or a reordered body, so a line/token hash slides right past it. Do you canonicalize (AST-normalize, rename-insensitive) before comparing, or is it textual? The quietly-reimplemented helper is the bloat that actually piles up.

  • Zain Sheikh· 4mo ago

    The tree-sitter + MOSS winnowing approach catching renamed copies is clever — a deterministic offline CI gate is exactly what AI-heavy codebases need. Does it also flag near-duplicates with small logic edits?

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.

dupehound detects duplicate code generated by AI agents, even when renamed, using offline deterministic fingerprinting.

for
Developers using AI code generators who need to avoid duplicated logic.
pricing
open source
license
MIT
Rafaelpta/dupehound 96 10Rustupdated 19 days ago

Key features

6 features of dupehound
  • Structure fingerprinting — Uses tree-sitter and MOSS winnowing to fingerprint function structure so renamed copies still match.
  • Offline operation — Runs entirely locally without external services or AI.
  • Deterministic results — Provides consistent detection outcomes across runs.
  • Scan mode — Analyzes codebases to find duplicate functions.
  • History tracking — Keeps a record of previously detected duplicates.
  • CI gate integration — Can be added as a gate in continuous-integration pipelines to block duplicate code.

Use cases

  • Prevent AI agents from re-implementing existing functions in a repository
  • Enforce duplicate-free code in CI pipelines
  • Track duplicate introductions over time in large codebases
  • Validate AI-generated pull requests for redundant logic

dupehound vs alternatives

dupehoundworktree-composeOctomindKushoAIQuash Bugs
Best forDetecting renamed duplicate code from AI agentsIsolating AI coding agentsSimplifying test creationAutomated API testingMobile UI and API testing
PricingOpen sourceFreeSubscriptionFreeFree
DevHunt upvotes419262022
LaunchedJun 2026Mar 2026Apr 2025Sep 2024Jan 2024

dupehound FAQ

Does dupehound require an internet connection?+

No, it runs offline and does not depend on any external services.

Can dupehound be used in CI pipelines?+

Yes, it includes a CI gate feature to block duplicate code during builds.

How does dupehound handle renamed copies?+

It fingerprints function structure, so renamed copies are still detected as duplicates.

Is dupehound deterministic?+

Yes, its detection results are deterministic across runs.

What languages does dupehound support?+

It uses tree-sitter queries; the repository shows support for multiple languages including Clojure, with ongoing additions.

Summarized by DevHunt from github.com · Sep 28, 2026. Details may change; check the official site.