dcd
github.com
- Free plan
- macOS
- Linux
What dcd is
dcd is a free duplicate code detector for Linux and macOS that scans a project repository for repeated code. Its language-aware parsing through scc covers 250+ languages. The --fuzz option uses simhash distance to identify similar rather than identical lines, while gap tolerance can bridge inserted, deleted, or changed lines in matching blocks. A separate hole-size option allows modified lines within a duplicate diagonal match, and the --file option compares one file with the rest of the codebase. Results can be displayed as PBM scatter plots or self-contained interactive HTML reports containing file heatmaps and scatter plots. For automation, dcd can produce JSON output for use with other tools or CI pipelines. It supports .ignore files with .gitignore-style syntax and can skip marked code blocks. The project is licensed under the GNU Affero General Public License 3.0. Installation with go install requires Go 1.19 or newer. Release 1.1.0 removed Windows support for full filesystem compatibility and directs Windows users to WSL. Commercial users can purchase a year's priority support entitlement for direct email support from the developer; no price is listed.
Who it suits
dcd suits developers who want to locate duplicate code in repositories on Linux or macOS. Its JSON output can fit into CI pipelines, while Windows users are directed to WSL.
Good to know, and what to watch
- Language-aware parsing covers 250+ languages
- Fuzzy matching can find similar lines
- HTML reports include file heatmaps and scatter plots
- JSON output supports integration with CI pipelines
- Free under the GNU Affero General Public License 3.0
- Release 1.1.0 removed Windows support
- Installation requires Go 1.19 or newer
Plans
Every plan and pricePriority support
dcd
Free plan
Getting started
- Open the dcd GitHub website
- Use a Linux or macOS environment, or WSL on Windows
- Use Go 1.19 or newer to install dcd
- Run go install github.com/boyter/dcd@latest
- Configure matching, ignore, and output options for your repository
Limits to check
The free dcd plan is the AGPL-3.0 open-source project.
The Club's review
Overview
dcd is a free, open-source duplicate-code detector for repository scans. It suits developers and teams who want to tune how similar code must be to count as a match and feed scan results into other tools. Its strongest case is configurable analysis without a subscription; Windows users will need WSL.
Key features
dcd uses text-based clone detection, with language-aware parsing through scc across more than 250 languages. Its matching controls let teams look beyond identical copies: --fuzz uses simhash distance to compare similar lines, with values from 0 to 255. That range allows sensitivity to be adjusted, but teams need to choose a threshold that fits their tolerance for variation.
--gap-tolerance bridges inserted, deleted, or modified lines in otherwise matching blocks. --max-hole-size permits modified lines within a duplicate diagonal match. These controls are useful when code has diverged through edits, although they add choices that users must set with care. For a focused investigation, --file compares one file against the rest of the codebase.
Output options include PBM scatter plots and self-contained interactive HTML reports with file heatmaps and scatter plots. The HTML reports give reviewers a visual way to inspect duplication, while --format json makes results suitable for other tools and CI pipelines. dcd supports CI integration, but it has no IDE integration, so it fits automated scans and separate review workflows better than in-editor feedback.
Ignore files follow .gitignore syntax, and dcd can also ignore marked code blocks. That gives teams a way to omit known or irrelevant regions from scans. Installation requires Go 1.19 or newer and uses go install github.com/boyter/dcd@latest. The project is licensed under the GNU Affero General Public License 3.0, a consideration for organizations assessing open-source obligations. Commercial users can purchase a year's priority support entitlement for direct email support from the developer.
Pricing
The dcd plan costs free under the AGPL-3.0 open-source license. It is the complete no-cost route for teams comfortable using the project under that license; there are no paid software tiers to compare.
Priority support has custom pricing and is billed for a year's worth of direct email support from the developer. It is intended for commercial users who want a priority support channel, rather than a different detection feature set.
Platforms
dcd supports Linux and macOS. Release 1.1.0 removed Windows support for full filesystem compatibility, so Windows users are directed to WSL rather than a native installation. That makes dcd a less direct fit for Windows-first teams.
Who it's for
dcd is a good fit for developers, maintainers, and IT teams that scan repositories, want control over near-duplicate matching, and can use JSON or visual reports in a separate review process. Its broad language-aware parsing and CI integration favor teams that need repeatable repository checks. It is less suitable for users who require native Windows support or IDE integration.
Pros and cons
- Pros: Adjustable fuzzy, gap, and hole matching gives teams several ways to capture code that has changed without being an exact copy.
- Pros: JSON output, interactive HTML reports, and CI integration support both automated workflows and visual review.
- Pros: Free use under AGPL-3.0 avoids a software subscription for teams able to work with that license.
- Cons: Windows support requires WSL, adding a setup step for Windows users.
- Cons: Go 1.19 or newer is required for installation, and there is no IDE integration for in-editor results.
Alternatives
For a broader comparison, see the Code Clone Detection Tools list. Simian Similarity Analyzer is another free option for Linux, macOS, and Windows, under Apache License 2.0. CloneWorks is free on Linux, macOS, and Windows, but its terms require acknowledgement and prohibit charges for use, redistribution, or derivatives. Duplo is a free alternative for Linux, macOS, and Windows, with prebuilt binaries and GNU GPL v2 or later licensing.
PMD is a free, BSD-style static code analyzer for Linux, macOS, self-hosted environments, and Windows. CCFinderSW is a free, MIT-licensed Windows option that requires Java Runtime Environment 8 or later. jscpd is a free alternative for API, Linux, macOS, self-hosted, and Windows use. CodeMatch has a free plan and a free trial, and is available for Windows; its overall pricing model is paid. Algo VPN is a free, self-hosted VPN setup tool rather than a duplicate-code detector, so it serves a different need.
Verdict
Choose dcd if you need a free repository scanner with adjustable matching, CI-friendly JSON output, and visual reports, and your team can work with its license and installation requirements. Look elsewhere if native Windows or IDE integration is essential; WSL is the Windows path, and dcd does not provide in-editor analysis.
The verdict
dcd offers configurable duplicate-code matching and several output formats for repository scans. Windows users need WSL, and installation requires Go 1.19 or newer.
Questions people ask
What does dcd detect?
It identifies duplicate code within a project or repository, including similar lines when fuzzy matching is enabled.
Which operating systems are supported?
dcd supports Linux and macOS. Release 1.1.0 directs Windows users to WSL.
How is dcd licensed?
The project uses the GNU Affero General Public License 3.0.
Can dcd integrate with CI pipelines?
Yes. The --format json option produces structured output for other tools or CI pipelines.
What the maker publishes
- Commercial support
- Commercial users can purchase a year's priority support entitlement for direct email support from the developer. source
- Fuzzy matching
- The --fuzz option uses simhash distance to match similar but non-identical lines, with values from 0 to 255. source
- Gap tolerance
- The --gap-tolerance option bridges inserted, deleted, or modified lines in otherwise matching duplicate blocks. source
- Hole tolerance
- The --max-hole-size option allows modified lines within a duplicate diagonal match. source
- Ignore support
- dcd supports .ignore files using the same syntax as .gitignore files and can ignore marked code blocks. source
- Installation
- Users with Go 1.19 or newer can install dcd with go install github.com/boyter/dcd@latest. source
- Language coverage
- The comparison table says dcd provides language-aware parsing via scc for 250+ languages. source
- License
- The project is licensed under the GNU Affero General Public License 3.0. source
- Maker background
- Ben Boyter describes himself as a professional software engineer with more than 15 years of development experience focused on testing. source
- Purpose
- dcd is a duplicate code detector designed to identify duplicate code within a project. source
- Release limitation
- Release 1.1.0 removed Windows support for full filesystem compatibility and directs Windows users to WSL. source
- Single-file comparison
- The --file option compares one file against the rest of the codebase. source
- Structured output
- The --format json option produces structured JSON output for integration with other tools or CI pipelines. source
- Visualizations
- dcd can generate PBM scatter plots and self-contained interactive HTML reports with file heatmaps and scatter plots. source
Checked against the maker's pages on 30 Sept 2026.