Hand-off
Edityy does not write to your source code. It writes down what you changed, and your agent makes the change in the file, in the way your project already styles things.
Copy for an agent
The edits button in the dock lists every element that really changed. Select an element, or press the copy button, and the edits come out as Markdown.
# Visual edits from Edityy
Apply these edits to the source code. Change the code
that renders each element, in the styling approach
the project already uses.
## 1. Heading
- Selector: `h1.hero-title`
- Source: `src/App.tsx:12:7`
- `font-size`: `44px` → `52px`
- `color`: `#16233a` → `#2f5fa8`Each edit names its selector, its source line when the plugin knows it, and every value before and after. A comment you wrote about the element travels with it.
Save to project
Save to project sends the edits to the dev server, which writes them to .edityy/changes.json in your project root. The folder gets its own .gitignore, so pending edits never end up in a commit.
.edityy/changes.json
{
"version": 1,
"savedAt": "2026-10-06T09:30:00.000Z",
"page": "http://localhost:5173/pricing",
"markdown": "# Visual edits from Edityy\n…",
"changes": [
{
"label": "h1 “Simple pricing”",
"selector": "#pricing > h1",
"source": "src/Pricing.tsx:12:7",
"props": [{ "prop": "font-size", "before": "32px", "after": "40px" }],
"text": { "before": "Simple pricing", "after": "Pricing" }
}
]
}The endpoint
The Vite plugin and the middleware handle this themselves, on POST /__edityy/changes. The middleware writes under process.cwd(), and the Vite plugin under Vite’s root, or under root if you pass one. Both accept only JSON from the page’s own origin.
Each change is checked before it is written, and the markdown field is made from the checked changes. The page cannot put its own text there.
save: false turns the endpoint off. It also turns off the variation endpoint.
Hosts
The endpoint takes requests only for localhost, its subdomains, and IP addresses. This stops another site that points its own name at your computer.
If you open the dev server under another name, add it.
edityy({ allowedHosts: ["dev.example", ".test.example"] })- A leading dot takes the subdomains too.
truetakes every host.
Next.js
Next.js needs one route file and one rewrite.
app/edityy/changes/route.ts
import { changesRoute } from "edityy";
export const POST = changesRoute();next.config.ts
async rewrites() {
return [{ source: "/__edityy/changes", destination: "/edityy/changes" }];
}The route is development only
NODE_ENV is development, so it writes nothing in a production build.
Edityy