Introduction
Add AI writing tools to your Tiptap editor. You review every change, and your editor, documents, and server stay yours.
emend is in beta
@emend/ai is available on npm. APIs and components may still change between
preview releases. Test it thoroughly before relying on it in production.
emend is an open-source, MIT-licensed AI editing layer for rich text editors built with Tiptap. It combines a provider-neutral runtime with editable AI components that you install through the Shadcn registry CLI. AI changes stay out of your document until you accept them.
What emend gives you
- Three AI surfaces, one runtime: The Bubble Menu appears next to selected text, the Composer is a prompt box under your document, and the AI Assistant is a floating chat panel. All three can edit your writing or answer questions.
- Changes you review first: When AI edits your text, you see the change before it lands and choose to accept or reject it.
- Your own server route: The route decides the model, provider, authentication, rate limits, and logging. emend currently ships a recipe for the Vercel AI SDK, with more providers planned.
- Two ways to start: Add one or more AI surfaces to an editor you already own, or copy a complete editor starter into your app.
Choose an integration path
| Starting point | What you keep | What emend adds |
|---|---|---|
| Existing Tiptap editor | Your schema, extensions, toolbar, and persistence | One or more AI surfaces and the review runtime |
| emend editor starter | Full ownership of the copied component source | A complete editor with your choice of AI experience |
Both paths are written for Next.js for now. Support for other React frameworks is coming soon.
How emend is distributed
| Part | Distribution | Purpose |
|---|---|---|
@emend/ai | npm package preview | Protocol, controller, transports, React, Tiptap, and server APIs |
| UI components | Shadcn registry | Bubble Menu, Composer, AI Assistant, and editor starters |
| Server recipe | Shadcn registry | Consumer-owned Vercel AI Gateway route |
How emend works
The editing flow
- Select text and pick an action or write your own instruction to edit it. Or select nothing and type a question to chat with the AI.
- emend sends the relevant part of your document to your server route, which calls the model.
- For an edit, the proposed change appears as a preview in your document. For a question, the answer appears in the AI surface.
- Accept applies the change as a single step you can undo. Reject leaves the document as it was.
What stays yours
The editor, copied component source, server route, provider credentials, authentication, persistence, and deployment remain inside your application. emend does not replace your product's permissions, content model, or backend.