Skip to documentation

Quickstart

This quickstart gets Layrr running in front of a local web app, then walks through the first browser-based edit.

Prerequisites

1. Start from the app you want to edit

Run your normal dev server first:

npm run dev

Keep this terminal running. Layrr will proxy requests to the dev server, so your app should be reachable before you start Layrr.

2. Run Layrr from npm

From the same project directory, start Layrr with the port your app is using:

npx layrr@latest --port 3000

If you want a reusable global command instead:

npm install -g layrr
layrr --port 3000

The npm package provides the layrr CLI.

By default, Layrr:

Open http://localhost:4567 to view the app through Layrr. Layrr also opens the browser automatically unless you pass --no-open.

3. Solve the UI problem in the browser

Choose the workflow based on what you are trying to fix:

Apply the change, then inspect the updated app after your dev server reloads.

Common flags

layrr --port 3000
layrr --port 3000 --proxy-port 8888
layrr --port 3000 --agent codex
layrr --port 3000 ~/projects/my-app
layrr --configure-gemini

Use --port for the dev server Layrr should proxy. Pass a project path when you want Layrr to operate on a directory other than the current working directory.

Common problems

Layrr opens, but the app is not there

Your dev server may not be running, or Layrr may be pointed at the wrong port. Start the app first, then run:

npx layrr@latest --port 3000

Replace 3000 with the port your app uses.

Port 4567 is already in use

Choose a different proxy port:

npx layrr@latest --port 3000 --proxy-port 8888

Then open http://localhost:8888.

Layrr is editing the wrong directory

Run Layrr from the project root, or pass the directory explicitly:

npx layrr@latest --port 3000 ~/projects/my-app

Build from source

If you prefer to build locally:

git clone https://github.com/narnia-sh/layrr.git
cd layrr
pnpm install
pnpm build
node dist/cli.js --port 3000