# Share a jscpd Duplication Report — Copy-Paste Findings on a Link

Canonical: https://commareports.com/share-jscpd-report
Published: 2026-09-01

> jscpd's HTML reporter writes a browsable duplication report. Publish it to Comma so the refactor conversation happens on the clones themselves, with a revision per run to show the trend.

# Share a jscpd report

Duplication metrics have a credibility problem. The number goes up,
someone says "we should fix that," and nothing happens — because the
number is not actionable and the report that *is* actionable lives in a
CI artifact nobody opens.

The actionable part is the clone pair: these forty lines and those forty
lines. Looking at a specific pair, a reviewer can say in ten seconds
whether it should be extracted or left alone. That is a decision worth
recording somewhere it will be found again.

## Publish it

```bash
npx jscpd src --reporters html --output ./jscpd-report || true

curl -fsS -X PATCH \
  "https://commareports.com/api/v1/reports/$COMMA_REPORT_ID" \
  -H "Authorization: Bearer $COMMA_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d "$(jq -n --rawfile html ./jscpd-report/html/index.html \
        --arg title "Duplication — $REPO — $(date +%F)" \
        '{title: $title, html: $html}')"
```

Or drag the report directory into [the app](https://commareports.com/) so
the per-file pages upload alongside the index.

`|| true` because jscpd exits non-zero over a configured threshold, and
the run that breaches the threshold is the one to publish.

## What the URL changes

- **Verdicts on clone pairs.** "Deliberate — the generated clients
  diverge next quarter" pinned to the pair, still there next run. See
  [commenting on HTML](/comment-on-html).
- **A trend, not a number.** Revision per run at one URL. See
  [revisions and diffs](/share-html-report).
- **A tech-debt conversation with a location.** Refactor planning
  usually founders on not having a shared artifact; this is one.
- **On a schedule.** A [routine](/docs/routines) refreshes it weekly, so
  the drift is visible without anyone remembering to look.

## Limits

- **Entry HTML: 5 MB.** Assets: 25 MB per file, **250 MB and 500 files
  total**. A large monorepo report can pass 500 files — scope jscpd to a
  package per report when it does.
- **Scripts run, sandboxed**: `allow-scripts`, no `allow-same-origin`.
- **60 requests/minute per token.**

## Try it

Comma is free — unlimited reports, unlimited commenters, unlimited
revision history.

**[Create your first report →](https://commareports.com/)**

### Related

- [Dependency-cruiser graphs](/share-dependency-cruiser-report) — the other structural view
- [ESLint reports](/share-eslint-report) · [SonarQube](/share-sonarqube-report)
- [Weekly digests](/features/routines/weekly-analytics-digest) · [Publish from CI](/docs/ci)
