Treepeat – Code similarity detection using Tree-sitter
Details
- External ID
- 49804359
- Source
- HN
- Company
- —
- Product
- Treepeat – Code similarity detection using Tree-sitter
- Website domain
- github.com
- Launched
- Sept. 22, 2026
- Cohort
- —
- Upvotes
- 70
- Upvotes percentile
- 0.8851674641148325
- Tags
- —
- Fetched at
- Sept. 26, 2026, 10:53 p.m.
- Updated at
- Sept. 26, 2026, 10:53 p.m.
Description
treepeat is a tool that finds similarities in your codebase.Find duplicate code blocks meaningful to the language (classes/functions), not just lines.Find near-duplicates: ignore whitespace, strings, high level AST nodes such as function and names.Find structurally similar code: anonymize identifiers, constants, etc.Pull requests welcome: This is very much an proof of concept - I'm happy with it, but I haven't supported very many languages at present.Languages supported: astro, bash, css, go, html, javascript, lua, markdown (plus codeblocks), python, sql, typescript, java, kotlin, rust, yaml
Enrichment
- Theme
- developer tools and programming utilities
- Vertical
- Horizontal
- Function
- Dev tools
- Audience
- Developer
- AI stance
- Not AI
- Project type
- Hobby / open-source project
- Normalized one-liner
- code similarity detector using tree-sitter
- Manually corrected
- False
Could you build this?
Yes Treepeat is an AST-based code similarity detector utilizing existing Tree-sitter bindings. A developer can build this with AI assistance by writing a CLI tool that parses code with Tree-sitter, normalizes node identifiers, and runs hash or rolling-hash comparisons across subtrees.
Discussion
3 comments analyzed.
Competitors mentioned: slopdex
Competitors
Other products that read as similar to this one — 77 launches clear the similarity bar, closest 8 shown.
Attention rank: #11 of 78 (itself plus its competitors, highest first — normalized so YC and Product Hunt are compared fairly).
Launched 287 days after the earliest competitor.
- CodeRLM · hn · 2026-02-11 · 81 upvotes · similarity 0.47
- CLI tool for detecting non-exact code duplication with embedding models · hn · 2026-07-02 · 91 upvotes · similarity 0.46
- Sqry · hn · 2026-03-06 · 5 upvotes · similarity 0.44
- Anyone interested in a tool helps to explore C++ ASTs · hn · 2026-05-21 · 49 upvotes · similarity 0.41
- Structural code grep across public GitHub repositories · hn · 2026-08-22 · 15 upvotes · similarity 0.41
- Leaves · hn · 2026-07-16 · 93 upvotes · similarity 0.39
- genpark-codebase-dead-code-unreachable-pruner-skill · github · 2026-09-27 · 7 upvotes · similarity 0.39
- genpark-agent-codebase-ast-dependency-slicer-skill · github · 2026-09-28 · 7 upvotes · similarity 0.39
Other launches for this product
- No other launches for this product.
Same idea, different domain
Nobody's really built a dev tools tool for Sales yet.