@hobui/viui-cli 0.0.2 → 0.0.4

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.
Files changed (3) hide show
  1. package/README.md +10 -9
  2. package/dist/cli.js +6 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,15 +1,16 @@
1
- # @donan/cli (i-design-system CLI)
1
+ # @hobui/viui-cli
2
+
2
3
 
3
4
  CLI to sync i-design-system `.cursor` (rules, skills, commands, plans) into consumer repos. Use this so Cursor/AI in the consumer repo follows the same design system rules, tokens, and BEM conventions.
4
5
 
5
- **Scope:** Published under npm username `@donan`. If you published under a different scope, use that (e.g. `pnpm add @your-npm-username/cli`).
6
+ **Scope:** Published as `@hobui/viui-cli`. Consumer installs with `pnpm add @hobui/viui-cli`.
6
7
 
7
8
  ## One-command UX (recommended)
8
9
 
9
10
  At the consumer repo root, run:
10
11
 
11
12
  ```bash
12
- pnpm add @donan/cli
13
+ pnpm add @hobui/viui-cli
13
14
  ```
14
15
 
15
16
  After install, **postinstall** runs an interactive **setup wizard** (only when the terminal is interactive — not in CI):
@@ -24,7 +25,7 @@ No need to run `viui-cli init` or `pnpm add @viui/web` separately. To run the wi
24
25
 
25
26
  | Command | Description |
26
27
  | --------- | ----------- |
27
- | `setup` | Interactive wizard: init/sync .cursor, install @viui/web, optional postinstall. Runs automatically after `pnpm add @donan/cli` (postinstall). |
28
+ | `setup` | Interactive wizard: init/sync .cursor, install @viui/web, optional postinstall. Runs automatically after `pnpm add @hobui/viui-cli` (postinstall). |
28
29
  | `init` | Create `.cursor/` at repo root and copy rules, skills, commands (and optionally plans). Run once when onboarding. |
29
30
  | `sync` | Update existing `.cursor/` from the design system (overwrite). Use after design system updates. |
30
31
  | `version` | Print CLI version and, if present, the synced design system version (from `.cursor/.design-system-version`). |
@@ -34,14 +35,14 @@ No need to run `viui-cli init` or `pnpm add @viui/web` separately. To run the wi
34
35
  **From npm (after publish) — one command:**
35
36
 
36
37
  ```bash
37
- pnpm add @donan/cli
38
+ pnpm add @hobui/viui-cli
38
39
  # then follow the setup wizard (Y/n per step)
39
40
  ```
40
41
 
41
42
  **Manual steps (if you skip the wizard):**
42
43
 
43
44
  ```bash
44
- pnpm add -D @donan/cli
45
+ pnpm add -D @hobui/viui-cli
45
46
  pnpm exec viui-cli init
46
47
  pnpm add @viui/web
47
48
  ```
@@ -59,12 +60,12 @@ pnpm add @viui/web
59
60
 
60
61
  ```bash
61
62
  node path/to/i-design-system/packages/cli/dist/cli.js init
62
- # or: pnpm exec --prefix path/to/i-design-system/packages/cli @donan/cli init
63
+ # or: pnpm exec --prefix path/to/i-design-system/packages/cli @hobui/viui-cli init
63
64
  ```
64
65
 
65
66
  Always run `init` or `sync` from the **consumer repo root** (CWD = root). If you run from another folder (e.g. i-design-system), the wrong `.cursor` will be updated. The CLI logs `Syncing .cursor at: <path>` so you can confirm the target.
66
67
 
67
- **Auto-sync after install:** If the consumer has `@donan/cli` as a dependency (e.g. `"@donan/cli": "file:../../i-design-system/packages/cli"`), add a script so `.cursor` is synced automatically after each `pnpm install`:
68
+ **Auto-sync after install:** If the consumer has `@hobui/viui-cli` as a dependency (e.g. `"@hobui/viui-cli": "file:../../i-design-system/packages/cli"`), add a script so `.cursor` is synced automatically after each `pnpm install`:
68
69
 
69
70
  ```json
70
71
  "scripts": {
@@ -133,4 +134,4 @@ Then import components: `import { ViButton, ViInput, ... } from '@viui/web'`. Se
133
134
  pnpm build
134
135
  ```
135
136
 
136
- Runs `tsc` and copies `.cursor` from repo root into `dist/assets/cursor/`, and writes `.design-system-version` from root `package.json`. Published package includes `dist/` so `npx @donan/cli init` works without the source repo.
137
+ Runs `tsc` and copies `.cursor` from repo root into `dist/assets/cursor/`, and writes `.design-system-version` from root `package.json`. Published package includes `dist/` so `npx @hobui/viui-cli init` works without the source repo.
package/dist/cli.js CHANGED
@@ -250,7 +250,7 @@ async function runSetup(cwd, assetsDir, opts) {
250
250
  return defaultYes;
251
251
  return s === 'y' || s === 'yes';
252
252
  };
253
- console.log('\n@viui/cli — Setup i-design-system in this repo\n');
253
+ console.log(`\n${pkg.name ?? '@viui/cli'} — Setup i-design-system in this repo\n`);
254
254
  const runNow = opts.yes || (await ask('Run setup now?', true));
255
255
  if (!runNow) {
256
256
  console.log('Skipped. Run later: pnpm exec viui-cli setup');
@@ -308,7 +308,7 @@ const { values } = result;
308
308
  const positionals = result.positionals ?? [];
309
309
  const [command] = positionals;
310
310
  if (values.version && !command) {
311
- console.log(`@viui/cli ${pkg.version}`);
311
+ console.log(`${pkg.name ?? '@viui/cli'} ${pkg.version}`);
312
312
  const cwd = process.cwd();
313
313
  const versionFile = path.join(cwd, '.cursor', '.design-system-version');
314
314
  if (fs.existsSync(versionFile)) {
@@ -318,14 +318,14 @@ if (values.version && !command) {
318
318
  }
319
319
  if (values.help || !command || command === 'help') {
320
320
  console.log(`
321
- @viui/cli — Sync design system .cursor into your repo
321
+ ${pkg.name ?? '@viui/cli'} — Sync design system .cursor into your repo
322
322
 
323
323
  Usage: viui-cli <command> [options]
324
324
 
325
325
  Commands:
326
326
  init Create .cursor and copy rules, skills, commands (run once at repo root)
327
327
  sync Update .cursor from design system (overwrite)
328
- setup Interactive setup: init/sync .cursor, install @viui/web, optional postinstall (runs after pnpm add @viui/cli)
328
+ setup Interactive setup: init/sync .cursor, install @viui/web, optional postinstall (runs after pnpm add ${pkg.name ?? '@viui/cli'})
329
329
  version Print CLI and design system version
330
330
 
331
331
  Setup options:
@@ -348,12 +348,12 @@ Global:
348
348
  -h, --help Show this help
349
349
  -v, --version Print version
350
350
 
351
- One-command UX: pnpm add @viui/cli — then follow the setup steps. Or run: viui-cli setup
351
+ One-command UX: pnpm add ${pkg.name ?? '@viui/cli'} — then follow the setup steps. Or run: viui-cli setup
352
352
  `);
353
353
  process.exit(0);
354
354
  }
355
355
  if (command === 'version') {
356
- console.log(`@viui/cli ${pkg.version}`);
356
+ console.log(`${pkg.name ?? '@viui/cli'} ${pkg.version}`);
357
357
  const cwd = process.cwd();
358
358
  const versionFile = path.join(cwd, '.cursor', '.design-system-version');
359
359
  if (fs.existsSync(versionFile)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hobui/viui-cli",
3
- "version": "0.0.2",
3
+ "version": "0.0.4",
4
4
  "description": "CLI to sync i-design-system .cursor (rules, skills, commands) into consumer repos",
5
5
  "type": "module",
6
6
  "files": [