SrivarsanK/Glide
Acerca de
Open-source local visual editor for Vite, React, Vue, Svelte, Astro & HTML. Click live elements on your dev server and write atomic AST diffs to source, with MCP tools and AI agent skills.
Desarrollo web y de aplicacionesWhat you can do
- JSX / TSX - Yes - Yes
- Vue, Svelte, Astro - Yes - No
- HTML - Yes, in projects with no UI framework - No
- Select, drag, resize, zoom and pan on the live page
Crecimiento de estrellas medido
- in 24h
- +4
- in 7 days
- +16
- in 15 days
- +36
- in 1 month
- Recopilando historial
Cambios netos en períodos que se solapan, no totales diarios. Los datos no disponibles se dejan en blanco. Las estrellas indican interés, no calidad.
README.md
Original
Website · Docs · Quick start · How it works · Safe edits · Agent skills · Contact & Contribute
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 22.22 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()],
});
Vue, Svelte, Astro and plain HTML
Vue (vite.config.ts)
import { defineConfig } from 'vite';
import vue from '@vitejs/plugin-vue';
import { glideSourceStamping } from '@srivarsank/glide/vite-plugin';
export default defineConfig({
plugins: [vue(), glideSourceStamping()],
});
Svelte (vite.config.ts)
import { defineConfig } from 'vite';
import { svelte } from '@sveltejs/vite-plugin-svelte';
import { glideSourceStamping } from '@srivarsank/glide/vite-plugin';
export default defineConfig({
plugins: [svelte(), glideSourceStamping()],
});
Astro (astro.config.mjs)
import { defineConfig } from 'astro/config';
import { glideSourceStamping } from '@srivarsank/glide/vite-plugin';
export default defineConfig({
vite: {
plugins: [glideSourceStamping()],
},
});
Plain HTML (vite.config.ts, no framework plugin needed)
import { defineConfig } from 'vite';
import { glideSourceStamping } from '@srivarsank/glide/vite-plugin';
export default defineConfig({
plugins: [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.
Run the editor as a separate command instead
Start your app, then start Glide in a second terminal and open http://localhost:7777. With no port, Glide looks for your dev server.
npx @srivarsank/glide # or: npx @srivarsank/glide 5173
To keep it with your other scripts, add "glide": "glide" to the scripts in package.json. In this mode Glide shows your app through a proxy. Keep the plugin in your Vite config so elements can be selected; to turn off the editor at /__glide/, pass glideSourceStamping({ editor: false }). Set PORT to change the editor port. Other settings are read from glide.config.json; see the installation guide.
Install from GitHub Packages
- Map the scope in your
.npmrc:@srivarsank:registry=https://npm.pkg.github.com - Sign in with a personal access token:
npm login --registry=https://npm.pkg.github.com - Install as above:
npm install -D @srivarsank/glide.
[!NOTE] The editor page uses the loopback address (
127.0.0.1) and the preview loads your app fromlocalhost. The browser treats these as different origins, so scripts in your app cannot read the editor page or send edits. If you openhttp://localhost:5173/__glide/, Glide sends you to the IP address.
How it works
- Stamp. The Vite plugin marks each element with its source location while your app compiles.
- 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.
- 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
cvavariant. - 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 theHostandOriginof 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.
| On the canvas | In your source | Around your workflow |
|---|---|---|
|
|
|
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.
Keyboard shortcuts
Ctrl is ⌘ on macOS.
| Tools | Editing | View | |||
|---|---|---|---|---|---|
V |
Select | Ctrl Z |
Undo | Ctrl 0 |
Fit to screen |
H |
Hand | Ctrl Shift Z or Ctrl Y |
Redo | Ctrl 1 |
Zoom to 100% |
F or A |
Frame | Ctrl C / Ctrl V |
Copy / paste | [ / ] |
Toggle left / right panel |
R |
Rectangle | Ctrl D |
Duplicate | \ |
Toggle both panels |
O |
Ellipse | Delete or Backspace |
Delete | Ctrl Alt H |
History panel |
T |
Text | Ctrl G / Ctrl Shift G |
Group / ungroup | Ctrl E |
Export |
C |
Comment | ] / [ |
Bring to front / send to back | Esc |
Cancel or deselect |
E |
Reactions (1 to 8 sends one) |
Ctrl ] / Ctrl [ |
Forward / backward | ||
| Arrow keys | Nudge 1 px (Shift: 10 px) |
With an element selected, [ and ] arrange it; with nothing selected, they toggle the panels.
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.
The component registry, glide-components.json
When Glide starts, it indexes every component in your project into glide-components.json, so agents can find a component by name instead of searching the file tree. Both the glide command and the editor at /__glide/ write this file, and it updates within 300 ms when you create, rename or delete a component.
{
"buckets": [
{
"name": "Card",
"file": "/src/components/Card.tsx",
"exportType": "named",
"line": 12,
"elements": [
{ "id": "src/Card.tsx:13:4", "tagName": "div", "isRoot": true, "classNames": ["card"] },
{ "id": "src/Card.tsx:14:6", "tagName": "h2", "isRoot": false }
],
"cssFiles": ["/src/components/Card.module.css"]
}
]
}
An agent that changes a component visually:
- reads
glide-components.json; - finds the bucket for the component, such as
Card; - picks the target
data-gl-sourceid by tag name, root element or classes; - opens the file in
cssFilesfor a CSS module change; - makes the edit and checks it on the canvas.
Add the registry to your .gitignore:
glide-components.json
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.
- The documentation index separates current guides from historical specifications.
skills/glide/references/describes the architecture, the WebSocket protocol, and the write-back rules for each file type.- Report security problems privately, as described in SECURITY.md.
License
Star history
Explorar proyectos relacionados
Cargando…