Get started with Redline
Redline adds visual feedback to any website. Reviewers highlight text, draw a box or pin a comment to the exact element, and your coding agent gets each note with the element’s label, selector and styles attached, ready to fix.
Quick start
Install from npm
npm install @perpetio/redline
Start Redline after your page has rendered:
import Redline from '@perpetio/redline';
Redline.init({
project: 'my-website',
startOpen: true,
spa: true,
});
// On unmount or hot reload, call Redline.destroy().
The review toolbar appears on your page. Press P and click an element to
leave your first comment. Without startOpen: true, Redline starts as a small
Review button. Use spa: true to keep separate comments for each route.
Or add one script tag
No bundler needed. Paste this before </body>:
<script
src="https://cdn.jsdelivr.net/npm/@perpetio/redline@2.4.0/redline.js"
data-project="my-website"
data-start-open="true"
defer
></script>
That's the whole installation. Comments stay in the reviewer's browser until they export or send them. Redline Cloud is optional when you want a shared review with your team and clients.
To self-host, download redline.js and use your own script URL. The same package is also available on unpkg.
From feedback to a fix

An actual Redline review of the included playground. The comments are sample feedback.
| You do this | Redline carries the context |
|---|---|
| Point at what needs changing. Highlight text, draw a box, or pin a comment. | The element's label, selector, surrounding heading, position, and styles travel with the note. |
Hand it to your coding agent. Press M to copy Markdown, or connect over MCP. |
In React, Vue, and Svelte development builds, the note can also name the component and source file. |
| Close the loop. Your agent replies and updates the comment's status over MCP. | Reviewers see the reply and the resolved status on the same page. |
Examples
The package includes a working playground and small integrations you can copy.
| Start here | What you get |
|---|---|
| Review playground | A complete HTML page to annotate, with Pin a comment and Copy feedback for AI buttons. |
| Minimal HTML | A small page with one CDN script tag. |
| React / Next.js component | Mount once, follow route changes, and clean up on unmount. |
| Vue 3 component | The same setup using onMounted and onUnmounted. |
To run the playground after installing the package:
npx serve node_modules/@perpetio/redline --listen 4200
Open http://localhost:4200/examples/playground.html. This serves the installed package locally; no API key, build step, or review backend is required. The links above show the example source; use the local server to run the playground.
Add your own feedback button
The public API also lets you connect review tools to your app's own controls:
import Redline from '@perpetio/redline';
Redline.init({ project: 'my-website', spa: true });
// Call from your button's click handler:
function leaveFeedback() {
Redline.setTool('pin');
}
// Read the open comments as Markdown for a coding agent:
function getFeedbackForAgent() {
return Redline.markdown({ detail: 'detailed' });
}
See framework integration for React, Next.js, Vue, Svelte, Angular, WordPress, and other sites.
Why Redline?
- One import or script tag. No runtime dependencies, framework requirement, or account for local reviews.
- Useful context for coding agents. Copy Markdown with element details, or use MCP to read, reply, and resolve feedback.
- Works everywhere. Plain HTML, React, Vue, Svelte, WordPress, Webflow, Shopify, static sites — anything that renders HTML in a browser.
- Local-first & private. Comments stay on the reviewer's device until they explicitly export or send feedback to an endpoint you configure.
- Portable. Reviewers export their feedback as JSON and send it to you; you import it with one click and see every note in place.
- Polished UI. A floating toolbar, a Figma-style comments panel, light/dark themes that auto-adapt to your page, and full keyboard shortcuts.
- Dependency-free. Vanilla JavaScript with no runtime dependencies.
License
The widget and local mode are free to use in personal and commercial projects under the terms in LICENSE. Redline is not open source.
Redline is built on the source code of annotate.js, used under the MIT License. Its copyright notice, "Copyright (c) 2026 annotate.js contributors", is kept in LICENSE.
Redline Cloud is a subscription service by Perpetio OÜ, provided under its Terms of Service and Privacy Policy.
