dittu
v0.3.0Clone 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).
| Parameter | Type | Description |
|---|---|---|
url * | string | Page to clone, e.g. https://gole.codes |
build | boolean | Also npm install + build + score the generated apps (slow, default false) |
frameworks | array | Projects to generate (default next + astro) |
outDir | string | Output directory (default ./dittu-out/<host>) |
pages | integer | Crawl up to n same-site pages (default 1) |
remove | array | CSS selectors to drop (cookie banners, chat widgets) |
styling | string | css keeps the original stylesheet (default); tailwind converts class rules to Tailwind utilities wherever that renders identically and keeps the rest as CSS |
verify | boolean | Score the clone against the original (default true) |
waitMs | integer | Extra 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.
| Parameter | Type | Description |
|---|---|---|
outDir * | string | Output directory of a previous clone |
targets | array | What to score (default preview) |
widths | array | Viewport 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.
| Parameter | Type | Description |
|---|---|---|
outDir * | string | Output directory of a previous clone |