glyph-ai 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -38
- package/bundled/server/index.js +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -2,68 +2,74 @@
|
|
|
2
2
|
|
|
3
3
|
Design intelligence for the vibe coding era.
|
|
4
4
|
|
|
5
|
+
**Vibe coding is design blind.** You can ship a working app in an afternoon. But Claude Code can't tell why your glass nav bar looks off, or why your app looks like Duolingo from Wish. And if you aren't a designer, it's a frustrating and time-consuming part of shipping products people love.
|
|
6
|
+
|
|
7
|
+
Building beautiful UIs should be native to vibe coding. Glyph gives Claude Code and Cursor a sense of design so that this is possible.
|
|
8
|
+
|
|
9
|
+
## What it does
|
|
10
|
+
|
|
11
|
+
Glyph injects a design layer into your existing Claude Code or Cursor workflow. Point at a UI component or page, and it generates **design variations** in your desired aesthetic (minimal, bold, editorial, dashboard, warm) -- rendered live in a browser overlay so you can preview your options and pick your favorite.
|
|
12
|
+
|
|
5
13
|
## Install
|
|
6
14
|
|
|
7
|
-
```
|
|
15
|
+
```bash
|
|
8
16
|
npx glyph init
|
|
9
17
|
```
|
|
10
18
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
- Injects a browser overlay into your dev app (Next.js, Vite, CRA)
|
|
14
|
-
- Starts a local server that serves the overlay and talks to Claude Code via MCP
|
|
15
|
-
- Writes `.mcp.json` and `.cursor/mcp.json` so Claude Code and Cursor pick up the MCP server automatically
|
|
19
|
+
That's it. Glyph writes `.mcp.json` and `.cursor/mcp.json` automatically so Claude Code and Cursor pick up the MCP server without any manual config.
|
|
16
20
|
|
|
17
|
-
##
|
|
21
|
+
## How it works
|
|
18
22
|
|
|
19
23
|
```
|
|
20
|
-
|
|
21
|
-
|
|
24
|
+
Your app (Next.js / Vite / CRA)
|
|
25
|
+
└── Glyph overlay (browser)
|
|
26
|
+
└── Glyph server (local, port 3013)
|
|
27
|
+
└── MCP → Claude Code / Cursor
|
|
28
|
+
└── parallel variation runs
|
|
22
29
|
```
|
|
23
30
|
|
|
24
|
-
|
|
31
|
+
When you ask Claude Code to improve a component, Glyph returns a design brief with an opinionated taste layer, two-pass generation instructions, and a self-evaluation gate. Claude generates variations in parallel -- each with a distinct aesthetic personality -- previews them via screenshot, scores them against a rubric, and iterates before delivering. Results stream into the overlay one by one as they complete. Pick your favorite and click implement.
|
|
25
32
|
|
|
26
|
-
|
|
33
|
+
## Commands
|
|
27
34
|
|
|
28
35
|
```bash
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
pnpm run dev:e2e
|
|
36
|
+
glyph init # Set up Glyph and start the server
|
|
37
|
+
glyph stop # Stop the server
|
|
32
38
|
```
|
|
33
39
|
|
|
34
|
-
|
|
35
|
-
- **Overlay** — Vite watch build (`packages/overlay/`)
|
|
36
|
-
- **Server** — Express + WebSocket on `:3013` (`packages/server/`)
|
|
37
|
-
- **Product app** — Next.js demo on `:3000` (`product/`)
|
|
40
|
+
## Requirements
|
|
38
41
|
|
|
39
|
-
|
|
42
|
+
- Node 18+
|
|
43
|
+
- Claude Code or Cursor
|
|
40
44
|
|
|
41
|
-
|
|
45
|
+
## Development
|
|
42
46
|
|
|
43
47
|
```bash
|
|
44
|
-
|
|
45
|
-
pnpm
|
|
48
|
+
cd glyph
|
|
49
|
+
pnpm install
|
|
50
|
+
pnpm run dev:e2e
|
|
46
51
|
```
|
|
47
52
|
|
|
48
|
-
|
|
53
|
+
Starts three processes concurrently:
|
|
49
54
|
|
|
50
|
-
|
|
55
|
+
| Process | Location | Description |
|
|
56
|
+
| -------- | ----------------- | --------------------------------------------------- |
|
|
57
|
+
| Overlay | packages/overlay/ | React + Tailwind browser overlay (Vite watch build) |
|
|
58
|
+
| Server | packages/server/ | Express + WebSocket + MCP on :3013 |
|
|
59
|
+
| Demo app | product/ | Next.js test app on :3000 |
|
|
51
60
|
|
|
52
|
-
|
|
53
|
-
|---------|------|---------|
|
|
54
|
-
| `packages/overlay` | served from server | React + Tailwind browser overlay (IIFE bundle) |
|
|
55
|
-
| `packages/server` | `GLYPH_PORT` or `3013` | Express HTTP + WebSocket + MCP server |
|
|
56
|
-
| `packages/cli` | — | `npx glyph init` scaffolding |
|
|
57
|
-
| `product/` | `3000` | Next.js demo app for testing |
|
|
61
|
+
Open http://localhost:3000 -- the overlay loads at the bottom of the page.
|
|
58
62
|
|
|
59
|
-
|
|
63
|
+
**Build:**
|
|
60
64
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
+
```bash
|
|
66
|
+
pnpm run build # overlay → server → cli
|
|
67
|
+
pnpm run build:dist # builds + bundles into packages/cli/bundled/
|
|
68
|
+
```
|
|
65
69
|
|
|
66
|
-
|
|
70
|
+
**Environment variables:**
|
|
67
71
|
|
|
68
|
-
|
|
69
|
-
|
|
72
|
+
| Variable | Default | Description |
|
|
73
|
+
| -------------------- | --------------- | ------------------------ |
|
|
74
|
+
| `GLYPH_PORT` | `3013` | Server port |
|
|
75
|
+
| `GLYPH_PROJECT_ROOT` | `process.cwd()` | Root of the user's project |
|
package/bundled/server/index.js
CHANGED
|
@@ -207,7 +207,7 @@ async function discardVariation() {
|
|
|
207
207
|
// Routes
|
|
208
208
|
// ---------------------------------------------------------------------------
|
|
209
209
|
app.get('/health', (_req, res) => {
|
|
210
|
-
res.json({ status: 'ok', version: '0.3.
|
|
210
|
+
res.json({ status: 'ok', version: '0.3.3' });
|
|
211
211
|
});
|
|
212
212
|
app.get('/overlay.js', (_req, res) => {
|
|
213
213
|
console.log('[Glyph] Serving overlay.js');
|