@mindfiredigital/ignix-lite-cli 1.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.
@@ -0,0 +1,13 @@
1
+
2
+ > @mindfiredigital/ignix-lite-cli@1.1.0 build /home/runner/work/ignix-lite/ignix-lite/packages/cli
3
+ > tsup
4
+
5
+ CLI Building entry: src/index.ts
6
+ CLI Using tsconfig: tsconfig.json
7
+ CLI tsup v8.5.1
8
+ CLI Using tsup config: /home/runner/work/ignix-lite/ignix-lite/packages/cli/tsup.config.ts
9
+ CLI Target: es2022
10
+ CLI Cleaning output folder
11
+ ESM Build start
12
+ ESM dist/index.js 29.12 KB
13
+ ESM ⚡️ Build success in 33ms
package/CHANGELOG.md ADDED
@@ -0,0 +1,13 @@
1
+ # @mindfiredigital/ignix-lite-cli
2
+
3
+ ## 1.1.0
4
+
5
+ ### Minor Changes
6
+
7
+ - introduce expanded CLI and decoupled engine validation
8
+
9
+ ### Patch Changes
10
+
11
+ - Updated dependencies []:
12
+ - @mindfiredigital/ignix-lite-mcp@1.3.0
13
+ - @mindfiredigital/ignix-lite-engine@1.1.0
package/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 mindfire-test
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 ADDED
@@ -0,0 +1,368 @@
1
+ # @mindfiredigital/ignix-lite-cli
2
+
3
+ > The official command-line tool for [Ignix-Lite](https://github.com/mindfiredigital/ignix-lite) — a zero-JS, CSS-only UI component framework driven entirely by semantic HTML and `data-*` attributes.
4
+
5
+ [![npm version](https://img.shields.io/npm/v/@mindfiredigital/ignix-lite-cli)](https://www.npmjs.com/package/@mindfiredigital/ignix-lite-cli)
6
+ [![license](https://img.shields.io/npm/l/@mindfiredigital/ignix-lite-cli)](LICENSE)
7
+
8
+ ---
9
+
10
+ ## What is Ignix-Lite CLI?
11
+
12
+ `ignix-lite` is a developer productivity tool that lets you:
13
+
14
+ - **Scaffold** components and project config in seconds
15
+ - **Generate** UI markup from plain English descriptions
16
+ - **Validate** your HTML against Ignix-Lite design rules
17
+ - **Audit** your markup for WCAG 2.2 accessibility issues
18
+ - **Theme** your project by describing the look you want
19
+ - **Preview** any HTML/Emmet file as a rendered PNG image
20
+ - **Connect** your editor (Claude Desktop, Claude Code, Gemini CLI, Cursor) to the Ignix-Lite MCP server
21
+
22
+ ---
23
+
24
+ ## Installation
25
+
26
+ ```bash
27
+ npm install -g @mindfiredigital/ignix-lite-cli
28
+ ```
29
+
30
+ Or use it without installing via `npx`:
31
+
32
+ ```bash
33
+ npx @mindfiredigital/ignix-lite-cli <command>
34
+ ```
35
+
36
+ ---
37
+
38
+ ## Quick Start
39
+
40
+ ```bash
41
+ # 1. Set up a new project
42
+ ignix-lite init
43
+
44
+ # 2. Generate UI from a description
45
+ ignix-lite build "a login form with email and password"
46
+
47
+ # 3. Validate your markup
48
+ ignix-lite validate src/index.html
49
+
50
+ # 4. Check accessibility
51
+ ignix-lite check-a11y src/index.html
52
+ ```
53
+
54
+ ---
55
+
56
+ ## Commands
57
+
58
+ ### `ignix-lite init`
59
+
60
+ Initialize Ignix-Lite in your project. Creates an `ignix.config.json` and injects CSS theme variables into your stylesheet.
61
+
62
+ ```bash
63
+ ignix-lite init
64
+ ```
65
+
66
+ **Interactive prompts:**
67
+
68
+ - Framework: Vanilla HTML
69
+ - CSS file path (e.g. `src/index.css`)
70
+ - Primary theme color (hex, e.g. `#6366f1`)
71
+
72
+ **Output:**
73
+
74
+ ```
75
+ ✔ Ignix-Lite initialized successfully!
76
+
77
+ Created ignix.config.json
78
+ Updated theme variables in src/index.css
79
+ ```
80
+
81
+ ---
82
+
83
+ ### `ignix-lite build <prompt>`
84
+
85
+ Generate Ignix-Lite HTML (or Emmet shorthand) from a **plain English description**. Powered by the intent engine — no AI API key required.
86
+
87
+ ```bash
88
+ ignix-lite build "a danger button that says Delete"
89
+ ignix-lite build "a login form with email and password inputs"
90
+ ignix-lite build "a warning alert that says Session will expire soon"
91
+ ```
92
+
93
+ **Options:**
94
+
95
+ | Flag | Description |
96
+ | --------------------- | ----------------------------------------------- |
97
+ | `-o, --output <file>` | Write the HTML output to a file |
98
+ | `-e, --emmet-only` | Output the Emmet shorthand instead of full HTML |
99
+
100
+ **Examples:**
101
+
102
+ ```bash
103
+ # Print HTML to terminal
104
+ ignix-lite build "a primary button that says Save Changes"
105
+
106
+ # Save to file
107
+ ignix-lite build "a user profile card" --output card.html
108
+
109
+ # Get Emmet shorthand
110
+ ignix-lite build "a search bar with a submit button" --emmet-only
111
+ ```
112
+
113
+ **Sample output:**
114
+
115
+ ```html
116
+ <button data-intent="primary">Save Changes</button>
117
+ ```
118
+
119
+ ---
120
+
121
+ ### `ignix-lite add <component>`
122
+
123
+ Print a ready-to-use HTML template for any Ignix-Lite component.
124
+
125
+ ```bash
126
+ ignix-lite add button
127
+ ignix-lite add accordion
128
+ ignix-lite add tooltip
129
+ ```
130
+
131
+ **Available components:**
132
+
133
+ | Component | Component | Component |
134
+ | ----------- | ------------ | ------------ |
135
+ | `accordion` | `alert` | `avatar` |
136
+ | `badge` | `breadcrumb` | `button` |
137
+ | `card` | `checkbox` | `codeblock` |
138
+ | `combobox` | `dialog` | `divider` |
139
+ | `dropdown` | `form` | `grid` |
140
+ | `input` | `meter` | `navigation` |
141
+ | `progress` | `radio` | `select` |
142
+ | `skeleton` | `table` | `tabs` |
143
+ | `textarea` | `toast` | `tooltip` |
144
+
145
+ ---
146
+
147
+ ### `ignix-lite validate <file>`
148
+
149
+ Validate an HTML file against Ignix-Lite design rules. Checks for correct usage of `data-intent`, `data-size`, slot attributes, and forbidden patterns like `class=` or `color=`.
150
+
151
+ ```bash
152
+ ignix-lite validate src/index.html
153
+ ```
154
+
155
+ **Sample output:**
156
+
157
+ ```
158
+ 🔍 Validation Report
159
+ ════════════════════════════════════════════════════════════
160
+ File: src/index.html
161
+
162
+ ✘ FAIL: Validation failed with 2 violation(s)
163
+ Score: 60/100
164
+
165
+ [Violation 1]
166
+ Line: 12
167
+ Element: <button>
168
+ Problem: Use data-intent instead of class for styling
169
+ Fix: Replace class="btn-danger" with data-intent="danger"
170
+ ```
171
+
172
+ ---
173
+
174
+ ### `ignix-lite check-a11y <file>`
175
+
176
+ Audit an HTML file for WCAG 2.2 accessibility issues. Reports errors and warnings with actionable fixes.
177
+
178
+ ```bash
179
+ ignix-lite check-a11y src/index.html
180
+ ```
181
+
182
+ **Sample output:**
183
+
184
+ ```
185
+ ♿ Accessibility Audit Report
186
+ ════════════════════════════════════════════════════════════
187
+ File: src/index.html
188
+ Standards: WCAG 2.2 AA
189
+ Summary: Passed 8 rules, Found 1 issue(s)
190
+
191
+ ✘ FAIL: Accessibility check failed. Score: 80/100
192
+
193
+ [Issue 1] ✘ missing-alt (ERROR)
194
+ Element: <img src="avatar.png">
195
+ Message: Images must have an alt attribute
196
+ Fix: Add alt="descriptive text" to the <img> element
197
+ ```
198
+
199
+ ---
200
+
201
+ ### `ignix-lite theme [prompt]`
202
+
203
+ Generate CSS theme variables from a natural language description or a hex color and write them to your stylesheet.
204
+
205
+ ```bash
206
+ ignix-lite theme "dark mode with blue primary"
207
+ ignix-lite theme --primary "#e11d48"
208
+ ignix-lite theme "earthy green tones" --style-file src/styles/theme.css
209
+ ```
210
+
211
+ **Options:**
212
+
213
+ | Flag | Description |
214
+ | ------------------------- | ------------------------------------------------------ |
215
+ | `-p, --primary <color>` | Explicit primary color (hex or HSL) |
216
+ | `-s, --style-file <path>` | Target stylesheet path (overrides `ignix.config.json`) |
217
+
218
+ **Sample output:**
219
+
220
+ ```
221
+ ✔ Theme successfully updated in src/index.css
222
+ Resolved primary color: #e11d48
223
+ Mode: Light
224
+ ```
225
+
226
+ > **Note:** Requires `ignix.config.json` (created by `ignix-lite init`) unless `--style-file` is specified.
227
+
228
+ ---
229
+
230
+ ### `ignix-lite list`
231
+
232
+ List all available Ignix-Lite components.
233
+
234
+ ```bash
235
+ ignix-lite list
236
+ ```
237
+
238
+ ---
239
+
240
+ ### `ignix-lite info <component>`
241
+
242
+ Show the full manifest, allowed props, and usage guidelines for a specific component.
243
+
244
+ ```bash
245
+ ignix-lite info button
246
+ ignix-lite info tooltip
247
+ ```
248
+
249
+ ---
250
+
251
+ ### `ignix-lite preview <file>`
252
+
253
+ Render an HTML or Emmet file in a headless browser and save a PNG screenshot. Useful for quick visual checks without opening a browser.
254
+
255
+ ```bash
256
+ ignix-lite preview src/index.html
257
+ ignix-lite preview component.html --output screenshot.png --width 800 --theme dark
258
+ ```
259
+
260
+ **Options:**
261
+
262
+ | Flag | Default | Description |
263
+ | --------------------------- | ------------- | ------------------------ |
264
+ | `-o, --output <file>` | `preview.png` | Output image path |
265
+ | `-w, --width <pixels>` | `400` | Viewport width in pixels |
266
+ | `-t, --theme <light\|dark>` | system | Emulated color scheme |
267
+
268
+ ---
269
+
270
+ ### `ignix-lite mcp setup <client>`
271
+
272
+ Automatically configure the Ignix-Lite MCP server for your AI editor. **Zero manual steps** — the CLI writes directly to the editor's config file.
273
+
274
+ ```bash
275
+ ignix-lite mcp setup claude # Claude Desktop
276
+ ignix-lite mcp setup claude-code # Claude Code CLI
277
+ ignix-lite mcp setup gemini # Gemini CLI
278
+ ignix-lite mcp setup cursor # Cursor editor
279
+ ```
280
+
281
+ **All clients are fully auto-configured.** After running the command:
282
+
283
+ | Client | Config File Written | Next Step |
284
+ | --------------------------- | --------------------------------------------- | ---------------------------------------------- |
285
+ | `claude` / `claude-desktop` | `%APPDATA%\Claude\claude_desktop_config.json` | Restart Claude Desktop |
286
+ | `claude-code` | `~/.claude.json` | Open any project with `claude` |
287
+ | `gemini` | `~/.gemini/settings.json` | Start a new `gemini` session |
288
+ | `cursor` | `~/.cursor/mcp.json` | Reload Cursor (`Ctrl+Shift+P` → Reload Window) |
289
+
290
+ **No client argument?** Running `ignix-lite mcp setup` without an argument prints a help menu listing all supported clients.
291
+
292
+ ---
293
+
294
+ ### `ignix-lite mcp start`
295
+
296
+ Start the Ignix-Lite MCP server directly. Useful for testing or custom integrations.
297
+
298
+ ```bash
299
+ ignix-lite mcp start
300
+ ```
301
+
302
+ ---
303
+
304
+ ## The `ignix.config.json` File
305
+
306
+ Created by `ignix-lite init`. Most commands read this file automatically.
307
+
308
+ ```json
309
+ {
310
+ "framework": "vanilla",
311
+ "style": "src/index.css",
312
+ "theme": {
313
+ "primary": "#6366f1"
314
+ }
315
+ }
316
+ ```
317
+
318
+ ---
319
+
320
+ ## Using with AI Editors (MCP)
321
+
322
+ Ignix-Lite ships with a full **MCP server** that exposes all engine tools to AI assistants. Once set up, your AI can generate components, validate markup, audit accessibility, and preview components — all from natural language in the chat.
323
+
324
+ **One command. Zero manual config.**
325
+
326
+ ```bash
327
+ ignix-lite mcp setup claude # Claude Desktop
328
+ ignix-lite mcp setup claude-code # Claude Code CLI
329
+ ignix-lite mcp setup gemini # Gemini CLI
330
+ ignix-lite mcp setup cursor # Cursor editor
331
+ ```
332
+
333
+ Then just start chatting:
334
+
335
+ > _"Build me a login form with a warning alert at the top"_
336
+ > _"Validate my index.html for Ignix-Lite design rules"_
337
+ > _"Generate a dark theme with blue primary color"_
338
+
339
+ ---
340
+
341
+ ## How `ignix-lite build` Works
342
+
343
+ The `build` command uses a **two-layer intent engine** (no external API needed):
344
+
345
+ 1. **Intent Table** (Layer 1) — A hand-crafted table of ~40 common patterns. Fast, deterministic, high confidence.
346
+ 2. **Vector Index** (Layer 2) — A local semantic index for novel or complex descriptions.
347
+
348
+ The engine supports **multi-component stitching** — when your description mentions multiple components (using "and", "with", etc.), it synthesizes them together:
349
+
350
+ ```bash
351
+ ignix-lite build "an avatar image and a loading skeleton below it"
352
+ # → img[src="?" alt="User" data-size=md] + span[role=status aria-busy=true data-shape=rect]
353
+ ```
354
+
355
+ ---
356
+
357
+ ## Related Packages
358
+
359
+ | Package | Description |
360
+ | ------------------------------------------------- | ------------------------------------------------------------ |
361
+ | [`@mindfiredigital/ignix-lite-engine`](../engine) | Core engine: intent resolution, validation, theming, preview |
362
+ | [`@mindfiredigital/ignix-lite-mcp`](../mcp) | MCP server exposing all engine tools to AI editors |
363
+
364
+ ---
365
+
366
+ ## License
367
+
368
+ MIT © [Mindfire Digital](https://www.mindfiredigital.com)