The HTML file that rewrites itself.

One .html file you open in any browser. Type into the lens at the bottom — the file rewrites itself in place. No server, no account, no build step.

Free. No sign-up. Works in any modern browser; saves in-place on Chromium, downloads elsewhere.

01

Get a fresh container

Download a blank .html, or import a markdown / PDF / docx you already have. One file, on disk, that you own.

02

Open it. Type into the lens.

The file loads, hydrates from its own snapshot, and shows the lens at the bottom. Type prose to append. Type a slash to issue a command. ⌘S writes the new state back to the same file.

Works with every agent

Two surfaces, no lock-in.

The agent loop inside the container is provider-agnostic. The skill that builds new containers is plain text — paste it into any agent that can author files.

Inside the container
OpenRouter — any model Local claude -p via bridge

Pick the backend in the container's settings panel. The runtime doesn't care which one produced the edits.

To build a rewritable from scratch
Claude Code Codex Cursor any agent with the skill

Paste the skill into your agent. It teaches the build flow (fetch /rewritable.html, splice your INLINE_DOC body), the window.runtime API, frozen-zone conventions, and the hard rules — then asks for what you want to build.

Download skill.zip ~5 KB · markdown · SKILL.md
$ npx rwa new                 # fresh blank container
$ npx rwa import notes.md     # convert md / html / csv / docx / pdf
$ npx rwa import scan.pdf --vision  # OCR via an OpenRouter vision model

See 20 examples — original vs. rewritable

Twenty single-file HTML pages, original on the left, the rewritable port on the right. Type ⌘K, change them yourself.

Questions

What is a rewritable?

A .html file that renders, stores, modifies, and exports itself. Open it in a browser — it runs. Type an instruction — it rewrites its own contents. Press ⌘S — it writes the new state back into the same file on disk.

The file is the database. The file is the runtime. The file is what you share.

Do I need an account?

No. Download a container, open it, use it. The only thing that needs credentials is the agent call — and that's an OpenRouter API key you paste into the container's own settings panel. It lives in sessionStorage and is never persisted to disk or sent anywhere except to the model.

What does the agent see when it edits?

Only the document. The bootstrap, the runtime, your API key, your other containers — none of that goes to the model. The agent receives the document text, the list of frozen-zone names, and your instruction. It returns an edit envelope (anchor-based (find, replace) pairs, or a structural DSL plan) that the runtime validates and applies atomically.

Failed edits leave the document untouched. There is no silent fallback.

Where is my data stored?

In two places: working state lives in the browser's IndexedDB, namespaced per container (so two rewritables open in the same browser never see each other). Durable state is the file itself — on commit, the runtime rewrites the file with an updated snapshot baked in.

No server holds your document. There is no cloud account.

Does it work offline?

Yes — except for the modify call to the model. Everything else (rendering, undo, commit, the lens, locked regions, the demo gallery if you've downloaded it) runs from the file. If you use the bridge backend with a local claude -p install, even modify works offline against whatever provider your claude CLI is configured for.

What about iOS Safari?

It works, but iOS Safari evicts IndexedDB aggressively under storage pressure or after a few days of inactivity. The exported .html on disk is the only durable artifact on iOS — commit often.

The runtime nudges you after a handful of uncommitted modifies and warns when storage usage climbs. Private/incognito mode shows a blocking banner rather than silently losing your work.

Can I lock parts of a document?

Yes. Wrap a region in class="rwa-locked" (or the comment-marker form <!-- rwa:frozen:begin name -->…<!-- rwa:frozen:end name -->) and the runtime refuses to anchor on it, refuses edits that overlap it, and refuses wholesale rewrites that would strip it.

The right surface for contract templates, tax forms, press releases — anything where part of the document is fixed and the rest is malleable.

What's the difference vs. Claude artifacts?

Artifacts live in a chat session. A rewritable is a file on your filesystem you opened directly — no app, no session, no provider. You can email it, USB-stick it, commit it to git. The recipient opens it and it runs, with your changes baked into the snapshot.

The model is also disposable: pick OpenRouter, swap providers, or use your local Claude subscription via the bridge. The container is the same in every case.

What's the difference vs. here.now or other hosting?

Hosting publishes a file to a URL. A rewritable is the file — and the file edits itself. The hosted-snapshot share at rewritable.ikangai.com/s/<code> exists for the moments you do want a URL, but the file on your disk remains the durable record.

Is it really one file? What does that cost me?

Yes — one self-contained .html, typically 50–200 KB. The cost is the constraints: no React, no npm, no build step, no frameworks. CSS inline, JS inline. CDN imports only when genuinely needed.

The reward is that the container behaves like a document instead of like an app — you can read it, edit it by hand, version-control it, send it as an attachment. The agent only sees the document; the runtime stays out of the prompt.