visualpatch
v2.1.0
Published
Universal in-browser visual feedback & pinpoint annotation tool for web development with AI pair programmers.
Maintainers
Readme
🎯 VisualPatch v2.0
Universal In-Browser Visual Feedback & Autonomous UI Review Tool for AI Pair Programmers.
Effortlessly guide Claude, Cursor, ChatGPT, Windsurf, Copilot, Antigravity, and Devin with pinpoint visual precision and zero window switching.
Crafted with an ultra-premium CleanShot X + Apple Pro frosted glass aesthetic.
[!TIP]
🤖 1-Prompt Autonomous Setup for AI Agents
Want your AI assistant to install and configure VisualPatch automatically? Simply tell your agent:
"Install VisualPatch in this project according to AGENTS.md"
Any AI pair programmer (Claude Code, Antigravity, Cursor, Windsurf, Devin) will readAGENTS.mdand configure the component, dev server middleware, and live review loop in seconds with zero manual effort.
⚡ What Makes VisualPatch v2.0 Magical
🔄 The Zero-Window-Switching Live Loop
| Step | Environment | What Happens Automatically |
| :---: | :--- | :--- |
| 1 | 🌐 Browser (localhost) | Pin an element or crop an area (S), type your change request, and press Ctrl + Enter. |
| 2 | ⚡ Bridge / Middleware | Resolves exact component <HeroSection /> and source file src/components/HeroSection.jsx#L42, saving to .visualpatch/inbox.md. |
| 3 | 🤖 AI Agent (Auto-Wakeup) | The IDE agent wakes up via Reactive Task Wakeup with zero prompt tokens wasted and applies the surgical fix. |
| 4 | ✨ Vite HMR (Instant ~50ms) | The browser hot-reloads and updates live—you never have to switch windows or copy-paste prompts! |
🚀 Key Features
- ⚡ Autonomous Live Review Loop (
/vp-live): Edit frontend UI live directly from your browser without ever switching windows back to the IDE. - 🔍 React Fiber & Component Source Inspector: Automatically resolves the exact React/Vue component name (e.g.
<HeroSection />) and source code file path + line number (src/components/HeroSection.jsx#L42). - 💎 CleanShot X + Apple Pro Frosted Glass UI: Obsidian acrylic dock with multi-layer depth shadows, subtle hairline borders, and hardware-accelerated micro-interactions.
- 🎯 Pixel-Perfect Element Inspector: Hover over any DOM node with real-time bounding box highlighting and tag dimensions.
- 📸 Spotlight Area Screenshot Marquee Tool: Drag a spotlight box over any element or section with true-color subject fidelity and live acrylic dimension capsule (
953 × 393 PX). - 🖼️ Auto-Stitched Multi-Screenshot Strip: Capturing multiple screenshot pins automatically stitches them into one consolidated image strip, bypassing OS single-image clipboard limits.
- 💾 Zero-Token Local Artifact Storage: Saves high-res crops as
.visualpatch/preview_1.pngon local disk, keeping prompt tokens under ~80 tokens (0 base64 waste). - ⌨️ Intuitive Keyboard Flow: Press Ctrl+Enter to Send to Agent, Enter to save notes, Esc to toggle inspect mode, and S for area snapshots.
- 🖐️ Draggable Anywhere: Drag the toolbar or collapsed capsule to any corner of your screen—persists smoothly across page refreshes.
- 🛡️ Zero Telemetry / 100% Local: Runs strictly on local development domains (
localhost,127.0.0.1, local ports). No external servers, no tracking, zero analytics.
⌨️ Keyboard Shortcuts
| Shortcut | Action |
| :--- | :--- |
| Ctrl + Enter / ⌘ + Enter | ⚡ Send to Agent Inbox (Ingests to .visualpatch/inbox.md) |
| S (or Alt + S) | Toggle Area Screenshot Mode (Drag to crop & pin) |
| Esc (or Alt + D / F9) | Toggle Element Inspect Mode / Exit |
| Ctrl + C / ⌘ + C | Copy Annotations + Screenshot Strip for AI |
| Alt + T or F8 | Toggle / Minimize Toolbar |
| Enter | Save Pin Note (inside feedback card) |
| Shift + Enter | New Line (inside feedback card) |
| Esc | Close Feedback Card / Cancel Screenshot |
🤖 Ask Your AI Agent to Install It (Zero Effort)
You can literally just tell your AI coding assistant:
"Install VisualPatch in this project and enable live review mode."
Your AI assistant will automatically read AGENTS.md and set up the component, dev server middleware, and background watcher in 5 seconds.
🚀 Manual Installation Options
Option 1: Instant Setup via npx (Fastest)
npx visualpatch initThe interactive CLI will automatically detect your framework (Vite, Next.js, React, Vue, Astro, HTML) and configure VisualPatch.
Option 2: Install via npm / pnpm / yarn
npm install -D visualpatch
# or
pnpm add -D visualpatch
# or
yarn add -D visualpatchReact / Vite (src/App.jsx)
import { VisualPatch } from 'visualpatch';
export default function App() {
return (
<>
<YourAppContent />
{import.meta.env.DEV && <VisualPatch />}
</>
);
}Next.js App Router (app/layout.jsx)
import { VisualPatch } from 'visualpatch';
export default function RootLayout({ children }) {
return (
<html>
<body>
{children}
{process.env.NODE_ENV === 'development' && <VisualPatch />}
</body>
</html>
);
}Option 3: Download Chrome Extension (.zip)
- Download latest release: VisualPatch-v2.0.0.zip (or clone the repo).
- Unzip the package.
- Open
chrome://extensions(oredge://extensions,brave://extensions). - Enable Developer mode toggle.
- Click Load unpacked and select the folder.
- Open any
localhosttab — the● Vdock appears automatically!
Option 4: Standalone CDN <script> Tag (Vanilla HTML)
<script src="https://cdn.jsdelivr.net/npm/[email protected]/vanilla.js" defer></script>📋 Generated Task Queue (.visualpatch/inbox.md)
When you hit ⚡ Send to Agent (Ctrl+Enter), VisualPatch produces a clean, token-efficient markdown task:
# 📌 VisualPatch UI Task Queue
> **Source URL:** `http://localhost:3000/`
> **Total Items:** 1
### Item #1: `section.hero > div.cta-wrap > button.cta-primary`
- **React Component:** `<HeroSection>`
- **Source File:** [`src/components/HeroSection.jsx#L42`](file:///.../src/components/HeroSection.jsx#L42)
- **Rendered Text:** "Get Started"
- **Visual Proof:** 
- **Requested Change:** Make button glow cobalt and increase horizontal padding to 24px🔒 Privacy & Security
- Strict Localhost Scope: Only activates on
localhost,127.0.0.1,0.0.0.0,.local, or explicit port numbers. - Zero Third-Party Network Requests: All logic, state, and coordinates are handled entirely client-side.
- Isolated Shadow DOM: UI styles are completely encapsulated in Shadow DOM and will never bleed into or conflict with your project's stylesheets.
📄 License
Distributed under the MIT License. See LICENSE for more information.
