inventive-ui 0.0.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/README.md ADDED
@@ -0,0 +1,650 @@
1
+ # IUI CLI
2
+
3
+ The official command-line tool for the **Inventive UI** design system. Use it to authenticate, initialize projects, install the framework and component library, manage asset packages, and keep everything up to date.
4
+
5
+ **Architecture:** For the full end-to-end flow — how the CLI connects to Framework, Components, the three config files, asset packages, and bundlers — see [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md).
6
+
7
+ ---
8
+
9
+ ## Installation
10
+
11
+ The CLI is published on **public npm**:
12
+
13
+ ```bash
14
+ npm install -g inventive-ui
15
+ ```
16
+
17
+ Requires **Node.js 20+**.
18
+
19
+ After install, run `iui login` once to authenticate for private `@inventive-ui/*` packages (framework, components, assets) on the Inventive UI registry.
20
+
21
+ **Maintainers:** bump `package.json` version and push to `main` — GitHub Actions publishes to npm when the version is new (`NPM_TOKEN` secret). Or run `npm run publish:public` locally.
22
+
23
+ ---
24
+
25
+ ## Compile-first CSS (framework ≥ 1.0.50)
26
+
27
+ Inventive UI builds utility CSS at **dev/build time** (Node), then injects it into `<head>` before paint. The CLI scaffolds the wiring; you still need the matching bundler plugin.
28
+
29
+ | Bundler | What `iui init` / doctor expect |
30
+ |---------|----------------------------------|
31
+ | Vite 6+ | `vite.config.ts` with `inventiveUiVite({ root: import.meta.dirname })` and `optimizeDeps.exclude: [...IUI_ASSET_OPTIMIZE_DEPS_EXCLUDE]` (asset packages only) |
32
+
33
+ `inventiveUiVite()` excludes `@inventive-ui/framework` from `optimizeDeps` automatically — do not add it to `vite.config.ts` or to `optimizeDeps.include`.
34
+ | Webpack | `plugins: [...inventiveUiWebpack()]` + `html-webpack-plugin` in the app |
35
+ | Next.js | `export default withIUI({ ... })` + root `<IUIRegistry>` |
36
+
37
+ `iui.config.ts` can include an optional compile-first `build` block. **`scanDirs` / `scanPackages` are not required** — Framework defaults to `["src", ".iui"]` and `["@inventive-ui/components"]`.
38
+
39
+ Documented init toggles (`packageSafelist`, `includeShadeMatrix`, theme/palette/arbitrary flags, etc.) are listed in Framework `docs/01-compile-first-guide.md` for the docs site.
40
+
41
+ **Do not** import style-map `.generated` files into the browser — keep them on the scanner path (default `src` / `.iui`, or custom `build.scanDirs`).
42
+
43
+ `iui doctor` warns when Vite/Webpack/Next tooling is present but the plugin (or Next registry) is missing.
44
+
45
+ ---
46
+
47
+ ## Quick start
48
+
49
+ ### New project
50
+
51
+ ```bash
52
+ iui login
53
+ iui init # interactive — creates configs, installs framework
54
+ iui install components # install @inventive-ui/components + prepare slots
55
+ iui install assets # optional — interactive asset picker
56
+ ```
57
+
58
+ Non-interactive example:
59
+
60
+ ```bash
61
+ iui init -y -f vite
62
+ ```
63
+
64
+ ### Joining an existing team repo
65
+
66
+ If the repo already has a committed `.iui/` folder, skip `iui init`:
67
+
68
+ ```bash
69
+ iui login
70
+ git clone <repo> && cd <repo>
71
+ iui setup # registry config, workspace install, diagnostics
72
+ ```
73
+
74
+ See [Team onboarding](docs/TEAM-ONBOARDING.md) for admin/teammate flows and CI setup.
75
+
76
+ ---
77
+
78
+ ## Command reference
79
+
80
+ Every command below is implemented in the CLI today. Run `iui --help` or `iui <command> --help` for built-in usage text.
81
+
82
+ ### All commands at a glance
83
+
84
+ | Command | What it does | Auth required |
85
+ | ------- | ------------ | ------------- |
86
+ | `iui login` | Sign in with GitHub OAuth; link license; configure npm auth | No |
87
+ | `iui logout` | Remove stored credentials and npm registry auth | No |
88
+ | `iui whoami` | Show GitHub identity, plan, license, seats, update window | No |
89
+ | `iui init` | Initialize a new project: register, install framework, write configs | Yes |
90
+ | `iui setup` | Clone-to-green: `.npmrc`, install deps, run doctor | Yes |
91
+ | `iui install framework` | Install or reinstall `@inventive-ui/framework` | Yes |
92
+ | `iui install components` | Install `@inventive-ui/components` and rebuild slot registry | Yes |
93
+ | `iui install assets [ids...]` | Install asset packages (interactive picker if no ids) | Yes |
94
+ | `iui list` | Show installed framework, components, assets, and slots | No |
95
+ | `iui list -a` | Show all components available in the registry | No |
96
+ | `iui update` | Check and apply framework, component, asset, and CLI updates | Yes |
97
+ | `iui doctor` | Run project health diagnostics | No |
98
+ | `iui assets list` | Show available and installed asset packages | Yes |
99
+ | `iui assets remove <id>` | Uninstall an asset package and update slot registry | Yes |
100
+ | `iui team list` | List team seat assignments (admin) | Yes |
101
+ | `iui team add [email]` | Add a teammate to team seats (admin) | Yes |
102
+ | `iui team remove [email]` | Remove a teammate from active seats (admin) | Yes |
103
+ | `iui devices list` | List CLI devices authorized for your account | Yes |
104
+ | `iui devices revoke [id]` | Revoke a device login | Yes |
105
+ | `iui deploy-token list` | List deploy tokens for CI/hosting | Yes |
106
+ | `iui deploy-token create [name]` | Create a short-lived scoped deploy token | Yes |
107
+ | `iui deploy-token revoke <id>` | Revoke a deploy token immediately | Yes |
108
+
109
+ **Note:** Inside an initialized project, most commands automatically validate and repair the slot registry before running.
110
+
111
+ ### Global options
112
+
113
+ These work with any command:
114
+
115
+ | Option | Description |
116
+ | ------ | ----------- |
117
+ | `-C, --cwd <dir>` | Run as if started in the given directory |
118
+ | `-q, --quiet` | Minimal output (also respects `IUI_QUIET=1`) |
119
+ | `--no-color` | Disable ANSI colors |
120
+ | `-V, --version` | Print CLI version |
121
+ | `-h, --help` | Show help for a command |
122
+
123
+ ---
124
+
125
+ ### `iui login`
126
+
127
+ Authenticate with GitHub OAuth, link your Inventive UI license, and write npm registry auth to `~/.npmrc`.
128
+
129
+ **What it does:**
130
+ - Opens the browser for GitHub OAuth (polls until complete or timeout)
131
+ - Saves session to `~/.iui/config.json`
132
+ - Configures global npm auth for `@inventive-ui/*` installs
133
+ - Reuses an existing valid session unless `--force` is passed
134
+
135
+ | Option | Description |
136
+ | ------ | ----------- |
137
+ | `-f, --force` | Force re-authentication and register this device |
138
+ | `--bootstrap` | After login, optionally prompt to run `iui init` and install assets |
139
+
140
+ ```bash
141
+ iui login
142
+ iui login --force
143
+ iui login --bootstrap
144
+ ```
145
+
146
+ ---
147
+
148
+ ### `iui logout`
149
+
150
+ Remove locally stored credentials and clear npm registry auth written by the CLI.
151
+
152
+ ```bash
153
+ iui logout
154
+ ```
155
+
156
+ ---
157
+
158
+ ### `iui whoami`
159
+
160
+ Show the currently signed-in GitHub user, plan type, license status, seat usage, and update window expiry.
161
+
162
+ ```bash
163
+ iui whoami
164
+ ```
165
+
166
+ ---
167
+
168
+ ### `iui init`
169
+
170
+ Initialize an Inventive UI project in the current directory (or workspace root with `--workspace`).
171
+
172
+ **What it does:**
173
+ - Validates auth and license
174
+ - Registers the project with the Inventive UI API
175
+ - Writes project `.npmrc` (scope line only) and updates `.gitignore`
176
+ - Ensures React 19.x or Vite 6.x+ is present (installs if missing)
177
+ - Installs `@inventive-ui/framework` and `@inventive-ui/components`
178
+ - Generates `iui.config.ts` (with compile-first `build` block), `component.config.ts`, `assets.config.json`, and Vite/TS configs as needed
179
+ - Creates `.iui/project.json`, component/package manifests, and the slot registry
180
+
181
+ | Option | Description |
182
+ | ------ | ----------- |
183
+ | `-f, --framework <preset>` | Framework preset: `react` or `vite` |
184
+ | `-y, --yes` | Non-interactive with default confirmations |
185
+ | `--workspace` | Monorepo: init once at workspace root and link all workspace apps |
186
+ | `--source <api\|registry>` | Install source for framework/components (default: `api`) |
187
+
188
+ ```bash
189
+ iui init
190
+ iui init -y -f vite
191
+ iui init -y -f react --workspace
192
+ iui init --source registry
193
+ ```
194
+
195
+ ---
196
+
197
+ ### `iui setup`
198
+
199
+ Set up a cloned project for a teammate. Does **not** upgrade packages — installs what is in `package.json` and the lockfile.
200
+
201
+ **What it does:**
202
+ - Ensures you are authenticated
203
+ - Writes project `.npmrc` and global npm auth
204
+ - Runs `npm install` / `pnpm install` / `yarn install` at the workspace root (monorepo-aware)
205
+ - Runs `iui doctor` for every app with a `.iui/` folder
206
+
207
+ | Option | Description |
208
+ | ------ | ----------- |
209
+ | `--fix` | Apply safe automatic fixes during diagnostics |
210
+ | `-y, --yes` | Non-interactive with default confirmations |
211
+
212
+ ```bash
213
+ iui setup
214
+ iui setup --fix
215
+ iui setup --fix -y
216
+ ```
217
+
218
+ Use `iui update` when you need newer framework, component, or asset versions.
219
+
220
+ ---
221
+
222
+ ### `iui install framework`
223
+
224
+ Install or reinstall `@inventive-ui/framework`. Requires an initialized project (`.iui/project.json`).
225
+
226
+ **What it does:**
227
+ - Resolves install path for monorepos (installs at workspace root)
228
+ - Downloads and installs the framework package
229
+ - Syncs `package.json` if `node_modules` is ahead of the declared semver range
230
+
231
+ | Option | Description |
232
+ | ------ | ----------- |
233
+ | `--source <api\|registry>` | Install source (default: `api`) |
234
+
235
+ ```bash
236
+ iui install framework
237
+ iui install framework --source registry
238
+ iui -C apps/docs install framework
239
+ ```
240
+
241
+ ---
242
+
243
+ ### `iui install components`
244
+
245
+ Install or reinstall `@inventive-ui/components` and rebuild the slot registry.
246
+
247
+ **What it does:**
248
+ - Installs the component library package
249
+ - Regenerates `.iui/generated/` slot files and updates manifests
250
+ - Syncs `package.json` if `node_modules` is ahead of the declared semver range
251
+ - Skips reinstall if the same version is already installed (unless upgrading via `iui update`)
252
+
253
+ | Option | Description |
254
+ | ------ | ----------- |
255
+ | `--source <api\|registry>` | Install source (default: `api`) |
256
+
257
+ ```bash
258
+ iui install components
259
+ iui -C apps/landing install components
260
+ ```
261
+
262
+ ---
263
+
264
+ ### `iui install assets [ids...]`
265
+
266
+ Install one or more asset packages (icons, illustrations, logos, flags, emoji, loaders, file types).
267
+
268
+ **What it does:**
269
+ - Validates license
270
+ - Shows an interactive picker when no package ids are given
271
+ - Installs selected packages and updates `assets.config.json` and the slot registry
272
+
273
+ | Option | Description |
274
+ | ------ | ----------- |
275
+ | `--source <api\|registry>` | Install source (default: `api`) |
276
+
277
+ **Available package ids:**
278
+
279
+ | Id | Package |
280
+ | -- | ------- |
281
+ | `icons-lucide` | Lucide Icons |
282
+ | `icons-material` | Material Icons |
283
+ | `icons-phosphor` | Phosphor Icons |
284
+ | `material-symbols` | Material Symbols |
285
+ | `illustrations` | Storyset Illustrations |
286
+ | `logos` | Mono Logos |
287
+ | `color-logos` | Color Logos |
288
+ | `flags` | Flagpack |
289
+ | `emoji` | Emoji |
290
+ | `loaders` | LDRS Loaders |
291
+ | `file-types` | File Type Icons |
292
+
293
+ ```bash
294
+ iui install assets # interactive picker
295
+ iui install assets icons-lucide material-symbols
296
+ iui install assets illustrations flags emoji
297
+ ```
298
+
299
+ ---
300
+
301
+ ### `iui list`
302
+
303
+ Show installed framework version, component count, asset packages, and slot registry status for the current project.
304
+
305
+ ```bash
306
+ iui list
307
+ iui -C apps/docs list
308
+ ```
309
+
310
+ ---
311
+
312
+ ### `iui list -a` / `iui list --available`
313
+
314
+ Fetch and display all components available in the remote registry. Marks which ones are already installed. Works outside an initialized project.
315
+
316
+ ```bash
317
+ iui list -a
318
+ iui list --available
319
+ ```
320
+
321
+ ---
322
+
323
+ ### `iui update`
324
+
325
+ Check for and apply updates to the framework, components, individual components, and asset packages.
326
+
327
+ **What it does:**
328
+ - Reports if a newer CLI version exists (upgrade with `npx inventive-ui@latest`)
329
+ - Checks registry for component, framework, and asset updates
330
+ - Respects license update window (expired licenses see available versions but cannot install)
331
+ - Installs selected updates and rebuilds slot registry
332
+ - Syncs `@inventive-ui/*` entries in `package.json` to `^<installed>` when `node_modules` is ahead
333
+
334
+ | Option | Description |
335
+ | ------ | ----------- |
336
+ | `-y, --yes` | Apply all eligible updates without prompts |
337
+ | `--check` | Check only; exit code `1` when updates exist |
338
+ | `--source <api\|registry>` | Install source for updates (default: `api`) |
339
+
340
+ ```bash
341
+ iui update
342
+ iui update -y
343
+ iui update --check
344
+ iui -C apps/docs update -y
345
+ ```
346
+
347
+ ---
348
+
349
+ ### `iui doctor`
350
+
351
+ Run a multi-point health check. Read-only by default; exits with code `1` if any check fails.
352
+
353
+ **What it checks:**
354
+ - Authentication and license validity (skipped with `--config-only`)
355
+ - Registry reachability (skipped with `--config-only`)
356
+ - `package.json` present
357
+ - Project initialized (`.iui/project.json`)
358
+ - `@inventive-ui/framework` and `@inventive-ui/components` installed
359
+ - React 19.x or Vite 6.x (and matching `react-dom`)
360
+ - **Three-config tiers:** `iui.config.ts` must not import `assets.config.json` or contain asset/component keys; `assets.config.json` schema + `globalIcons`; `component.config.ts` must not contain theme keys
361
+ - Component and asset package counts
362
+ - Slot registry integrity
363
+ - Package compatibility between framework and components
364
+ - Whether installed versions are behind latest (warns to run `iui update`)
365
+ - Syncs `package.json` when `node_modules` is ahead of declared ranges
366
+ - Generated slot file validity
367
+ - `component.config.ts` validity (TypeScript check)
368
+ - Compile-first bundler wiring (Vite/Webpack/Next plugin present when tooling detected)
369
+
370
+ In monorepos, doctors every app with a `.iui/` folder when run from the workspace root.
371
+
372
+ | Option | Description |
373
+ | ------ | ----------- |
374
+ | `--fix` | Apply safe fixes (strip assets from `iui.config.ts`, patch build block, repair slots, install TypeScript for config validation) |
375
+ | `--config-only` | Config tiers + slots + compile-first only — no auth/registry. Use in CI and pre-commit hooks |
376
+
377
+ ```bash
378
+ iui doctor
379
+ iui doctor --config-only # CI / pre-commit — no login required
380
+ iui doctor --fix
381
+ iui -C apps/docs doctor
382
+ ```
383
+
384
+ ---
385
+
386
+ ### `iui assets list`
387
+
388
+ Show all available asset packages grouped by category, with installed status.
389
+
390
+ ```bash
391
+ iui assets list
392
+ ```
393
+
394
+ ---
395
+
396
+ ### `iui assets remove <id>`
397
+
398
+ Remove an installed asset package, update `assets.config.json`, and prune its slots.
399
+
400
+ ```bash
401
+ iui assets remove illustrations
402
+ iui assets remove icons-lucide
403
+ ```
404
+
405
+ ---
406
+
407
+ ### `iui team` (admin, Team plan)
408
+
409
+ Manage team seat assignments. `iui team` alone runs `iui team list`.
410
+
411
+ #### `iui team list`
412
+
413
+ List active team seat assignments.
414
+
415
+ | Option | Description |
416
+ | ------ | ----------- |
417
+ | `--all` | Include inactive/removed seat records |
418
+
419
+ ```bash
420
+ iui team
421
+ iui team list
422
+ iui team list --all
423
+ ```
424
+
425
+ #### `iui team add [email]`
426
+
427
+ Add a GitHub-linked email to team seats. Prompts for email if omitted.
428
+
429
+ ```bash
430
+ iui team add teammate@example.com
431
+ iui team add
432
+ ```
433
+
434
+ #### `iui team remove [email]`
435
+
436
+ Remove a user from active team seats. Prompts for email if omitted.
437
+
438
+ ```bash
439
+ iui team remove teammate@example.com
440
+ ```
441
+
442
+ See [Team onboarding](docs/TEAM-ONBOARDING.md) for the full admin flow.
443
+
444
+ ---
445
+
446
+ ### `iui devices`
447
+
448
+ Manage CLI devices authorized for your account. `iui devices` alone runs `iui devices list`.
449
+
450
+ #### `iui devices list`
451
+
452
+ List all devices that have completed `iui login`.
453
+
454
+ ```bash
455
+ iui devices
456
+ iui devices list
457
+ ```
458
+
459
+ #### `iui devices revoke [device-id]`
460
+
461
+ Revoke a device. Prompts to pick one if id is omitted.
462
+
463
+ ```bash
464
+ iui devices revoke abc123
465
+ iui devices revoke
466
+ ```
467
+
468
+ Use when offboarding a machine or cleaning up stale logins.
469
+
470
+ ---
471
+
472
+ ### `iui deploy-token`
473
+
474
+ Manage short-lived deploy tokens for CI and hosting. `iui deploy-token` alone runs `iui deploy-token list`.
475
+
476
+ #### `iui deploy-token list`
477
+
478
+ List deploy tokens (active, expired, and revoked).
479
+
480
+ ```bash
481
+ iui deploy-token
482
+ iui deploy-token list
483
+ ```
484
+
485
+ #### `iui deploy-token create [name]`
486
+
487
+ Create a scoped deploy token. Store the output as `IUI_DEPLOY_TOKEN` in your CI secrets.
488
+
489
+ | Option | Description |
490
+ | ------ | ----------- |
491
+ | `--days <days>` | Validity in days, 1–30 (default: `7`) |
492
+ | `--packages <packages>` | Comma-separated package ids or `*` (default: `*`) |
493
+
494
+ ```bash
495
+ iui deploy-token create
496
+ iui deploy-token create "github-actions" --days 7 --packages "*"
497
+ iui deploy-token create "vercel" --days 14 --packages "framework,components"
498
+ ```
499
+
500
+ #### `iui deploy-token revoke <token-id>`
501
+
502
+ Revoke a deploy token immediately.
503
+
504
+ ```bash
505
+ iui deploy-token revoke tok_abc123
506
+ ```
507
+
508
+ See [Team onboarding](docs/TEAM-ONBOARDING.md) and [examples/github-actions/consumer-ci.yml](examples/github-actions/consumer-ci.yml) for CI setup.
509
+
510
+ ---
511
+
512
+ ## Monorepos
513
+
514
+ Supported layouts: npm/pnpm/yarn workspaces (`apps/*`, `packages/*`, explicit paths, nested globs).
515
+
516
+ | Approach | When to use |
517
+ | -------- | ----------- |
518
+ | Per-app `iui init` (`.iui/` in each app) | Recommended for multi-app repos (e.g. docs + landing) |
519
+ | `iui init --workspace` (single root `.iui/`) | Opt-in shared root setup |
520
+
521
+ From the workspace root:
522
+
523
+ ```bash
524
+ iui setup # installs at root; doctors every app with .iui/
525
+ ```
526
+
527
+ From an app directory (`apps/docs`, `apps/landing`):
528
+
529
+ ```bash
530
+ npx iui update -y
531
+ npx iui install framework
532
+ ```
533
+
534
+ Installs still run at the workspace root. Use `-C apps/docs` to target a specific app from elsewhere.
535
+
536
+ ---
537
+
538
+ ## Install source
539
+
540
+ By default, packages install via the **Inventive UI API** (tarball download). Developers do not need GitHub Packages credentials for normal CLI use after `iui login`.
541
+
542
+ To install from the npm registry instead (internal/dev):
543
+
544
+ ```bash
545
+ iui install components --source registry
546
+ iui update --source registry
547
+ ```
548
+
549
+ Or set `IUI_INSTALL_SOURCE=registry`.
550
+
551
+ ---
552
+
553
+ ## Project files
554
+
555
+ After `iui init`, the CLI manages:
556
+
557
+ | Path | Purpose |
558
+ | ---- | ------- |
559
+ | `iui.config.ts` | `IUIThemeConfig` — theme, states, core, compile-first `build` block (no assets import) |
560
+ | `component.config.ts` | `ComponentConfigMap` — default variants, presets, cTags per component |
561
+ | `assets.config.json` | `IUIAssetsConfig` — libraries, `globalIcons`, `@alias` maps, binding/preload |
562
+ | `.iui/project.json` | Project ID, license, repo metadata |
563
+ | `.iui/components.json` | Installed component versions |
564
+ | `.iui/packages.json` | Installed asset package versions |
565
+ | `.iui/slots.json` | Slot registry (components + assets) |
566
+ | `.iui/generated/` | Managed slot helpers from the components **public slot contract** (do not edit) |
567
+ | `.iui/slot-registration-state.json` | Operational checksum/state for no-op validation (ephemeral) |
568
+ | `.iui/slot-registration.lock` | Short-lived lock file during slot reconciliation (ephemeral) |
569
+ | `.iui/classes.cache.json`, `.iui/build-*`, `public/iui/` | Compile-first build cache artifacts (ephemeral) |
570
+
571
+ Framework install status comes from `@inventive-ui/framework` in `node_modules`, not from `.iui/` metadata.
572
+
573
+ Commit `package.json`, one lockfile, `.iui/` metadata and generated slot helpers, config files, and the project `.npmrc` scope line (no tokens). Do not commit ephemeral `.iui` state/lock/build-cache files. See [Team onboarding](docs/TEAM-ONBOARDING.md#what-to-commit-in-a-shared-repo).
574
+
575
+ For the full integration map (Framework, Components, configs, bundlers), see [Architecture](docs/ARCHITECTURE.md). For ownership rules, validate vs repair, grouped slot codegen driven by `public-slot-contract.json`, and write-amplification KPIs, see [Consumer Codegen & Config Ownership](docs/CONSUMER-CODEGEN.md).
576
+
577
+ ---
578
+
579
+ ## Environment variables
580
+
581
+ | Variable | Default | Description |
582
+ | -------- | ------- | ----------- |
583
+ | `IUI_API_URL` | `https://api.inventiveui.com` | Override the backend API URL |
584
+ | `IUI_INSTALL_SOURCE` | `api` | Default install source: `api` or `registry` |
585
+ | `IUI_DEPLOY_TOKEN` | — | CI/hosting registry auth (from `deploy-token create`) |
586
+ | `IUI_QUIET` | — | Set to `1` for minimal output |
587
+ | `IUI_NO_BANNER` | — | Set to `1` to hide the CLI banner |
588
+ | `IUI_CI` | — | Set to `1` in trusted CI for non-interactive behavior |
589
+ | `IUI_YES` | — | Set to `1` to auto-confirm prompts where supported |
590
+ | `IUI_ALLOW_CUSTOM_API` | — | Allow non-default `IUI_API_URL` hosts (dev only) |
591
+
592
+ Local API example:
593
+
594
+ ```bash
595
+ export IUI_API_URL="http://localhost:3000"
596
+ ```
597
+
598
+ ---
599
+
600
+ ## CI deploy checklist
601
+
602
+ 1. Admin runs `iui deploy-token create "ci" --days 7 --packages "*"` and stores the token as `IUI_DEPLOY_TOKEN`.
603
+ 2. Commit a project `.npmrc` with only the scope line:
604
+
605
+ ```ini
606
+ @inventive-ui:registry=https://api.inventiveui.com/registry/npm
607
+ ```
608
+
609
+ 3. Inject auth at build time (never commit tokens):
610
+
611
+ ```bash
612
+ printf '%s\n%s\n' \
613
+ "//api.inventiveui.com/registry/npm/:_authToken=${IUI_DEPLOY_TOKEN}" \
614
+ "always-auth=true" >> ~/.npmrc
615
+ ```
616
+
617
+ 4. Run `npm ci` / `pnpm install` / `yarn install`, then your build.
618
+
619
+ **Do not** use `NODE_AUTH_TOKEN` in app repos — that secret belongs on the API server only. Personal `iui login` sessions are for developer machines, not CI.
620
+
621
+ ---
622
+
623
+ ## Development
624
+
625
+ ```bash
626
+ npm install
627
+ npm run build # compile to dist/
628
+ npm run dev # watch mode
629
+ npm test # typecheck + unit tests
630
+ npm run start -- <cmd> # run built CLI locally, e.g. npm run start -- doctor
631
+ ```
632
+
633
+ ---
634
+
635
+ ## Documentation
636
+
637
+ | Doc | Audience |
638
+ | --- | --- |
639
+ | [ARCHITECTURE.md](docs/ARCHITECTURE.md) | **Start here** — full CLI flow and integration with Framework, Components, configs, bundlers |
640
+ | [CONSUMER-CODEGEN.md](docs/CONSUMER-CODEGEN.md) | File ownership, validate vs repair, slot codegen |
641
+ | [TEAM-ONBOARDING.md](docs/TEAM-ONBOARDING.md) | Clone-to-green, CI tokens, what to commit |
642
+ | [RFC-002](docs/RFC-002-package-owned-runtime-registry.md) | 2.0 package-owned slot registry direction |
643
+ | [RFC-003](docs/RFC-003-CLI-GATING.md) | CLI gating / release policy |
644
+
645
+ ---
646
+
647
+ ## License
648
+
649
+ Inventive UI operates under a **Perpetual License + 1 Year Updates** model.
650
+ See [inventiveui.com](https://inventiveui.com) for licensing details.