# Slopo

A command-line tool that uses code-embedding models to find near-duplicate implementations across a codebase, catching similar-but-not-identical logic that coding agents and reviewers tend to miss.

Slopo uses embedding models, the kind normally used to match differently worded text with similar meaning, applied instead to source code, to find the hardest-to-detect kind of duplication: a different implementation of the same logic rather than copy-pasted code. It can compare a recent set of Git changes against the rest of the codebase, or analyze an entire codebase at once, and supports Python, TypeScript, TSX, JavaScript, Java, Kotlin, C, C++, C#, Go, Rust, PHP, Elixir, Ruby, and Swift.

The problem grows with scale: a coding agent working on a small, well-organized change can usually spot related code through references and naming, but on a large change in a messy codebase it is more likely to reimplement something that already exists. Feeding an agent a report of already-found duplicates ahead of time avoids spending its own tokens rediscovering them.

It is a command-line tool written in Python.

Website: https://slopo.dev
