{
  "markdown": "# data-liberation-agent\n\nLiberate any website into a complete, portable HTML site.\n\n## The problem\n\nClosed platforms make it hard to leave. Wix has no HTML export and caps RSS at 20 posts. JavaScript-rendered content and limited APIs leave your site locked inside.\n\n## The solution\n\nPoint it at a URL and get your site back as plain files:\n\n```bash\ndata-liberation https://example.com/\n```\n\nEvery retained route is liberated into a directory of HTML, CSS, media, and fonts, with references rewritten so navigation works locally. It runs on its own, and the command serves it so you can click through it immediately.\n\n**HTML is the contract.** The liberated site is the deliverable — not an intermediate format on the way to somewhere else, and not tied to any destination.\n\n**WordPress is one option, not the assumption.** If you want the site rebuilt in WordPress, the agent skills reconstruct it as editable blocks + WooCommerce or as a high-fidelity theme replica. That step is optional and runs after liberation, from the same local copy, without touching the network again.\n\n**Where to host WordPress**: If your current provider also offers WordPress, you can move to WordPress and stay with them. WordPress.com is another option: the $4/mo Personal plan now supports plugins and themes, and the [WordPress.com MCP integration](https://wordpress.com/blog/2026/03/20/ai-agent-manage-content/) gives AI agents direct write access.\n\n## Supported platforms\n\n| Platform | Status | Prompt |\n|---|---|---|\n| **GoDaddy Websites & Marketing** (pages/blog) | Ready | [`prompts/godaddy-wm.md`](./prompts/godaddy-wm.md) |\n| **Hostinger Website Builder** (blog/pages/products) | Ready | — |\n| **HubSpot** | Ready | — |\n| **Shopify** (blog/pages/products) | Ready | [`prompts/shopify.md`](./prompts/shopify.md) |\n| **Squarespace** | Ready | [`prompts/squarespace.md`](./prompts/squarespace.md) |\n| **Webflow** | Ready | [`prompts/webflow.md`](./prompts/webflow.md) |\n| **Weebly** (blog/pages/products) | Ready | — |\n| **Wix** | Ready | [`prompts/wix.md`](./prompts/wix.md) |\n| **Any other website** (generic fallback) | Best-effort | — |\n\nAll eight platforms have MCP adapters with full extraction support including products (exported as WooCommerce-compatible CSV). Sites matching none of them fall back to a generic `default` adapter that renders each page in a headless browser and extracts the main content, media, and any JSON-LD products — best-effort, since it can't key off platform-specific markup. GoDaddy Websites & Marketing is pages + blog only in v1; GoDaddy Online Store (OLS) product support is planned for v1.1.\n\n### Custom platforms\n\nThe platform layer is a public, registration-based API — platform ids are open strings, and a consumer-defined platform registers, auto-detects, discovers routes, and applies source-specific liberation hooks without editing core. The generic fallback uses the same contract. See [Platform API](/docs/platform-api.md) for the contract, a runnable example (`docs/examples/custom-platform.mjs`), and the bundled MCP `DATA_LIBERATION_PLATFORMS` boot hook.\n\n## Getting started — agent-first\n\ndata-liberation-agent is also built to be driven by an AI agent. The front door is the `liberate` skill: detect the platform, inventory every page/post/product, liberate the whole site into portable HTML, and serve the result. If you then ask for WordPress, it reconstructs the site as an editable block theme or a high-fidelity replica and imports it into a local WordPress preview.\n\n> **Studio is only needed for the optional WordPress preview/import.** Liberating a site needs no WordPress at all. Install [Automattic Studio](https://developer.wordpress.com/studio/) before asking for a WordPress reconstruct.\n\n### Claude Code\n\nInstall from the marketplace:\n\n```bash\nclaude plugin marketplace add Automattic/data-liberation-agent\nclaude plugin install data-liberation@data-liberation\n```\n\nOr from a local checkout (for development on the plugin itself):\n\n```bash\ncd data-liberation-agent\nclaude plugin marketplace add .\nclaude plugin install data-liberation@data-liberation\n```\n\nThen, in Claude Code:\n\n```\n/liberate https://your-site.com\n```\n\nWhat you'll see: the agent detects the platform, inventories all pages/posts/products, pauses to confirm scope and estimated time, then extracts content and media. It then drives the design phase — clustering page layouts, building a responsive block theme that mirrors your source site's structure and visual style, and importing everything into Automattic Studio. When it finishes you get a local preview URL and a `run-report.json` summarizing what was built, what's faithful, and any gaps.\n\nThe result is a responsive, editable WordPress block theme — not a static copy.\n\nNote: the engine CLI / `siteToTheme` consumes static source directories; liberating an external dynamic site still starts with DLA's Playwright capture, which feeds captured SectionSpecs into the engine.\n\n### Codex\n\n```bash\ncd data-liberation-agent\ncodex\n```\n\nThe `.codex-plugin/plugin.json` and `.mcp.codex.json` register the MCP server and skills automatically (Codex does not expand `${CLAUDE_PLUGIN_ROOT}`, so it uses a plugin-root-relative config instead of `.mcp.json`). The `liberate` flow runs sequentially on Codex (the builder fan-out step degrades to a sequential loop).\n\nThen in Codex:\n\n```\n$liberate https://your-site.com\n```\n\n### Gemini CLI\n\n```bash\ncd data-liberation-agent\ngemini extension link .\n```\n\n### Any MCP client\n\nRun the MCP server over stdio:\n\n```bash\nnpx tsx src/mcp-server.ts\n\n# or\n\nnpm run mcp\n```\n\n> **First-time browser setup.** Extraction/capture uses Playwright's Chromium. It is no longer installed automatically on `npm install` — run it once explicitly:\n>\n> ```bash\n> npm run setup:browser\n> ```\n\nIt exposes MCP tools for deterministic capture and extract → QA → import workflows. The ones you'll call directly:\n\n`liberate_capture`, `liberate_detect`, `liberate_discover`, `liberate_inspect`, `liberate_extract`, `liberate_screenshot`, `liberate_status`, `liberate_qa`, `liberate_verify`, `liberate_setup`, and `liberate_import` — plus `liberate_paths` (resolve the output directory) and `liberate_probe` / `liberate_map_apis` (browser-based diagnostics). `liberate_capture` writes a canonical `artifact.json`, replayable `website/` tree, capture receipt, and diagnostics. The remaining tools drive the design/reconstruction phase and are orchestrated by the skills rather than called by hand. Full reference with parameters: [docs/mcp.md](./docs/mcp.md).\n\n## Output\n\nA successful run produces, in `~/data-liberation/<host>/` (the default for the `liberate` flow; set the `DLA_OUTPUT_DIR` environment variable to change it, or pass `outputDir` when calling the MCP tools — `liberate_paths` reports the resolved path):\n\n- `~/data-liberation/<host>/`\n   - `output.wxr` — WordPress eXtended RSS file, ready to import via WordPress Admin > Tools > Import\n   - `media/` — downloaded images and attachments with local paths rewritten in the WXR\n   - `redirect-map.json` — old platform paths mapped to new WordPress slugs\n   - `extraction-log.jsonl` — per-URL extraction log (atomic dedupe for resume)\n   - `session.json` — pipeline stage, captured opts, per-entity progress counters, and adapter pagination cursors\n   - `media-stubs.json` — per-asset download status so permanently-broken URLs stop retrying across resume runs\n   - `products.csv` — WooCommerce-compatible product CSV (if the site has e-commerce)\n   - `products.jsonl` — raw product data streamed during extraction\n\n## Screenshots & design tokens\n\nThe `liberate` flow captures, for every URL, full-page + scrolled-state screenshots (desktop 1440×900 and mobile 390×844), the rendered HTML, and site-wide design tokens — used by the reconstruction phase and handy for feeding AI design-system tools. Via raw MCP this is the `liberate_screenshot` tool (or `screenshots: true` on `liberate_extract`).\n\nArtifacts land under the output directory:\n\n- `screenshots/{desktop,mobile}/<slug>.png` (plus `.scrolled.png` post-scroll variants)\n- `html/<slug>.html` — rendered HTML per URL\n- `screenshots/manifest.json` — the URL → files join table\n- `palette.json`, `typography.json`, `breakpoints.json` — aggregated per-site design tokens\n\nThe join back to `output.wxr` and `products.jsonl` happens on the filesystem via `manifest.json`, keyed by URL — nothing is written into WordPress postmeta.\n\n## Additional documentation\n\n* [How it works](/docs/how-it-works.md)\n* [Platform API — custom platforms](/docs/platform-api.md)\n* [AI agent commands](/docs/commands.md)\n* [AI skills](/docs/skills.md)\n* [MCP server tools](/docs/mcp.md)\n* [Wix authenticated content endpoints](/docs/wix-content-endpoints.md) — reference of the ten load-bearing content endpoints behind Wix's editor / dashboard auth\n\n## Related\n\n- [WordPress Data Liberation project](https://wordpress.org/data-liberation/) — the official effort\n- [WordPress.com MCP](https://wordpress.com/blog/2026/03/20/ai-agent-manage-content/) — AI agent write access to WordPress.com\n\n## Troubleshooting the preview\n\nPreview and import require [Automattic Studio](https://developer.wordpress.com/studio/) — install the app first (the `studio` CLI ships with it). Studio sites are persistent and named after the output directory's domain slug (`example-com`, `example-com-2` on collision).\n\n**\"Studio not found\"** — the `studio` CLI is not on PATH. Install Studio from https://developer.wordpress.com/studio/ and relaunch the terminal so the PATH update takes effect.\n\n**\"Studio create-site fails\"** — out of disk, port conflict, or Studio config corruption. The error message includes the underlying CLI output. If it's a port conflict, retry. If the Studio config is corrupt, reinstalling Studio fixes it.\n\n**Preview is not a secure environment.** Studio sites auto-log in as `admin`/`password` and bind to `localhost`. Do not paste secrets into them.\n",
  "bytes": 9941,
  "sha": "a0a59f5324e0c0dccb9a48688ccd22b446721ec5f3cad69a540345410135d608",
  "repo_slug": "automattic/data-liberation-agent",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_automattic_data_liberation_agent_907e6de8/readme"
}