Show HN: CLI tool for detecting non-exact code duplication with embedding models
- AI
- Developer Tools
- Programming
- Open Source
Slopo is a CLI tool for scanning a codebase and surfacing similar code using embeddings rather than exact-match clone detection. It works at the function or method level today, strips comments, embeds each extracted unit, and boosts matches that are far apart in the codebase so it can find the kind of duplication that is easy to miss during normal maintenance. The author framed it as a tool for catching semantically similar code written by humans or coding agents, where some hits will be false positives but the real matches can point to refactors or outright bugs.
If you want to use embeddings for code deduplication, treat them as a candidate generator, not the final judge. The practical work is in choosing the right unit of analysis and adding a second validation step, whether that is AST-based scoring or an LLM review in your workflow.
- github.com
- Discuss on HN