Find duplicate code across your codebase.
Find repeated code, compare the copies, and see what to remove first. Live in VS Code and connected to your coding agent.
One extension bundles live editor warnings, MCP checks for coding agents, and the CLI.
-
01 · Find
Worst offenders first
The highest-impact duplicate-code clusters stay at the top.
-
02 · Inspect
Every copy in context
Open the cluster to review its locations and canonical copy.
-
03 · Compare
Canonical comparison
Review both copies side by side before you refactor.
Find duplicate code in C#, Python, Rust, TypeScript, Go and more.
Duplicate code is the same logic written more than once, even when names and literals differ. Deslop parses every file into a syntax tree, so it still finds the copy after every variable is renamed. It also tells Claude Code, Cursor and other coding agents when similar code already exists, before they write another copy.
- Osprey .osp .ospml
- C# .cs
- Rust .rs
- Python .py
- Dart .dart
- JavaScript .js .mjs .cjs .jsx
- TypeScript .ts
- TSX .tsx
- F# .fs .fsx
- PHP .php
- Go .go
- C .c .h
orders.pydef order_total(orders, tax_rate):
subtotal = sum(order.price * order.quantity for order in orders)
discount = subtotal * 0.1 if subtotal > 100 else 0
return round((subtotal - discount) * (1 + tax_rate), 2)
invoices.pydef invoice_total(lines, vat):
net = sum(line.cost * line.units for line in lines)
rebate = net * 0.2 if net > 500 else 0
return round((net - rebate) * (1 + vat), 2)
- Parse Each file becomes a syntax tree.
- Normalize Names and literals are erased.
- Match Same shape, same fingerprint.
- Rank Biggest duplicates first.
Deslop reports both functions as one cluster of two nearly identical copies.
Findings that ship.
-
Holy cow dude! My initial analysis of this tool, I am blown away and super excited.
Kevin Moore Product Manager for Dart & Flutter, Google @kevmoo · 2026-08-05 Merged into his own Dart packages the same day:
AMAZING! SUPER useful! wow! -
I gave Claude Code a hook it was about to write, and find-similar pointed it straight at the existing copy. That's the "don't write a third one" loop I want in every agent session.
John Kattenhorn Builds companies, teams and systems @johnjkattenhorn · 2026-11-14 Run on his 61k-line TypeScript and Python monorepo:
- 341 files in about 6 seconds, ranked worst first, with HTML, JSON and text reports.
- One response-handling block was copied across three API routes, and one data-polling hook was copied in two views. Both fold into a single function.
- It found something the plain scan couldn't: two versions of the same git helper in two different reporters, written in different styles.
Get Deslop in your editor.
Install the same extension from Visual Studio Marketplace or Open VSX.
-
Visual Studio Marketplace
VS Code · GitHub Codespaces
The full bundle — live bubble, LSP server, MCP server, and the deslop CLI — for VS Code and GitHub Codespaces.
-
Open VSX Registry
Cursor · Windsurf · VSCodium
The same extension for Cursor, Windsurf, VSCodium, Gitpod, and every Open VSX editor.
Built in the open.
Questions, bugs, and feature requests are welcome on Discord.
Join the Discord