dittu

v0.3.0
io.github.Manish-Tamang/dittu Checked 4 days ago Published 1 month ago

Clone any website's frontend into Next.js or Astro and verify it with pixel diffs.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

clone_website Clone website frontend

Clone a website's frontend (markup, original CSS, fonts, images, scroll animations) into a static preview plus Next.js and Astro projects, then score it against the original with pixel diffs at desktop and mobile widths. Takes ~1 minute per page (several minutes with build=true). Returns output paths and scores (percent identical).

ParameterTypeDescription
url *stringPage to clone, e.g. https://gole.codes
buildbooleanAlso npm install + build + score the generated apps (slow, default false)
frameworksarrayProjects to generate (default next + astro)
outDirstringOutput directory (default ./dittu-out/<host>)
pagesintegerCrawl up to n same-site pages (default 1)
removearrayCSS selectors to drop (cookie banners, chat widgets)
stylingstringcss keeps the original stylesheet (default); tailwind converts class rules to Tailwind utilities wherever that renders identically and keeps the rest as CSS
verifybooleanScore the clone against the original (default true)
waitMsintegerExtra wait after load in ms

verify_clone Verify a clone

Re-score an existing clone against the original site (e.g. after refactoring the generated components). Use targets ["next"] or ["astro"] to build and score a generated project. A score drop means the refactor changed rendering.

ParameterTypeDescription
outDir *stringOutput directory of a previous clone
targetsarrayWhat to score (default preview)
widthsarrayViewport widths (default 1440, 390)

read_report Read clone report

Manifest and latest scores of a clone: pages, targets, per-width scores, diff image paths, worst regions.

ParameterTypeDescription
outDir *stringOutput directory of a previous clone