omgkit 2.29.0 ā 2.30.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.
- package/README.md +24 -0
- package/bin/omgkit.js +178 -0
- package/lib/cli.js +1 -1
- package/lib/theme.js +649 -0
- package/package.json +2 -2
- package/plugin/agents/fullstack-developer.md +1 -0
- package/plugin/agents/ui-ux-designer.md +163 -54
- package/plugin/commands/design/rebuild.md +153 -0
- package/plugin/commands/design/rollback.md +179 -0
- package/plugin/commands/design/scan.md +155 -0
- package/plugin/registry.yaml +7 -3
- package/plugin/skills/frontend/design-system-context/SKILL.md +252 -0
package/README.md
CHANGED
|
@@ -200,6 +200,30 @@ omgkit init --with-design
|
|
|
200
200
|
| `/design:from-url` | Extract theme from webpage |
|
|
201
201
|
| `/design:add <comp>` | Add shadcn/ui components |
|
|
202
202
|
| `/design:reset` | Reset to original theme |
|
|
203
|
+
| `/design:rebuild <id>` | Rebuild entire project with new theme |
|
|
204
|
+
| `/design:scan` | Scan for non-compliant colors |
|
|
205
|
+
| `/design:rollback` | Rollback to previous theme |
|
|
206
|
+
|
|
207
|
+
#### Theme Rebuild
|
|
208
|
+
|
|
209
|
+
Rebuild your entire project's UI with a single command:
|
|
210
|
+
|
|
211
|
+
```bash
|
|
212
|
+
# Rebuild with new theme (scans and fixes hardcoded colors)
|
|
213
|
+
omgkit design:rebuild neo-tokyo
|
|
214
|
+
|
|
215
|
+
# Scan for non-compliant colors
|
|
216
|
+
omgkit design:scan
|
|
217
|
+
|
|
218
|
+
# Rollback if needed
|
|
219
|
+
omgkit design:rollback
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
The rebuild feature:
|
|
223
|
+
- Backs up current theme before changes
|
|
224
|
+
- Scans `app/`, `components/`, `src/`, `pages/` directories
|
|
225
|
+
- Replaces hardcoded colors (`bg-blue-500`) with theme variables (`bg-primary`)
|
|
226
|
+
- Reports unfixable patterns for manual review
|
|
203
227
|
|
|
204
228
|
#### How It Works
|
|
205
229
|
|
package/bin/omgkit.js
CHANGED
|
@@ -34,6 +34,13 @@ import {
|
|
|
34
34
|
log
|
|
35
35
|
} from '../lib/cli.js';
|
|
36
36
|
|
|
37
|
+
import {
|
|
38
|
+
scanProjectColors,
|
|
39
|
+
rebuildProjectTheme,
|
|
40
|
+
rollbackTheme,
|
|
41
|
+
listThemeBackups
|
|
42
|
+
} from '../lib/theme.js';
|
|
43
|
+
|
|
37
44
|
// Set package root for CLI context
|
|
38
45
|
const __filename = fileURLToPath(import.meta.url);
|
|
39
46
|
const __dirname = dirname(__filename);
|
|
@@ -69,6 +76,12 @@ ${COLORS.bright}CONFIG COMMANDS${COLORS.reset}
|
|
|
69
76
|
${COLORS.cyan}config list [section]${COLORS.reset} List all config or specific section
|
|
70
77
|
${COLORS.cyan}config reset <key>${COLORS.reset} Reset config key to default
|
|
71
78
|
|
|
79
|
+
${COLORS.bright}DESIGN SYSTEM COMMANDS${COLORS.reset}
|
|
80
|
+
${COLORS.cyan}design:rebuild <theme>${COLORS.reset} Rebuild project UI with new theme
|
|
81
|
+
${COLORS.cyan}design:scan${COLORS.reset} Scan for non-compliant colors
|
|
82
|
+
${COLORS.cyan}design:rollback [id]${COLORS.reset} Rollback to previous theme
|
|
83
|
+
${COLORS.cyan}design:backups${COLORS.reset} List available theme backups
|
|
84
|
+
|
|
72
85
|
${COLORS.bright}UPGRADE OPTIONS${COLORS.reset}
|
|
73
86
|
--dry Show what would change without applying
|
|
74
87
|
--force Skip confirmation prompts
|
|
@@ -91,6 +104,13 @@ ${COLORS.bright}CONFIG EXAMPLES${COLORS.reset}
|
|
|
91
104
|
omgkit config list testing
|
|
92
105
|
omgkit config reset testing.enforcement.level
|
|
93
106
|
|
|
107
|
+
${COLORS.bright}DESIGN EXAMPLES${COLORS.reset}
|
|
108
|
+
omgkit design:rebuild neo-tokyo # Rebuild with Neo Tokyo theme
|
|
109
|
+
omgkit design:rebuild --dry # Preview what would change
|
|
110
|
+
omgkit design:scan # Scan for non-compliant colors
|
|
111
|
+
omgkit design:rollback # Rollback to previous theme
|
|
112
|
+
omgkit design:backups # List theme backups
|
|
113
|
+
|
|
94
114
|
${COLORS.bright}AFTER INSTALLATION${COLORS.reset}
|
|
95
115
|
In Claude Code, type / to see all OMGKIT commands:
|
|
96
116
|
|
|
@@ -247,6 +267,164 @@ ${COLORS.bright}Examples:${COLORS.reset}
|
|
|
247
267
|
}
|
|
248
268
|
break;
|
|
249
269
|
}
|
|
270
|
+
case 'design:rebuild': {
|
|
271
|
+
console.log(BANNER);
|
|
272
|
+
const themeId = args.find(a => !a.startsWith('--'));
|
|
273
|
+
const dryRun = args.includes('--dry');
|
|
274
|
+
const force = args.includes('--force');
|
|
275
|
+
|
|
276
|
+
if (!themeId) {
|
|
277
|
+
log.error('Usage: omgkit design:rebuild <theme-id> [--dry] [--force]');
|
|
278
|
+
log.info('Run /design:themes in Claude Code to see available themes');
|
|
279
|
+
log.info('Example: omgkit design:rebuild neo-tokyo');
|
|
280
|
+
process.exit(1);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
console.log(`${COLORS.bright}š® Design Rebuild: ${themeId}${COLORS.reset}`);
|
|
284
|
+
console.log('ā'.repeat(40));
|
|
285
|
+
|
|
286
|
+
if (dryRun) {
|
|
287
|
+
log.info('DRY RUN - No changes will be made\n');
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
const result = rebuildProjectTheme(process.cwd(), themeId, { dryRun, force });
|
|
291
|
+
|
|
292
|
+
if (!result.success) {
|
|
293
|
+
log.error(result.error);
|
|
294
|
+
process.exit(1);
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
if (!dryRun && result.backupId) {
|
|
298
|
+
console.log(`\nš¦ ${COLORS.green}Backup created:${COLORS.reset} ${result.backupId}`);
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
console.log(`\nšØ ${COLORS.bright}Theme Applied:${COLORS.reset} ${result.newTheme}`);
|
|
302
|
+
|
|
303
|
+
if (result.changedFiles.length > 0) {
|
|
304
|
+
console.log(`\n${COLORS.bright}Changed Files:${COLORS.reset}`);
|
|
305
|
+
for (const f of result.changedFiles) {
|
|
306
|
+
console.log(` ${COLORS.green}ā${COLORS.reset} ${f}`);
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
if (result.fixedColors.length > 0) {
|
|
311
|
+
console.log(`\n${COLORS.bright}Fixed Colors:${COLORS.reset}`);
|
|
312
|
+
for (const fc of result.fixedColors) {
|
|
313
|
+
console.log(` ${COLORS.cyan}${fc.file}${COLORS.reset}`);
|
|
314
|
+
for (const r of fc.replacements) {
|
|
315
|
+
if (r.count) {
|
|
316
|
+
console.log(` ${r.from} ā ${r.to} (${r.count}x)`);
|
|
317
|
+
} else {
|
|
318
|
+
console.log(` ${r.from} ā ${r.to}`);
|
|
319
|
+
}
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
|
|
324
|
+
if (result.warnings.length > 0) {
|
|
325
|
+
console.log(`\n${COLORS.yellow}ā ļø Warnings (manual review needed):${COLORS.reset}`);
|
|
326
|
+
for (const w of result.warnings.slice(0, 10)) {
|
|
327
|
+
console.log(` ${w}`);
|
|
328
|
+
}
|
|
329
|
+
if (result.warnings.length > 10) {
|
|
330
|
+
console.log(` ... and ${result.warnings.length - 10} more`);
|
|
331
|
+
}
|
|
332
|
+
}
|
|
333
|
+
|
|
334
|
+
if (dryRun) {
|
|
335
|
+
log.info('\nTo apply changes, run without --dry flag');
|
|
336
|
+
} else {
|
|
337
|
+
log.success('\nRebuild complete!');
|
|
338
|
+
log.info('To rollback: omgkit design:rollback');
|
|
339
|
+
}
|
|
340
|
+
break;
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
case 'design:scan': {
|
|
344
|
+
console.log(BANNER);
|
|
345
|
+
console.log(`${COLORS.bright}š Scanning for non-compliant colors...${COLORS.reset}\n`);
|
|
346
|
+
|
|
347
|
+
const result = scanProjectColors(process.cwd());
|
|
348
|
+
|
|
349
|
+
console.log(`Scanned ${result.scannedFiles} files\n`);
|
|
350
|
+
|
|
351
|
+
if (result.nonCompliant.length === 0) {
|
|
352
|
+
log.success('All colors are theme-compliant!');
|
|
353
|
+
} else {
|
|
354
|
+
log.warn(`Found ${result.nonCompliant.length} non-compliant color references\n`);
|
|
355
|
+
|
|
356
|
+
// Group by file
|
|
357
|
+
const byFile = {};
|
|
358
|
+
for (const item of result.nonCompliant) {
|
|
359
|
+
if (!byFile[item.file]) byFile[item.file] = [];
|
|
360
|
+
byFile[item.file].push(item);
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
for (const [file, items] of Object.entries(byFile)) {
|
|
364
|
+
console.log(`${COLORS.cyan}š ${file}${COLORS.reset}`);
|
|
365
|
+
for (const item of items.slice(0, 5)) {
|
|
366
|
+
const suggestion = item.suggestion ? ` ā ${COLORS.green}${item.suggestion}${COLORS.reset}` : ` ${COLORS.yellow}(manual review)${COLORS.reset}`;
|
|
367
|
+
console.log(` Line ${item.line}: ${item.match}${suggestion}`);
|
|
368
|
+
}
|
|
369
|
+
if (items.length > 5) {
|
|
370
|
+
console.log(` ... and ${items.length - 5} more`);
|
|
371
|
+
}
|
|
372
|
+
console.log();
|
|
373
|
+
}
|
|
374
|
+
|
|
375
|
+
console.log('ā'.repeat(40));
|
|
376
|
+
console.log(`Total: ${result.nonCompliant.length} violations in ${Object.keys(byFile).length} files`);
|
|
377
|
+
console.log(`\nRun ${COLORS.cyan}omgkit design:rebuild <theme-id>${COLORS.reset} to auto-fix`);
|
|
378
|
+
}
|
|
379
|
+
break;
|
|
380
|
+
}
|
|
381
|
+
|
|
382
|
+
case 'design:rollback': {
|
|
383
|
+
console.log(BANNER);
|
|
384
|
+
const backupId = args[0];
|
|
385
|
+
|
|
386
|
+
console.log(`${COLORS.bright}š Theme Rollback${COLORS.reset}\n`);
|
|
387
|
+
|
|
388
|
+
const result = rollbackTheme(process.cwd(), backupId);
|
|
389
|
+
|
|
390
|
+
if (!result.success) {
|
|
391
|
+
log.error(result.error);
|
|
392
|
+
if (result.error.includes('No theme backups')) {
|
|
393
|
+
log.info('No backups available. Rebuild a theme first to create backups.');
|
|
394
|
+
}
|
|
395
|
+
process.exit(1);
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
log.success(`Rolled back to: ${result.restoredTheme}`);
|
|
399
|
+
console.log(`\n${COLORS.bright}Restored Files:${COLORS.reset}`);
|
|
400
|
+
for (const f of result.restoredFiles) {
|
|
401
|
+
console.log(` ${COLORS.green}ā${COLORS.reset} ${f}`);
|
|
402
|
+
}
|
|
403
|
+
console.log(`\nBackup used: ${result.backupUsed}`);
|
|
404
|
+
break;
|
|
405
|
+
}
|
|
406
|
+
|
|
407
|
+
case 'design:backups': {
|
|
408
|
+
console.log(BANNER);
|
|
409
|
+
console.log(`${COLORS.bright}š¦ Theme Backups${COLORS.reset}\n`);
|
|
410
|
+
|
|
411
|
+
const backups = listThemeBackups(process.cwd());
|
|
412
|
+
|
|
413
|
+
if (backups.length === 0) {
|
|
414
|
+
log.info('No theme backups found');
|
|
415
|
+
log.info('Run omgkit design:rebuild <theme-id> to create backups');
|
|
416
|
+
} else {
|
|
417
|
+
for (const b of backups) {
|
|
418
|
+
console.log(` ${COLORS.cyan}${b.id}${COLORS.reset}`);
|
|
419
|
+
console.log(` ${b.previousTheme} ā ${b.newTheme}`);
|
|
420
|
+
console.log(` ${b.date} (${b.filesChanged} files)\n`);
|
|
421
|
+
}
|
|
422
|
+
console.log(`To rollback: ${COLORS.cyan}omgkit design:rollback${COLORS.reset}`);
|
|
423
|
+
console.log(`Or specify: ${COLORS.cyan}omgkit design:rollback <backup-id>${COLORS.reset}`);
|
|
424
|
+
}
|
|
425
|
+
break;
|
|
426
|
+
}
|
|
427
|
+
|
|
250
428
|
case 'version':
|
|
251
429
|
case '-v':
|
|
252
430
|
case '--version': {
|
package/lib/cli.js
CHANGED
|
@@ -58,7 +58,7 @@ ${COLORS.magenta}āāāāāāāāāāāāāāāāāāāāā
|
|
|
58
58
|
ā ā
|
|
59
59
|
ā š® OMGKIT - Omega-Level Development Kit ā
|
|
60
60
|
ā ā
|
|
61
|
-
ā 41 Agents ⢠169 Commands ā¢
|
|
61
|
+
ā 41 Agents ⢠169 Commands ⢠162 Skills ⢠10 Modes ā
|
|
62
62
|
ā "Think Omega. Build Omega. Be Omega." ā
|
|
63
63
|
ā ā
|
|
64
64
|
āāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāāā${COLORS.reset}
|