SG

srivarsank/glide

Developer tools
204 stars Quality 75 Trend 26Apache-2.0

Quick start  ·  How it works  ·  Safe edits  ·  Features  ·  Agent skills  ·  Contributing

Overview

Quick start  ·  How it works  ·  Safe edits  ·  Features  ·  Agent skills  ·  Contributing

README

Quick start  ·  How it works  ·  Safe edits  ·  Features  ·  Agent skills  ·  Contributing

Glide: Visual website editor - STOP MAKING MOCKUPS ANYMORE!

Glide is a visual editor for the app you already run. Open it on your dev server, select an element on the live page, and change it the way you would in a design tool. Glide writes each change into the JSX, Vue, Svelte, Astro or HTML that renders the element, so every edit ends up as an ordinary diff that you review and commit.

There is no design file to keep in sync and no export step. Your source files are the design.

Two minutes: install Glide, edit the page, and watch each change land in the source.

Quick start

Glide works with Vite projects and needs Node.js 20 or later.

1. Install it as a dev dependency.

npm install -D @srivarsank/glide

2. Add the plugin to your Vite config. In development it marks each element with the file, line and column that rendered it.

// vite.config.ts
import { defineConfig } from 'vite';
import react from '@vitejs/plugin-react';
import { glideSourceStamping } from '@srivarsank/glide/vite-plugin';

export default defineConfig({
  plugins: [react(), glideSourceStamping()],
});

3. Run your dev server as usual and open the editor at the address it prints, such as http://127.0.0.1:5173/__glide/.

npm run dev

Vite serves the editor itself, so the preview loads your app directly and hot module replacement works as it does without Glide.

[!NOTE] The editor page uses the loopback address (127.0.0.1) and the preview loads your app from localhost. The browser treats these as different origins, so scripts in your app cannot read the editor page or send edits. If you open http://localhost:5173/__glide/, Glide sends you to the IP address.

How it works

  1. Stamp. The Vite plugin marks each element with its source location while your app compiles.
  2. Edit. The editor shows your running app. Each change you make is sent as one transaction to a local server, with a digest of every file it touches.
  3. Write. The server checks the transaction, edits only the affected text, and writes the file. Vite’s hot reload updates the canvas without reloading the page.

Edits you make in your code editor go around the same loop, from your files through Vite to the canvas, so the two stay in sync.

What Glide can save

File type Class, inline style, text, attributes (links, popovers), change tag, drag and resize Structural edits (insert, delete, move, group)
JSX / TSX Yes Yes
Vue, Svelte, Astro Yes No
HTML Yes, in projects with no UI framework No

Glide refuses an edit that it cannot make exactly, such as one inside a dynamic :class binding or a {...spread}. The message gives the reason, and the file stays unchanged.

Edits you can review

Glide changes the text of the edit and nothing else. Formatting, comments and quotes stay as you wrote them. With Tailwind, it replaces only the classes for the property you changed, keeps responsive and state variants such as md: and hover:, and writes values that match your theme as theme tokens.

  • Exact targeting. Each element is found by its file, line and column. JSX elements also carry a content hash, so an edit to an element that changed since you selected it is refused (STALE_NODE).
  • Stale-file checks. Each transaction carries a SHA-256 digest of every file it touches. If a file changed since you selected the element, the edit is refused (STALE_DIGEST).
  • All or nothing. A transaction writes all of its files or none of them, each through a temp file and a rename.
  • Class expressions. In JSX, Glide edits classes inside cn(...), clsx(...), cva(...) and template literals. It refuses an edit that a condition or a shared definition would override.
  • Edit scopes. For an element inside a component, you choose where a class goes: the component definition, one usage, or one cva variant.
  • Instant or staged. Write each edit as you make it, or stage many edits, preview them, and apply them in one transaction.
  • Layout-safe drag and resize. Results are written as layout styles. Elements in normal flow get position: relative, so flex and grid layout keeps working.
  • Local only. The server listens on 127.0.0.1, checks the Host and Origin of each request, and accepts a socket only after a session token handshake.

Features

Open the image for full size. The keyboard shortcuts are listed below the feature table.

The color picker has 16 presets, hex input and the eyedropper. On some Chromium builds the browser’s eyedropper does not close; type a hex value or choose a preset instead.

AI agent skills

Glide ships three skills that teach AI coding agents to work in a project that uses Glide. Install them from your project root:

npx @srivarsank/glide install-skills

This copies the skills into .agents/skills/. If the project uses Claude Code (it has a .claude folder or a CLAUDE.md), it also copies them into .claude/skills/. Add --agent claude, --agent agents or --agent all to choose the place yourself. With Cursor, the installer also creates .cursor/rules/glide.mdc.

Skill Teaches the agent to
glide find an element, edit source so the canvas keeps working, and explain a refused edit
glide-component-segregator find a component by name through glide-components.json
glide-setup install and configure Glide, and fix a setup that does not work

Glide never installs skills by itself. When they are missing, the glide command prints a one-line tip.

Contributing

Contributions are welcome. CONTRIBUTING.md covers setting up a checkout, the package map, the checks to run and how to open a pull request.

License

Apache License 2.0

Star history

View the full README on GitHub

Recommended Tools

Try a different keyword or remove a filter.

Install

npx skillfish add srivarsank/glide
New to MCP? Start with the mcpskill.org guide →