AI Briefing
KO

Show HN: A CLI tool that detects inexact code duplication using embedding models

·2026.07.02 23:19

Key point

Slopo, a CLI tool that leverages embedding models to analyze semantic similarity in code and find duplication, has been released.

Details

Slopo is a lightweight CLI tool that goes beyond simple text matching, using Embedding Models to analyze the semantic similarity of code. It specializes in detecting similar code snippets scattered across different modules or files—something existing tools struggle to find.

Key Features and How It Works:

  • Embedding-based Detection: Computes embeddings for each code unit and identifies pairs of code that are close together in vector space.
  • AI Agent Collaboration: Supports a workflow where detected clusters of similar code are fed as input to an AI coding agent, which then verifies actual duplication and performs refactoring.
  • Broad Language Support: Supports Python, TypeScript, JavaScript, Java, Kotlin, C#, Go, and Rust.
  • Flexible Model Selection: Compatible with LiteLLM, allowing the use of APIs from various embedding model providers, including Voyage AI.

Workflow: Users index their code with slopo index, then generate an analysis report via slopo embed and analyze. After the analysis results are reviewed by an AI agent, code confirmed to be duplicated is classified as a refactoring target.

This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.

Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.