@atomixstudio/mcp 1.0.6 → 1.0.8
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 +26 -9
- package/dist/index.js +2324 -1561
- package/dist/index.js.map +1 -1
- package/package.json +4 -2
package/README.md
CHANGED
|
@@ -7,11 +7,11 @@ MCP (Model Context Protocol) server and CLI for Atomix Design System. Query and
|
|
|
7
7
|
The easiest way to use Atomix is via the CLI:
|
|
8
8
|
|
|
9
9
|
```bash
|
|
10
|
-
# Sync
|
|
10
|
+
# Sync tokens + AI rules (default behavior)
|
|
11
11
|
npx heyatomix sync
|
|
12
12
|
|
|
13
|
-
# Sync tokens
|
|
14
|
-
npx heyatomix sync --rules
|
|
13
|
+
# Sync tokens only (skip AI rules)
|
|
14
|
+
npx heyatomix sync --no-rules
|
|
15
15
|
|
|
16
16
|
# Create config file
|
|
17
17
|
npx heyatomix init
|
|
@@ -28,16 +28,25 @@ npx heyatomix init
|
|
|
28
28
|
|
|
29
29
|
### `heyatomix sync`
|
|
30
30
|
|
|
31
|
-
Sync design tokens
|
|
31
|
+
Sync design tokens and AI rules to your project. **Both tokens and AI guidance rules sync by default** since the rules reference tokens.
|
|
32
32
|
|
|
33
33
|
```bash
|
|
34
|
-
npx heyatomix sync # Sync
|
|
34
|
+
npx heyatomix sync # Sync tokens + AI rules
|
|
35
|
+
npx heyatomix sync --no-rules # Sync tokens only
|
|
35
36
|
npx heyatomix sync -o src/tokens.css # Custom output path
|
|
36
37
|
npx heyatomix sync --format scss # Output as SCSS
|
|
37
|
-
npx heyatomix sync --rules # Also sync AI rules files
|
|
38
38
|
npx heyatomix sync -y # Auto-confirm changes
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
**⚠️ Important: File Structure**
|
|
42
|
+
|
|
43
|
+
The output file (e.g., `tokens.css`) is **completely rewritten** on each sync:
|
|
44
|
+
|
|
45
|
+
- ✅ **Preserved**: CSS custom properties (variables) - both design system tokens and custom variables
|
|
46
|
+
- ❌ **Lost**: Regular CSS rules (selectors, classes, media queries, etc.)
|
|
47
|
+
|
|
48
|
+
**Best Practice**: Keep your tokens file separate from custom CSS. Use a separate file (e.g., `custom.css` or `styles.css`) for custom styles.
|
|
49
|
+
|
|
41
50
|
### `heyatomix init`
|
|
42
51
|
|
|
43
52
|
Create a `.atomixrc` config file:
|
|
@@ -64,7 +73,7 @@ This creates:
|
|
|
64
73
|
| `--api-key` | API key for private design systems |
|
|
65
74
|
| `--output, -o` | Output file path [./tokens.css] |
|
|
66
75
|
| `--format` | Output format (see below) |
|
|
67
|
-
| `--rules
|
|
76
|
+
| `--no-rules` | Skip syncing AI rules (tokens + rules sync by default) |
|
|
68
77
|
| `--rules-dir` | Directory for rules files [project root] |
|
|
69
78
|
| `-y, --yes` | Auto-confirm changes |
|
|
70
79
|
|
|
@@ -152,7 +161,7 @@ Once connected, AI tools can use these:
|
|
|
152
161
|
|
|
153
162
|
## AI Rules Files
|
|
154
163
|
|
|
155
|
-
|
|
164
|
+
By default, `sync` also updates AI rules files based on which AI tools you use:
|
|
156
165
|
|
|
157
166
|
| File | AI Tool |
|
|
158
167
|
|------|---------|
|
|
@@ -170,7 +179,7 @@ The rules include your design system's governance guidelines and token usage ins
|
|
|
170
179
|
**CLI:**
|
|
171
180
|
|
|
172
181
|
```bash
|
|
173
|
-
npx heyatomix sync
|
|
182
|
+
npx heyatomix sync
|
|
174
183
|
```
|
|
175
184
|
|
|
176
185
|
**Natural language (via MCP):**
|
|
@@ -196,6 +205,14 @@ npx heyatomix sync --rules
|
|
|
196
205
|
- [Atomix Studio](https://atomixstudio.eu)
|
|
197
206
|
- [MCP Protocol](https://modelcontextprotocol.io)
|
|
198
207
|
|
|
208
|
+
## Publishing (maintainers)
|
|
209
|
+
|
|
210
|
+
This package bundles `@atomixstudio/sync-core` so a single publish works from npm. To republish:
|
|
211
|
+
|
|
212
|
+
1. From repo root, build sync-core (needed for local types): `cd packages/atomix-sync-core && pnpm run build`
|
|
213
|
+
2. From `packages/mcp-user`: `pnpm run build` then `npm publish --access public`
|
|
214
|
+
3. Bump version in `package.json` before each new publish.
|
|
215
|
+
|
|
199
216
|
## License
|
|
200
217
|
|
|
201
218
|
MIT
|