Skip to content
NimblesitePublic

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

75 stars

Watchers

0 watching

Forks

Use this GitHub action with your project
Add this Action to an existing workflow or create a new one
View on Marketplace

Latest commit

 

History

148 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deslop

Clean up the duplicate code in your repo, and stop your coding agents from writing more.

Deslop finds duplicate code across a codebase and ranks it worst first, so the cleanup that matters most comes first. While you or Claude Code, Cursor or GitHub Copilot edit, it flags new code that copies something that already exists. It is an open-source alternative to jscpd that also runs live in the editor and inside the agent loop.

Install for VS Code · Add to GitHub Actions · Supported languages · Documentation

Deslop showing a duplicate cluster, its two locations and canonical comparison actions.

Clean up what's there

  • VS Code: install from the Marketplace and open your repo. Top Offenders lists the clusters to remove, and each copy can be diffed against the canonical one before you refactor.
  • JetBrains: install the plugin zip from the latest release from disk, with LSP4IJ. It is not on the JetBrains Marketplace yet.
  • CLI: brew install nimblesite/tap/deslop, or on Windows scoop bucket add nimblesite https://github.com/Nimblesite/scoop-bucket then scoop install deslop. Without Homebrew on macOS or Linux, run install.sh: curl -fsSL https://raw.githubusercontent.com/Nimblesite/Deslop/main/install.sh | bash.
deslop                         # scan the current directory
deslop . --output ./report     # write report.json, report.txt, report.html

Configuration lives in .deslop.toml (reference).

Stop new duplicates

Coding agents. The VS Code extension bundles deslop-mcp. Point your agent at it, then add the Deslop agent instruction to your repo so the agent calls find-similar before writing a function, helper or test setup. Setup for each client: AI integration.

CI. Fail the build when duplication goes over a ceiling:

- uses: actions/checkout@v4
- uses: Nimblesite/Deslop@vX.Y.Z   # the newest release tag
  with:
    fail-over: "5.0"               # fail above 5% duplicated lines

Anywhere else, run deslop . --fail-over 5.0. It exits with code 3 when the ceiling is breached and still writes the reports. For pre-commit or prek, install the CLI and add:

repos:
  - repo: https://github.com/Nimblesite/Deslop
    rev: vX.Y.Z
    hooks:
      - id: deslop
        args: ["--fail-over", "5.0"]

How it compares

Deslop parses code with tree-sitter and compares syntax trees, not token streams. That lets it report copies with renamed identifiers, changed literals or inserted statements as well as exact ones. Optional local embeddings through Ollama add copies that behave the same but read differently.

Accuracy is checked against judged clone registers: pairs from pinned open-source repositories that a reviewer has marked as real copies or not copies. Accuracy Transparency explains the scoring. No head-to-head benchmark against jscpd or other detectors has been published, so we make no claim that Deslop is more accurate than they are.

Developing Deslop

The engine is a Rust workspace under crates/. The VS Code client is in clients/vscode/ and the JetBrains client in clients/jetbrains/.

make ci      # build, lint and test everything, as CI does
make test    # fail-fast tests with coverage thresholds
make lint    # format and static analysis
  • Accuracy outranks features, languages, UI and performance. Read AGENTS.md before changing detection code.
  • Specs live in docs/specs/ and the code map in docs/repo-index.md.
  • The most useful contribution is a bug report with a reproduction, especially for inaccurate results. Code contributions are restricted while we audit for accuracy: see CONTRIBUTING.md.

License

MIT © NIMBLESITE PTY LTD.

About

No description, website, or topics provided.

Resources

Contributing

Security policy

Stars

75 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages