Skip to content
David Satomi
Go back

Lux: In-Browser Visual Editing for AI Coding Agents

Edit page
Lux injects an interactive overlay into your dev server, sending visual diffs and voice pins directly to your coding agent via MCP.

Pair-programming with modern AI coding agents on backends, command-line tools, and data pipelines is genuinely fast. But the moment you switch to frontend styling and UI layouts, that seamless collaboration hits a sensory wall.

It feels like pairing with an engineer who is locked in another room with no monitor.

You are looking at the running browser; they are looking at raw code in the dark. To get anything adjusted, you have to shout descriptions through the wall: “No, not that card, the nested badge inside the second column… give it slightly more top margin… wait, which Tailwind class was that?” Or you snap screenshots and slip them under the door, hoping a vision model can correctly guess which three lines in a 400-line JSX file correspond to the visual misalignment you are staring at.

I wanted a tighter loop. Credit goes to my colleague Florian Lucas (@flucas96), who originally came up with this concept with ui-review. That spark motivated me to build Lux: an in-browser visual review overlay designed from the ground up for agentic workflows.


Principle: No AI in the Tool

The prevailing trend in developer tooling right now is to slap an LLM call, an API key requirement, and a monthly subscription onto every utility.

Lux does the exact opposite: it contains zero AI.

Your coding agent (Claude Code, Google Antigravity, Cursor, Windsurf) already brings world-class reasoning and code intelligence. It does not need another mediocre LLM wrapper sitting between you and your editor.

What the agent actually lacks is a high-fidelity sensory and control layer inside the running application. Lux is pure, deterministic infrastructure: a local proxy and browser overlay that captures user gestures—style tweaks, DOM text edits, spatial comment pins, and voice walkthroughs—and translates them into structured diffs over standard Model Context Protocol (MCP).


How the Feedback Loop Works

Instead of trying to describe visual layout in conversational prompts, you interact directly with the running app:

  1. Direct Visual Edits: Open your app through Lux (http://127.0.0.1:4320). Click any element to adjust padding, font sizes, colors, or layout properties in real time, or edit text directly in the DOM.
  2. Built-in Voice Walkthroughs (Transcription Mode): Sometimes speaking is ten times faster than typing or clicking. Press R to record a voice walkthrough. Using the browser’s built-in Speech Recognition API, Lux transcribes your voice in real time with zero external API calls, attaching timestamped transcripts and target tags directly to the DOM elements you click while talking.
  3. One Single Agent Command: In your agent’s chat or terminal, run /lux.
  4. Structured Delivery: Through MCP, the agent receives high-signal diffs: exact CSS selector paths, source component hints, computed style mutations, and transcribed annotations in a single, context-efficient call.
  5. Automated Lifecycle: The agent edits your JSX, CSS, or Tailwind files. Your dev server hot-reloads, and Lux’s file watcher automatically detects the update, resolves the pending review, and cleans the slate.

Architectural Guarantees

From day one, Lux was designed with strict boundaries to keep your workflow clean and private:

  • 100% Local & Ephemeral: Lux runs exclusively on 127.0.0.1. There is zero telemetry, no analytics, no external servers, and no hosted cloud dashboard. Active review sessions are stored strictly on your local disk in .visual-edit/.
  • Universal Agent Compatibility: Because it communicates over standard stdio via MCP, Lux plugs into any coding agent without proprietary plugins. It works out of the box with Google Antigravity, Claude Code, Cursor, Windsurf, and Claude Desktop.
  • Context Economy: Lux avoids chatty multi-turn roundtrips. Everything the agent needs to apply your changes is packaged into a compact payload, preserving the agent’s context window for actual coding.

Getting Started

Lux can be installed globally or run per-project with zero global configuration:

# Global interactive setup (auto-configures detected agents)
npm i -g lux-edit && lux init -g

# Or launch immediately for any local dev server
npx lux-edit http://localhost:3000

Source code, design principles, and documentation are available on GitHub:
github.com/David-Sat/lux-edit


Edit page