better-design 0.8.3 → 0.11.0
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 +24 -4
- package/dist/index.js +1385 -273
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -10,6 +10,8 @@ npx better-design
|
|
|
10
10
|
|
|
11
11
|
Run it once. No signup needed: a free key is created automatically and written into your installed MCP clients (Claude Code, Cursor, VS Code, Windsurf, Zed, Cline, JetBrains, and more), merge-safe, with an auto-invoke rule.
|
|
12
12
|
|
|
13
|
+
Using ZCode? Follow the [ZCode MCP setup guide](https://better-design.com/mcp/install/zcode) to add Better Design as an HTTP server.
|
|
14
|
+
|
|
13
15
|
The free key has a query limit; the tools link you to turn it into a free account (same key, unlimited, history kept). Already have a key? Set `BETTER_DESIGN_API_KEY`. Manage keys at [better-design.com/mcp](https://better-design.com/mcp).
|
|
14
16
|
|
|
15
17
|
> After install, set `"style": "new-york"` in `components.json` before running the shadcn command (the default `base-nova` style rewrites Radix `asChild` and breaks components). The returned install instructions include this.
|
|
@@ -20,21 +22,39 @@ The server exposes MCP tools only; it does not register prompts.
|
|
|
20
22
|
|
|
21
23
|
| Tool | Purpose |
|
|
22
24
|
| --- | --- |
|
|
23
|
-
| `find-design-system` |
|
|
24
|
-
| `get-design-system-docs` | Return shadcn install commands and component source for a design system. Default path in any real project (filesystem + terminal): build real React components. Base UI (@base-ui/react) is the default flavor; pass `library: "radix"` for the Radix flavor when the project already uses Radix. |
|
|
25
|
+
| `find-design-system` | Start any UI build by searching the catalog for visual foundations, or browse and compare existing systems. Returns IDs and the build/review guardrails needed for the next step. |
|
|
25
26
|
| `create-design-system` | Start a custom design system generation job. |
|
|
26
27
|
| `get-design-system-status` | Poll a generated design system and return the install command when ready. |
|
|
28
|
+
| `draw-illustration` | Draw an original SVG illustration for a screen: an empty state, a hero object, a container something drops into. Uses the caller's brand colours when a `projectId` is passed, and returns named layers so parts can animate. Drawing runs in the background. |
|
|
29
|
+
| `get-illustration-status` | Collect a drawing started by `draw-illustration`. Returns the complete svg and its layer names once ready. |
|
|
30
|
+
| `get-design-system-kit` | Return the correct implementation kit through one entry point. Use `target: "react"` in coding hosts for shadcn install commands and real components; use `target: "html"` only in inline canvases/artifacts for the framework-free HTML/CSS kit. Accepts a catalog `designSystemId`, or a generated `projectId` for the HTML target. Base UI is the default React flavor; pass `library: "radix"` when the project already uses Radix. |
|
|
27
31
|
| `preview-design-system` | Return a token-true visual preview for a catalog design system. |
|
|
28
|
-
| `get-design-system-html` | Export a framework-free HTML/CSS kit (real tokens + each system's real component material: card depth, button gradient/rim, switch fill, badge radius) for inline chat canvases only (ChatGPT canvas / Claude artifact) with no filesystem or build step; otherwise use `get-design-system-docs` and build React. Takes a catalog `designSystemId` OR a generated `projectId`; lists covered vs interactive-excluded components. |
|
|
29
32
|
| `get-ui-principle` | Load or search visual UI principles. |
|
|
30
33
|
| `get-ux-principle` | Load or search flow and interaction principles. |
|
|
31
|
-
| `get-
|
|
34
|
+
| `get-react-native-guide` | Load or search implementation guidance and code recipes for React Native and Expo projects. |
|
|
35
|
+
| `get-review-rules` | Return the Better Design self-review checklist. Supports `category`: `accessibility`, `visual-design`, `animation`, `content`, `comprehension`, or `all`. |
|
|
36
|
+
| `check-comprehension` | Check a finished screen against the mom test, the 15 second test, and the screenshot test. Pass the copy (`headline`, `body`, `actions`) or the screen's `code`, and it returns the findings that would stop a stranger understanding it. |
|
|
32
37
|
| `extract-design-system` | Distill an oklch-normalized semantic token set out of a project's existing CSS (paste `globals.css` / Tailwind v4 `@theme`) so new components match the app the user already built. |
|
|
33
38
|
| `find-icon-library` | Find an icon library for an app or project style. |
|
|
34
39
|
| `find-icons` | Search icons by name, library, and variant. |
|
|
35
40
|
| `install-icons` | Generate local icon components in the target project. |
|
|
36
41
|
| `detect-icon-library` | Read an existing icon-library manifest and report the active library. |
|
|
37
42
|
|
|
43
|
+
## Retrieve Principles
|
|
44
|
+
|
|
45
|
+
Use `topic` when you know the principle or one of its aliases. Use `query` when you want the most relevant sections for a specific design problem.
|
|
46
|
+
|
|
47
|
+
```text
|
|
48
|
+
get-ui-principle({ topic: "blur test" })
|
|
49
|
+
get-ui-principle({ query: "group this dense settings screen with clearer proximity" })
|
|
50
|
+
get-ux-principle({ topic: "reward design" })
|
|
51
|
+
get-ux-principle({ query: "confirm a high-stakes action with control rather than celebration" })
|
|
52
|
+
get-ux-principle({ topic: "clarity audit" })
|
|
53
|
+
get-ux-principle({ topic: "motion brief" })
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
The principle tools return complete documents for topic lookups and focused document sections for natural-language searches. After implementation, call `get-review-rules({ category: "all" })` so the same hierarchy, accessibility, motion, copy, and reward guidance is applied during review.
|
|
57
|
+
|
|
38
58
|
## Setup Behavior
|
|
39
59
|
|
|
40
60
|
`npx better-design` auto-creates a free key when none is set, then prompts for clients, scope, and auto-invoke rules. Non-interactive runs (agents, or `-y`/`--yes`) install silently. Configs are merged into your existing files (backed up first, never clobbering other MCP servers); scope falls back per client when one isn't supported.
|