DominaresTools

All tools / Web & documents

pagepatch

Let an AI edit a live web page through small, checkable edits instead of rewriting the file.

Buy pagepatch for $99

One payment of $99, plus sales tax where it applies, and every future update. Delivered as a private GitHub repository you're invited to.

Where it comes from. Extracted from the website editor of the platform Lina is built on.

See it work

pagepatch 1.1.2real run
cat edits.txt
[HTML_SET_TEXT selector="#hero h1"]Fresh bread, daily.[/HTML_SET_TEXT]
[CSS_OVERRIDE].nav-order { background: #0a7d4f; }[/CSS_OVERRIDE]
[HTML_SET_TEXT selector="h2"]Opening hours[/HTML_SET_TEXT]
[HTML_DELETE selector=".promo-banner"][/HTML_DELETE]

pagepatch apply page.html edits.txt -o new.html
ok   html_set_text #hero h1: Set text on 1 element (#hero h1)
ok   css_override: Applied CSS override
FAIL html_set_text h2: selector matched 3 elements, so nothing was edited: use the unique selector for the one you mean (offered below), or add all="true" to edit every one
     try: #menu h2, #hours h2, #contact h2
FAIL html_delete .promo-banner: selector matched 0 elements
     try: .topbar, .btn-primary, #main-content, .band, .brand, .price
Real output of pagepatch 1.1.2, run on 2026-10-05 on the shipped example page and four edits of the kind a model writes; two of them are wrong on purpose.

What it does

pagepatch sits between a model's reply and your saved page. The model writes small edits, pagepatch applies each on its own, refuses the unsafe ones, checks the rest landed and tells the model exactly what to fix. A second mode, fill, puts data from a JSON file into the parts of a hand-made page you mark, byte for byte, and refuses any write that changes anything else.

A small edit language
Nine directives a model can follow, with a parser that survives code fences, missing closers and awkward selectors.
Each edit stands on its own
Good edits are kept when others fail. A selector that matches nothing comes back with the closest real selectors, so the model corrects itself in one round.
The wrong element is never edited
When a selector matches several elements, nothing changes, and you get one selector per match.
Unsafe markup refused
Scripts, event handlers, javascript: URLs, frames and CSS that would freeze or blank the page are stripped or refused.
Checks that the change landed
Checks built from each edit run without a browser, or in one with the included verifier.
Works with any model
propose(llm, html, instruction) runs the loop. llm is any function from prompt to reply; there is no vendor SDK.
Fill a page from data, byte for byte
pagepatch fill puts data from a JSON spec into the regions and elements you mark. Only the marked bytes change: the doctype, whitespace, inline scripts and styles and CRLF line endings stay as you wrote them.
An outside-bytes guard
A second check, computed from the spec, refuses any write that changes anything outside the marked parts. Attribute writes that would add event handlers or script URLs are refused, region markup is trusted unless you pass --sanitize, and js_json makes data safe inside a script.
Hand edits are respected
With --state, a part someone edited since the last sync is skipped, and, with --today, dated rows and regions outside their active_from and active_until window are dropped or cleared.
Mark a page, and merge into a new template
pagepatch mark adds the markers by CSS selector, all or nothing. pagepatch merge carries a live page's regions and overrides into a new template and refuses to drop visible text.

What you get

pagepatch 1.1.2: the Python engine, the pagepatch command (apply, map, fill, mark, merge and check) and a browser verifier, with 983 automated tests.

A commercial license. Use it and change it in your own projects and your clients' projects. Don't share or resell the source. Read the license.

Every update. New versions land in the same repository; git pull to get them.

Requirements

Python 3.10 or newer. Installs BeautifulSoup and soupsieve. No AI vendor SDK is needed.

How buying works

  1. Enter your GitHub username. You'll see the account before you pay, so you can check it's yours.
  2. Pay $99, plus any sales tax shown at checkout, on Stripe's checkout page.
  3. Accept the invitation GitHub emails you. Signed in as that account, you'll also find it at github.com/dominares-tools/pagepatch/invitations. Invitations expire after 7 days; you can get a new one any time.
  4. Clone and install:
    git clone https://github.com/dominares-tools/pagepatch.git

    Private repo: sign in to GitHub on this computer first. Run gh auth login and choose HTTPS, or give git a personal access token when it asks for a password. To use an SSH key instead, clone git@github.com:dominares-tools/pagepatch.git.

    python3 -m venv .venv && . .venv/bin/activate
    pip install ./pagepatch

Questions

Do I need GitHub?

Yes. Access is a read-only invitation to a private repository, sent to the GitHub account you choose.

Can I get a refund?

Yes, within 14 days, no questions asked. Access ends when the refund goes through. Refund policy.

Who takes the payment?

Payments are handled by Stripe, which works out sales tax. Your receipt and card statement show Link (LINK.COM*), Stripe's checkout service.

Something wrong?

Email support@dominares.org. Every buyer of a tool shares its repository, so support happens by email rather than in GitHub issues.