ui-ux-consultant-cli 1.0.0 → 1.1.0-beta.2

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 +57 -0
  2. package/dist/index.js +54 -7
  3. package/package.json +22 -3
package/README.md ADDED
@@ -0,0 +1,57 @@
1
+ # UI/UX Consultant Skill
2
+
3
+ [![npm](https://img.shields.io/npm/v/ui-ux-consultant-cli?style=flat-square&logo=npm)](https://www.npmjs.com/package/ui-ux-consultant-cli)
4
+ [![npm downloads](https://img.shields.io/npm/dm/ui-ux-consultant-cli?style=flat-square)](https://www.npmjs.com/package/ui-ux-consultant-cli)
5
+ [![License](https://img.shields.io/github/license/yatin-rai/ui-ux-consultant-skill?style=flat-square)](LICENSE)
6
+ [![Works with Claude Code](https://img.shields.io/badge/Works%20with-Claude%20Code-orange?style=flat-square&logo=anthropic)](https://claude.ai/code)
7
+ [![Works with Cursor](https://img.shields.io/badge/Works%20with-Cursor-blue?style=flat-square)](https://cursor.sh)
8
+ [![Works with Windsurf](https://img.shields.io/badge/Works%20with-Windsurf-purple?style=flat-square)](https://codeium.com/windsurf)
9
+
10
+ A zero-install, multi-framework UI/UX design consultant embedded in Claude. Covers 16 frameworks with opinionated code patterns, accessibility checklists, and a curated design catalog.
11
+
12
+ ## Frameworks Covered
13
+
14
+ Angular · React · Vue · Next.js · Nuxt · Svelte · Astro · SwiftUI · Jetpack Compose · Flutter · React Native · HTML+Tailwind · shadcn/ui · Laravel · Three.js · Nuxt UI
15
+
16
+ ## Design Catalog
17
+
18
+ - 23 UI styles (Minimalist, Glassmorphism, Brutalist, Bento Grid…)
19
+ - 35 color palettes across 6 mood categories
20
+ - 31 font pairings with Google Fonts imports
21
+ - 41 product types with layout and UX prescriptions
22
+
23
+ ## Installation
24
+
25
+ ```bash
26
+ npm install -g ui-ux-consultant-cli
27
+ uiux init --ai claude # Claude Code
28
+ uiux init --ai cursor # Cursor
29
+ uiux init --ai all # All supported assistants
30
+ ```
31
+
32
+ ## Usage
33
+
34
+ Just chat naturally — the skill activates automatically on UI/UX requests:
35
+
36
+ ```
37
+ Build a data table in Angular with sorting and pagination
38
+ Design a SaaS dashboard layout in Next.js
39
+ What color palette fits a fintech mobile app?
40
+ ```
41
+
42
+ ## Updating
43
+
44
+ ```bash
45
+ npm update -g ui-ux-consultant-cli
46
+ uiux update --ai claude
47
+ ```
48
+
49
+ ## Uninstalling
50
+
51
+ ```bash
52
+ uiux uninstall --ai claude
53
+ ```
54
+
55
+ ## License
56
+
57
+ MIT © Yatin Rai
package/dist/index.js CHANGED
@@ -40,6 +40,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
40
40
  const commander_1 = require("commander");
41
41
  const fs = __importStar(require("fs-extra"));
42
42
  const path = __importStar(require("path"));
43
+ const readline = __importStar(require("readline"));
43
44
  const chalk_1 = __importDefault(require("chalk"));
44
45
  const program = new commander_1.Command();
45
46
  const ASSETS_DIR = path.join(__dirname, '..', 'assets', 'ui-ux-consultant');
@@ -51,11 +52,21 @@ const PLATFORM_PATHS = {
51
52
  };
52
53
  function getInstallTarget(ai, global, cwd) {
53
54
  const home = process.env.USERPROFILE || process.env.HOME || '~';
55
+ const resolvedHome = path.resolve(home);
54
56
  const base = global
55
- ? path.join(home, `.${ai}`, 'skills')
57
+ ? path.join(resolvedHome, `.${ai}`, 'skills')
56
58
  : path.join(cwd, PLATFORM_PATHS[ai] || path.join(`.${ai}`, 'skills'));
57
59
  return path.join(base, 'ui-ux-consultant');
58
60
  }
61
+ function confirm(question) {
62
+ const rl = readline.createInterface({ input: process.stdin, output: process.stdout });
63
+ return new Promise(resolve => {
64
+ rl.question(question, answer => {
65
+ rl.close();
66
+ resolve(answer.trim().toLowerCase() === 'y');
67
+ });
68
+ });
69
+ }
59
70
  const pkg = require('../package.json');
60
71
  program
61
72
  .name('uiux')
@@ -66,6 +77,8 @@ program
66
77
  .description('Install the UI/UX Consultant skill into your AI assistant')
67
78
  .option('--ai <platform>', 'Target platform: claude | cursor | windsurf | copilot | all', 'claude')
68
79
  .option('--global', 'Install to home directory (available across all projects)', false)
80
+ .option('--yes', 'Skip confirmation prompts', false)
81
+ .option('--dry-run', 'Preview install path without writing any files', false)
69
82
  .action(async (opts) => {
70
83
  const cwd = process.cwd();
71
84
  const platforms = opts.ai === 'all'
@@ -78,6 +91,18 @@ program
78
91
  process.exit(1);
79
92
  }
80
93
  const target = getInstallTarget(platform, opts.global, cwd);
94
+ if (opts.dryRun) {
95
+ console.log(chalk_1.default.yellow(`[dry-run] Would install to: ${target}`));
96
+ continue;
97
+ }
98
+ const alreadyExists = await fs.pathExists(target);
99
+ if (alreadyExists && !opts.yes) {
100
+ const ok = await confirm(chalk_1.default.yellow(`Skill already exists at ${target}. Overwrite? (y/N) `));
101
+ if (!ok) {
102
+ console.log(chalk_1.default.gray(`Skipped ${platform}.`));
103
+ continue;
104
+ }
105
+ }
81
106
  console.log(chalk_1.default.blue(`Installing to: ${target}`));
82
107
  try {
83
108
  await fs.ensureDir(path.dirname(target));
@@ -88,15 +113,30 @@ program
88
113
  console.error(chalk_1.default.red(`✗ Failed for ${platform}:`), err);
89
114
  }
90
115
  }
91
- console.log(chalk_1.default.bold('\nDone! Start a new Claude session and ask for UI/UX help.'));
116
+ if (!opts.dryRun) {
117
+ console.log(chalk_1.default.bold('\nDone! Start a new Claude session and ask for UI/UX help.'));
118
+ }
92
119
  });
93
120
  program
94
121
  .command('update')
95
122
  .description('Re-sync skill files from the installed CLI version')
96
123
  .option('--ai <platform>', 'Target platform', 'claude')
97
124
  .option('--global', 'Update global install', false)
125
+ .option('--yes', 'Skip confirmation prompt', false)
126
+ .option('--dry-run', 'Preview update path without writing any files', false)
98
127
  .action(async (opts) => {
99
128
  const target = getInstallTarget(opts.ai, opts.global, process.cwd());
129
+ if (opts.dryRun) {
130
+ console.log(chalk_1.default.yellow(`[dry-run] Would update: ${target}`));
131
+ return;
132
+ }
133
+ if (!opts.yes) {
134
+ const ok = await confirm(chalk_1.default.yellow(`Update skill at ${target}? (y/N) `));
135
+ if (!ok) {
136
+ console.log(chalk_1.default.gray('Update cancelled.'));
137
+ return;
138
+ }
139
+ }
100
140
  console.log(chalk_1.default.blue(`Updating: ${target}`));
101
141
  try {
102
142
  await fs.copy(ASSETS_DIR, target, { overwrite: true });
@@ -111,15 +151,22 @@ program
111
151
  .description('Remove the installed skill')
112
152
  .option('--ai <platform>', 'Target platform', 'claude')
113
153
  .option('--global', 'Remove from global install', false)
154
+ .option('--yes', 'Skip confirmation prompt', false)
114
155
  .action(async (opts) => {
115
156
  const target = getInstallTarget(opts.ai, opts.global, process.cwd());
116
- if (await fs.pathExists(target)) {
117
- await fs.remove(target);
118
- console.log(chalk_1.default.green(`✓ Removed: ${target}`));
119
- }
120
- else {
157
+ if (!await fs.pathExists(target)) {
121
158
  console.log(chalk_1.default.yellow(`Nothing to remove at: ${target}`));
159
+ return;
160
+ }
161
+ if (!opts.yes) {
162
+ const ok = await confirm(chalk_1.default.red(`Remove skill at ${target}? This cannot be undone. (y/N) `));
163
+ if (!ok) {
164
+ console.log(chalk_1.default.gray('Uninstall cancelled.'));
165
+ return;
166
+ }
122
167
  }
168
+ await fs.remove(target);
169
+ console.log(chalk_1.default.green(`✓ Removed: ${target}`));
123
170
  });
124
171
  program
125
172
  .command('versions')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ui-ux-consultant-cli",
3
- "version": "1.0.0",
3
+ "version": "1.1.0-beta.2",
4
4
  "description": "CLI installer for the UI/UX Consultant Claude skill",
5
5
  "bin": {
6
6
  "uiux": "dist/index.js"
@@ -8,7 +8,8 @@
8
8
  "main": "dist/index.js",
9
9
  "files": [
10
10
  "dist/",
11
- "assets/"
11
+ "assets/",
12
+ "README.md"
12
13
  ],
13
14
  "scripts": {
14
15
  "build": "tsc",
@@ -34,12 +35,30 @@
34
35
  },
35
36
  "keywords": [
36
37
  "claude",
38
+ "claude-code",
39
+ "claude-skill",
37
40
  "cursor",
41
+ "windsurf",
42
+ "copilot",
43
+ "ai-skill",
44
+ "llm",
38
45
  "skill",
39
46
  "ui-ux",
47
+ "ui",
48
+ "ux",
49
+ "design",
50
+ "design-system",
40
51
  "angular",
41
52
  "react",
42
- "design-system"
53
+ "vue",
54
+ "nextjs",
55
+ "svelte",
56
+ "flutter",
57
+ "swiftui",
58
+ "tailwind",
59
+ "frontend",
60
+ "accessibility",
61
+ "component-library"
43
62
  ],
44
63
  "author": "Yatin Rai <raiyatin55@gmail.com>",
45
64
  "license": "MIT",