Live duplicate-code analysis

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.

  1. 01 · Find Worst offenders first

    The highest-impact duplicate-code clusters stay at the top.

  2. 02 · Inspect Every copy in context

    Open the cluster to review its locations and canonical copy.

  3. 03 · Compare Canonical comparison

    Review both copies side by side before you refactor.

Languages

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
Two functions, one duplicate
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)
  1. Parse Each file becomes a syntax tree.
  2. Normalize Names and literals are erased.
  3. Match Same shape, same fingerprint.
  4. Rank Biggest duplicates first.

Deslop reports both functions as one cluster of two nearly identical copies.

Field report

Findings that ship.

Install

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.

Community

Built in the open.

Questions, bugs, and feature requests are welcome on Discord.

Join the Discord