CLI tool for detecting non-exact code duplication with embedding models

Hacker NewsToolDevSource
0Sign in to voteCopy link

FL score

62

out of 100

Verdict

VALIDATE

medium confidence

Competition

No competitor data yet

Trend

No signal yet

A CLI tool that finds semantically similar code blocks developers didn't realize they duplicated.

The pain

Developers waste time maintaining duplicate logic scattered across codebases. Exact-match tools miss refactoring opportunities when the same logic is written slightly differently. Code reviews miss these duplicates. Technical debt compounds as similar bugs get fixed in multiple places.

The gap

Existing tools (grep, SonarQube, Semgrep) catch exact or near-exact duplication. They miss when the same algorithm is rewritten with different variable names, control flow, or minor logic variations. Embedding models can capture semantic similarity, but no simple CLI tool exists for this specific use case.

Build angle

Start with a focused CLI that integrates with git hooks or CI/CD pipelines. Target teams with large codebases (50k+ LOC) where duplicate logic costs real money. Charge per scan or per developer seat. Validate with 5-10 engineering teams first to confirm they'd pay for this versus free alternatives.

Strengths

  • Clear technical differentiation from existing tools
  • Embedding models are now accessible and cost-effective
  • Solves a real problem in large codebases
  • Low barrier to initial MVP (CLI + embedding API)
  • Measurable output (duplicate detection reports)

Risks

  • Embedding models produce false positives on unrelated code; tuning thresholds is hard
  • Existing tools (Semgrep, SonarQube) are entrenched and free/cheap; switching costs are high
  • Market size unclear: most teams tolerate code duplication; willingness to pay is unproven
  • Requires ongoing model maintenance and tuning as codebases evolve
  • Enterprise sales cycle is long; bootstrapping this is difficult

Questions about this idea?

FlyBot reads the scoring and gives you a second opinion on “CLI tool for detecting non-exact code duplication with embedding models”.

Open FlyBot