Documentation

Everything you need to get started with Layrr

Quick Start

Get Layrr up and running in minutes

Installation

Install Layrr globally with npm:

npm install -g layrr

You can also use npx layrr to run without installing globally.

Requirements

Node.js

Version 18 or later

Claude Code

Authenticated (claude login)

Dev Server

Any running dev server (Vite, Next.js, Astro, etc.)

Platform

macOS, Windows, or Linux

Usage

  1. 1

    Start your dev server

    Make sure your local dev server is running on a known port

    pnpm dev    # starts on port 3000
  2. 2

    Run Layrr

    Point Layrr at your dev server port

    layrr --port 3000
  3. 3

    Browser opens automatically

    Layrr opens your browser at localhost:4567 with the editing overlay injected

  4. 4

    Select an element and edit

    Click Edit in the toolbar, click any element, type what you want to change, and hit Enter. Claude edits the source file and your dev server hot-reloads.

CLI Options

All available flags and options

layrr --port <dev-server-port> [options]
-p, --port <number> Dev server port (required)
--proxy-port <number> Layrr proxy port (default: 4567)
--no-open Don't open browser automatically
-h, --help Show help

Keyboard Shortcuts

Speed up your workflow

Toggle Browse / Edit mode
Alt+K / Cmd+K
Send edit instruction Enter
Deselect element or exit Edit mode Esc

How It Works

Understanding Layrr's architecture

Proxy + Overlay Injection

Layrr runs an HTTP proxy that sits between your browser and dev server. It intercepts HTML responses and injects a small overlay script. The overlay renders the toolbar, element highlighting, and editing panel directly in your browser.

WebSocket Communication

The overlay communicates with the Layrr server over WebSocket. When you select an element and describe a change, the edit request is sent to the server with the element's CSS selector, tag name, text content, and resolved source file location.

Source File Resolution

Layrr automatically finds the source file for the selected element. For React and Vue, it reads framework metadata from the DOM. For other frameworks, it uses a scoring algorithm that matches text content, tag names, and class names against your project files.

Claude Code Integration

The edit request is sent to Claude Code as a prompt with the source file, line number, element context, and your instruction. Claude reads the file, makes the minimal edit needed, and saves it. Your dev server picks up the change and hot-reloads the page.

Supported Frameworks

Works with any framework that runs a local dev server

React

Source detection via React Fiber metadata

Vue

Source detection via component metadata

Astro, Svelte, HTML & more

Smart file search with content and class matching

Open Source

Free forever, licensed under MIT

MIT License

Layrr is licensed under the MIT License. Use it for anything — personal projects, commercial work, modify it, distribute it. No restrictions.

Note: Layrr uses Claude Code for AI edits, which requires a separate subscription from Anthropic.

Ready to Get Started?

Install in seconds, point at your dev server, and start editing visually.