diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..0ded477 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,205 @@ +# Agent notes for local-page-archiver + +## Project overview + +This tool renders web pages in Chromium (via Playwright) and saves them as fully self-contained HTML files. All external assets (images, fonts, stylesheets) are inlined as data URIs so the resulting file works offline. + +The pipeline is: + +``` +URL ──► Playwright render ──► inject privacy filters ──► inline assets ──► write HTML +``` + +## Source layout + +- `src/cli.mjs` — CLI entrypoint. Supports `archive` and `help`. Accepts `--archive-path`, `--id`, and `--headful` flags. +- `src/archiver.mjs` — Core archiving logic. Loads privacy filters, steers the browser, injects adblockers/userscripts, and calls the inliner. +- `src/asset-inliner.mjs` — Fetches and inlines external resources (images, CSS, iframes). Also strips `