brandrail 0.0.0-stage → 0.1.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 +29 -2
- package/dist/brandrail.mjs +2139 -0
- package/package.json +48 -4
package/README.md
CHANGED
|
@@ -1,3 +1,30 @@
|
|
|
1
|
-
#
|
|
1
|
+
# brandrail
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Keep AI-generated UI on-brand. `brandrail` checks code and live pages against your design system
|
|
4
|
+
(Brand Kit), and writes your rules into the files AI coding tools read.
|
|
5
|
+
|
|
6
|
+
```bash
|
|
7
|
+
npx brandrail init # brandrail.config.json + AGENTS.md, CLAUDE.md, Cursor/Copilot/Windsurf/Gemini rules
|
|
8
|
+
npx brandrail check # violations + brand score for this repo
|
|
9
|
+
npx brandrail scan <url> # check a running page in a real browser
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## With a Brandrail account
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
export BRANDRAIL_KEY=br_live_… # Dashboard → Connect → API keys
|
|
16
|
+
npx brandrail init --from-api --mcp # pull your published Brand Kit, add the MCP server to your AI tools
|
|
17
|
+
npx brandrail check --changed --upload # only changed lines, results in the dashboard
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Commands
|
|
21
|
+
|
|
22
|
+
| Command | |
|
|
23
|
+
| --- | --- |
|
|
24
|
+
| `check [paths]` | `--format pretty\|json\|markdown\|github`, `--fail-below 80`, `--changed [base]`, `--upload` |
|
|
25
|
+
| `scan <url>` | `--pages 3`, `--storage-state auth.json` (pages behind a login), `--wait 2000`, `--upload`. Needs `npm i -D playwright && npx playwright install chromium` |
|
|
26
|
+
| `init` | `--from-api`, `--mcp`, `--no-rules`, `--force` |
|
|
27
|
+
| `import <tokens.json>` | DTCG, Tokens Studio or Figma variables JSON into the config. `--replace`, `--primitives` |
|
|
28
|
+
| `rules` | List the rules |
|
|
29
|
+
|
|
30
|
+
Nothing is uploaded unless you pass `--upload`, and code snippets are never uploaded.
|