brandrail 0.10.0 → 0.10.1
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/LICENSE +21 -0
- package/README.md +32 -0
- package/dist/brandrail.mjs +2 -2
- package/package.json +35 -15
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Thiago Baptistella (Brandrail)
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
CHANGED
|
@@ -21,6 +21,34 @@ npx brandrail check --changed --upload # only changed lines, results in the d
|
|
|
21
21
|
Brandrail only ever receives its hash, and the files it writes into the repo hold no key. AI tools start
|
|
22
22
|
`npx brandrail mcp`, which checks code on your machine: code is never uploaded. In CI, set `BRANDRAIL_KEY` instead.
|
|
23
23
|
|
|
24
|
+
## MCP server
|
|
25
|
+
|
|
26
|
+
`brandrail mcp` is an MCP server for Claude Code, Cursor, Copilot, Codex, Windsurf and any other MCP client.
|
|
27
|
+
It runs on your machine over stdio; code is checked locally and never uploaded. It works without an account,
|
|
28
|
+
using starter tokens; connect an account (or set `BRANDRAIL_KEY`) to use your own Brand Kit.
|
|
29
|
+
|
|
30
|
+
```json
|
|
31
|
+
{
|
|
32
|
+
"mcpServers": {
|
|
33
|
+
"brandrail": { "command": "npx", "args": ["-y", "brandrail", "mcp"] }
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
`npx brandrail connect` writes this config for you, plus the rule files each AI tool reads.
|
|
39
|
+
|
|
40
|
+
| Tool | What it does |
|
|
41
|
+
| --- | --- |
|
|
42
|
+
| `get_guidelines` | The project's design system rules: components to use in its framework, allowed tokens, what the checker enforces. Called once before writing UI. |
|
|
43
|
+
| `get_design_tokens` | Every colour, spacing, radius and type token with the CSS variable to use. |
|
|
44
|
+
| `find_component` | Finds the component for a need ("date picker", "primary action") with its import, rules and an example. |
|
|
45
|
+
| `get_component_docs` | Full docs for one component in the project's framework: import or tag, props, rules, example. |
|
|
46
|
+
| `get_template` | A whole page (list, detail, form, settings, dashboard, sign-in) built from your components, with the files to create and the page's rules. |
|
|
47
|
+
| `get_migration_map` | What replaces each piece of Material, MUI, Bootstrap, Ant, Chakra or PrimeNG. |
|
|
48
|
+
| `validate_snippet` | Runs the checker on generated code and returns a brand score and each fix. |
|
|
49
|
+
|
|
50
|
+
All tools are read-only. Docs: https://www.brandrail.com.au/docs/connect
|
|
51
|
+
|
|
24
52
|
## Commands
|
|
25
53
|
|
|
26
54
|
| Command | |
|
|
@@ -37,3 +65,7 @@ Brandrail only ever receives its hash, and the files it writes into the repo hol
|
|
|
37
65
|
| `whoami`, `logout` | Show or remove the saved sign-in |
|
|
38
66
|
|
|
39
67
|
Nothing is uploaded unless you pass `--upload`, and code snippets are never uploaded.
|
|
68
|
+
|
|
69
|
+
## Licence
|
|
70
|
+
|
|
71
|
+
MIT. The Brandrail web app and dashboard are a separate, paid service: https://www.brandrail.com.au/pricing
|
package/dist/brandrail.mjs
CHANGED
|
@@ -42086,7 +42086,7 @@ function createBrandrailMcp(ctx) {
|
|
|
42086
42086
|
"find_component",
|
|
42087
42087
|
{
|
|
42088
42088
|
title: "Find a design system component",
|
|
42089
|
-
description: 'Finds the component to use for a UI need, e.g. "date picker", "primary action", "modal", "dropdown of
|
|
42089
|
+
description: 'Finds the component to use for a UI need, e.g. "date picker", "primary action", "modal", "dropdown of countries". Returns the import, rules and an example. Always use these instead of raw HTML elements or other UI libraries.',
|
|
42090
42090
|
inputSchema: {
|
|
42091
42091
|
intent: external_exports.string().min(1).max(300).describe("What you need, in plain words"),
|
|
42092
42092
|
limit: external_exports.number().int().min(1).max(10).default(3),
|
|
@@ -42173,7 +42173,7 @@ ${migrationMapMarkdown(resolved, fwOf(framework), libraries)}`)
|
|
|
42173
42173
|
files: external_exports.array(external_exports.object({ filename: external_exports.string().min(1).max(200), code: external_exports.string().min(1).max(1e5) })).min(1).max(20).optional().describe("Every file you changed, checked together as one result. Preferred over code/filename."),
|
|
42174
42174
|
code: external_exports.string().min(1).max(1e5).optional().describe("A single file or snippet (when not using files)"),
|
|
42175
42175
|
filename: external_exports.string().max(200).default("snippet.tsx").describe("File name for code; the extension decides how it's parsed"),
|
|
42176
|
-
project: external_exports.string().max(120).optional().describe("Repo or app name, e.g.
|
|
42176
|
+
project: external_exports.string().max(120).optional().describe("Repo or app name, e.g. customer-portal (shown in the dashboard)")
|
|
42177
42177
|
},
|
|
42178
42178
|
annotations: { readOnlyHint: true, openWorldHint: false }
|
|
42179
42179
|
},
|
package/package.json
CHANGED
|
@@ -1,33 +1,52 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "brandrail",
|
|
3
|
-
"version": "0.10.
|
|
4
|
-
"
|
|
3
|
+
"version": "0.10.1",
|
|
4
|
+
"mcpName": "au.com.brandrail/brandrail",
|
|
5
|
+
"description": "Keep AI-generated UI on-brand: an MCP server and CLI that give Claude Code, Cursor, Copilot and Codex your design system, and check code and live pages against it.",
|
|
5
6
|
"keywords": [
|
|
7
|
+
"mcp",
|
|
8
|
+
"mcp-server",
|
|
9
|
+
"model-context-protocol",
|
|
6
10
|
"design-system",
|
|
7
11
|
"design-tokens",
|
|
12
|
+
"dtcg",
|
|
13
|
+
"ui-components",
|
|
8
14
|
"lint",
|
|
15
|
+
"linter",
|
|
9
16
|
"ai",
|
|
10
|
-
"mcp",
|
|
11
17
|
"claude",
|
|
18
|
+
"claude-code",
|
|
12
19
|
"cursor",
|
|
13
20
|
"copilot",
|
|
21
|
+
"codex",
|
|
22
|
+
"windsurf",
|
|
23
|
+
"figma",
|
|
14
24
|
"tailwind",
|
|
25
|
+
"react",
|
|
26
|
+
"angular",
|
|
27
|
+
"vue",
|
|
28
|
+
"web-components",
|
|
15
29
|
"brand"
|
|
16
30
|
],
|
|
17
|
-
"homepage": "https://www.brandrail.com.au",
|
|
31
|
+
"homepage": "https://www.brandrail.com.au/docs",
|
|
32
|
+
"bugs": {
|
|
33
|
+
"url": "https://github.com/brandrail-app/brandrail/issues",
|
|
34
|
+
"email": "hello@brandrail.com.au"
|
|
35
|
+
},
|
|
18
36
|
"repository": {
|
|
19
37
|
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/
|
|
38
|
+
"url": "git+https://github.com/brandrail-app/brandrail.git",
|
|
21
39
|
"directory": "packages/cli"
|
|
22
40
|
},
|
|
23
|
-
"license": "
|
|
41
|
+
"license": "MIT",
|
|
24
42
|
"type": "module",
|
|
25
43
|
"bin": {
|
|
26
44
|
"brandrail": "dist/brandrail.mjs"
|
|
27
45
|
},
|
|
28
46
|
"files": [
|
|
29
47
|
"dist",
|
|
30
|
-
"README.md"
|
|
48
|
+
"README.md",
|
|
49
|
+
"LICENSE"
|
|
31
50
|
],
|
|
32
51
|
"engines": {
|
|
33
52
|
"node": ">=18.18"
|
|
@@ -35,19 +54,20 @@
|
|
|
35
54
|
"publishConfig": {
|
|
36
55
|
"access": "public"
|
|
37
56
|
},
|
|
57
|
+
"scripts": {
|
|
58
|
+
"build": "esbuild src/index.ts --bundle --platform=node --target=node18 --format=esm --outfile=dist/brandrail.mjs --external:playwright --external:playwright-core --banner:js='#!/usr/bin/env node' && chmod +x dist/brandrail.mjs",
|
|
59
|
+
"typecheck": "tsc --noEmit",
|
|
60
|
+
"prepublishOnly": "pnpm run build"
|
|
61
|
+
},
|
|
38
62
|
"devDependencies": {
|
|
63
|
+
"@brandrail/engine": "workspace:*",
|
|
64
|
+
"@brandrail/mcp": "workspace:*",
|
|
39
65
|
"@modelcontextprotocol/sdk": "1.32.2",
|
|
40
66
|
"@types/node": "^22",
|
|
41
67
|
"esbuild": "^0.28.2",
|
|
42
68
|
"fflate": "0.8.3",
|
|
43
69
|
"playwright-core": "1.63.0",
|
|
44
70
|
"typescript": "5.9.3",
|
|
45
|
-
"zod": "4.6.7"
|
|
46
|
-
"@brandrail/engine": "0.1.0",
|
|
47
|
-
"@brandrail/mcp": "0.1.0"
|
|
48
|
-
},
|
|
49
|
-
"scripts": {
|
|
50
|
-
"build": "esbuild src/index.ts --bundle --platform=node --target=node18 --format=esm --outfile=dist/brandrail.mjs --external:playwright --external:playwright-core --banner:js='#!/usr/bin/env node' && chmod +x dist/brandrail.mjs",
|
|
51
|
-
"typecheck": "tsc --noEmit"
|
|
71
|
+
"zod": "4.6.7"
|
|
52
72
|
}
|
|
53
|
-
}
|
|
73
|
+
}
|