Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.fallow.tools/llms.txt

Use this file to discover all available pages before exploring further.

Fallow replaces jscpd with a faster, more capable duplication engine. It also covers unused code detection, complexity analysis, circular dependencies, and architecture boundaries in the same binary.

Migration workflow

1

Preview the migration

Run fallow migrate --dry-run to see the generated config without writing anything:
fallow migrate --dry-run
Fallow searches for .jscpd.json and the jscpd field in package.json.
2

Generate the config

Once you’re happy with the preview, run the migration:
fallow migrate            # Write .fallowrc.json
fallow migrate --toml     # Or output as fallow.toml
3

Review the config

Open the generated config and verify the translated thresholds, token counts, and ignore patterns.
4

Run fallow dupes

Run your first duplication analysis:
fallow dupes
The default mild mode normalizes syntax variations and may flag more clones than jscpd did. For results closest to jscpd’s exact token matching, use --mode strict.

What gets migrated

jscpdfallow
thresholdduplicates.threshold
minTokensduplicates.minTokens
minLinesduplicates.minLines
ignoreignorePatterns
format— (fallow auto-detects languages)

Comparison

fallowjscpd
Speed (real-world)8—26x fasterBaseline
Detection modes4 (strict, mild, weak, semantic)1 (token-based)
AlgorithmSuffix array with LCPRabin-Karp rolling hash
Unused code + circular depsBuilt-in (fallow dead-code)Not included
Complexity + maintainabilityBuilt-in (fallow health)Not included
Clone familiesYes, with refactoring suggestionsNo
Cross-languageTS to JS type strippingFormat-based
Baseline trackingYesNo
Runtime dependencyNoneNode.js

Detection mode mapping

jscpd uses a single token-based detection mode. The closest fallow equivalent is strict, which performs exact token matching. Fallow defaults to mild mode, which normalizes syntax variations and may flag more clones than jscpd did. To match jscpd’s behavior more closely, use strict mode:
fallow dupes --mode strict
For broader matching that catches renamed variables:
fallow dupes --mode semantic

One tool for the full picture

Fallow covers unused code, duplication, complexity hotspots, circular dependencies, and architecture boundaries in a single binary. It replaces jscpd, knip, and madge.
fallow dead-code    # Unused code + circular deps + boundaries
fallow dupes        # Code duplication (replaces jscpd)
fallow health       # Complexity hotspots + maintainability scores
fallow              # All of the above in one pass

See also

Duplication analysis

Deep dive into fallow’s duplication detection engine.

fallow dupes

Full CLI reference for the dupes command.