
dittu
io.github.Manish-TamangPublished by GitHub account Manish-Tamangv0.3.0Updated Oct 29, 2026
Clone any website's frontend into Next.js or Astro and verify it with pixel diffs.
Overview
Clones a website's rendered frontend into a Next.js or Astro project and scores the result with pixel diffs.
- What you can do
- Capture a live site in Chromium, including scroll reveals, lazy content and per-viewport layout
- Export the captured DOM, original CSS and downloaded assets as a static preview, a Next.js App Router project or an Astro project split into section components
- Crawl multiple pages and rewire internal links with shared header and footer components
- Verify a clone by screenshotting original and clone at desktop and mobile and reporting pixel-match scores with diff images
- When to use it
- Useful when you want to rebuild or migrate a marketing site, landing page, portfolio or docs site as an editable Next.js or Astro codebase, or need a design reference reproduced faithfully and checked for visual regressions after refactoring.
- Requirements
- Runs locally as an npm package via npx over stdio; a setup command registers the MCP server and skills for supported coding agents. Needs Chromium/Playwright, which may require installing system dependencies on Linux or WSL. No accounts, API keys or environment variables are declared.
Installation
In SourceWeft
- Open dittu in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
dittu: Clone Any Website
Turn any website into an editable Next.js or Astro project, verified pixel by pixel.
Layout, CSS, fonts, images and scroll animations. Not the backend. One CLI, one MCP server, and skills for your coding agent.
[npm version] [npm downloads] [CI] [License: MIT] [Node]
[GitHub stars] [GitHub forks] [GitHub issues] [Last commit]
[TypeScript] [Playwright] [Next.js] [Astro] [Tailwind CSS] [MCP]
Quick start
Set up your agent
Registers the dittu MCP server and installs the skills for every agent it
finds: Claude Code, Cursor, Gemini CLI, Codex. Check your machine first
with npx @manishtamang/dittu doctor (on Linux/WSL you may need
sudo npx playwright install-deps chromium).
Ask your agent
Clone https://gole.codes into Next.js and make the pricing cards a reusable component.
The agent calls clone_website, reads the scores, refactors the generated
components, and calls verify_clone to prove nothing visual changed.
Use the terminal
Update dittu
How dittu works
Most cloners screenshot a page and ask an LLM to redraw it. dittu copies what the browser actually rendered, then checks the result:
- Capture: Chromium loads the page, scrolls it so lazy content and scroll reveals fire, then freezes JS timers so carousels hold still. A second render at 390 px records layout that JS computes per viewport.
- Serialize the live DOM, not the server HTML. Next.js/React sites come out as their final markup without hydration scripts or RSC payloads. Nesting the HTML parser would restructure gets repaired, so React hydrates cleanly.
- Keep the original CSS in cascade order, including CSS-in-JS rules that exist only in the CSSOM. Media queries, hover states and keyframes keep working.
- Download every asset from the same session and rewrite URLs.
- Export to a static preview, a Next.js App Router project (JSX) and an Astro project, split into section components.
- Replay motion: recorded scroll reveals, Framer Motion
animatecalls and loops run again through a 2 KB runtime. - Verify: screenshot original and clone the same way at desktop and mobile
and score them.
--buildscores the built apps, not just the preview.
Details: docs/architecture.md.
What you can clone
Benchmarks
Methodology and limits: docs/fidelity.md.
FAQ
Does it copy the backend? No. Data fetching, auth, APIs and form handling are not copied. You get the frontend, ready to wire to your own logic.
Why is the generated JSX full of {" "}? Whitespace between inline elements
changes layout in HTML but is dropped by JSX. dittu keeps it explicit so the clone
renders identically. Refactor freely, and re-run verify to check.
Can I get Tailwind classes instead of CSS? Yes: --styling tailwind. Every
rule that can be expressed exactly becomes Tailwind utilities (sites built with
Tailwind v4 keep their own classes); the rest stays CSS, so scores don't drop.
See Tailwind output.
Is the 95% score honest? It's raw pixel identity over the full page, including height differences, at desktop and mobile. Diff images are saved next to the scores so you can check.
Can I clone any site I want? Technically mostly yes. Legally, see the disclaimer.
Documentation
Disclaimer
dittu is for learning, prototyping, design references and migrating sites you own. Cloning a site doesn't give you rights to its brand, copy, images or code. Read DISCLAIMER.md.
Related projects
ditto.site by ion-design takes the same capture-what-the-browser-rendered approach as a hosted API and MCP service. dittu differs by running as a local CLI, keeping the site's original CSS by default (Tailwind output is opt-in and only where it renders identically), exporting Astro alongside Next.js, and scoring every clone with pixel-diff verification.
Contributing
See CONTRIBUTING.md. Agents working in this repo: AGENTS.md.
License
Source: README.md at commit c595a04
Tools
0Version history
3- v0.3.0LatestOct 29, 2026
- v0.2.0Oct 25, 2026
- v0.1.0Oct 24, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts