Getting Started
Find duplicate code, see what to remove first, and help your coding agent reuse existing code. Deslop updates as you type. Your editor and coding agents read the same live analysis across C, C#, Rust, Python, Dart, JavaScript, TypeScript, PHP, F#, Go and Osprey.
Start with the VS Code extension. One install includes live editor warnings, MCP checks for coding agents, and the CLI.
Read the English transcript
Open Deslop in VS Code
I open the Extensions view and find Deslop. This is the extension that adds the duplicate-code panel to VS Code. With it installed, I open this small project so we can review one finding from beginning to end.
Open a finding
The Deslop panel lists the repeated code it found in this project. I click one finding to open its details. The file links tell me where the copies live, so I can go straight to the code instead of searching through folders.
Visit both copies
I open the first file, then the second one. Deslop takes me to the relevant lines in each file. I read the code around the highlighted section too, because two similar pieces of code may still be used in different ways.
Compare before editing
I use Compare to put the two copies side by side. Now I can see what stayed the same and what changed. This gives me a useful starting point for a cleanup, while I still decide which behavior the project needs.
Install the VS Code extension
Install from the VS Code Marketplace:
- In VS Code: open Extensions (
⇧⌘X/Ctrl+Shift+X), search Deslop, click Install. - Command line:
code --install-extension nimblesite.deslop-live - Browser: open the Deslop.live Marketplace page and hit Install.
Then open a supported source file (.cs, .rs, .py, .dart, .js, .mjs, .cjs, .jsx, .ts, .tsx, .php, .fs, .fsx, .go, .c, .h, or .osp). The live bubble is active immediately, and the Top Offenders tree populates as the file watcher fires.
The extension bundles native binaries for darwin-arm64, darwin-x64, linux-x64, linux-arm64, and win32-x64 — the right one is selected for you automatically.
Offline or air-gapped? Grab the
.vsixfrom the Releases page or the latest GitHub release, then install it via Extensions panel →…menu → Install from VSIX….
Install the CLI only (Homebrew / Scoop / curl)
macOS / Linux (Homebrew)
brew install nimblesite/tap/deslop
deslop --version
Tap source: github.com/Nimblesite/homebrew-tap.
Windows (Scoop)
scoop bucket add nimblesite https://github.com/Nimblesite/scoop-bucket
scoop install deslop
deslop --version
Bucket source: github.com/Nimblesite/scoop-bucket.
macOS / Linux (curl)
No Homebrew? Run the install script. It downloads the latest release for your platform, checks its SHA-256 checksum, and installs deslop, deslop-lsp and deslop-mcp into /usr/local/bin (it asks for sudo). If the download or the check fails, nothing is installed.
curl -fsSL https://raw.githubusercontent.com/Nimblesite/Deslop/main/install.sh | bash
To install without sudo, run export DESLOP_INSTALL_DIR=~/.local/bin first and make sure that folder is on your PATH. To install a specific version, run export DESLOP_TAG=vX.Y.Z first.
Direct download
Grab the per-platform archive from the Releases page or the latest GitHub release, then drop the binaries on your PATH.
Run the CLI
deslop .
That scans the current directory, writes three reports, and prints the top clusters to your terminal. Everything Deslop writes goes into one .deslop/ directory at the root of the scanned project — add .deslop/ to your .gitignore and you are done:
.deslop/
deslop-report.json # canonical, agent-consumable
deslop-report.txt # line-oriented plain text
deslop-report.html # standalone, human-readable
logs/ # timestamped run logs
cache/ # fingerprints and embeddings; safe to delete
--output <prefix> sends the reports (and their logs) somewhere else instead.
Tune the threshold
Default minimum AST node count is chosen so trivial getters do not pollute the top of the report. Override per-run:
deslop . --min-nodes 20
Raise it for large codebases where you only want major duplication. Lower it when hunting micro-patterns.
Enable semantic detection — same behavior, different code (Type-4)
Structural and token passes are deterministic and run without network. Same-behavior matches (Type-4) — same behaviour, different syntax — require embeddings. Embeddings are off by default:
deslop . --embeddings auto
auto probes the local Ollama provider and falls back with a warning if it's unreachable. Use --embeddings required to hard-fail when the provider can't be contacted. The default model is nomic-embed-text; any Ollama embedding model selectable via --embedding-model.
See How It Works for the fusion math.
Exclude noise
Generated code and build outputs are filtered by default. Add .deslop.toml only for project-specific dependencies, migrations, or training-set code:
[defaults]
exclude = [
"**/bin/**",
"**/obj/**",
"**/node_modules/**",
"**/target/**",
"**/*.Designer.cs",
]
report_hide = [
"**/*.g.cs",
]
exclude skips parsing entirely. report_hide parses but omits from the final ranking — useful for training-set code you still want in the cache.
Gate CI on a duplication threshold
By default deslop exits 0 no matter how much duplication it finds — it reports, it does not judge, so it never breaks a build you did not ask it to gate. Opt into a gate and it exits 3 (failing the build) when repo-wide duplication crosses your ceiling. Pass a flag for a one-off, or commit the ceiling so local runs, CI, and agents all share one number:
deslop . --fail-over 5.0 # exit 3 if more than 5% of analysed LOC is duplicated
# .deslop.toml
[threshold]
max_duplication_percent = 5.0
--fail-over overrides the config key; --fail-over 0 fails on any duplication; --no-fail-over clears the gate for a single local run. The full exit-code table is in the configuration reference, and the GitHub Action wraps the same gate for CI.