
T
Treepeat
Open Source๐ Alt to SonarQubeDetect deep structural code duplication using Tree-sitter ASTs
๐ณ Self-Hostable๐ No Sign-upโก Traction Score: 76/100โ
52 Stars
cargo install treepeatTreepeat analyzes abstract syntax trees across codebases to uncover structural code duplication and similarity patterns. By leveraging Tree-sitter parsers, it successfully ignores superficial formatting differences to flag deeply nested copy-paste anomalies.
Utilizes robust Tree-sitter parsers for multi-language AST extraction and structural comparison.
Ignores variable renaming, whitespace changes, and formatting quirks to catch true logic duplication.
Detects structural similarity and copy-paste anomalies not just within a single repo, but across entire project portfolios.
Auditing large microservice architectures for copy-pasted boilerplate logic
Refactoring legacy codebases to extract shared internal libraries
Enforcing architectural guidelines and preventing duplicate domain implementations
Unlike enterprise tools like SonarQube, Treepeat provides a lightweight, focused AST-centric approach to structural similarity without heavyweight platform overhead.
Software architects and senior engineers responsible for codebase health and technical debt reduction across multiple repositories.
Compare other trending developer tools and open-source projects in this space.