omnidesign 1.1.0 ā 1.1.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/bin/cli.js +86 -45
- package/bin/detect-ide.js +57 -29
- package/package.json +1 -1
- package/packages/tokens-tailwind/dist/utility-mapping.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -19,7 +19,7 @@ program
|
|
|
19
19
|
.command('install')
|
|
20
20
|
.description('Install OmniDesign skill for your IDE')
|
|
21
21
|
.option('-i, --ide <ide>', 'Target IDE (claude, cursor, opencode, vscode, aider, continue, zed, amp, kilo, antigravity)')
|
|
22
|
-
.option('-g, --global', 'Install
|
|
22
|
+
.option('-g, --global', 'Install to global IDE config (~/.claude, ~/.cursor, etc.)')
|
|
23
23
|
.action(async (options) => {
|
|
24
24
|
console.log(chalk.blue('šØ OmniDesign Skill Installer\n'));
|
|
25
25
|
|
|
@@ -48,11 +48,11 @@ program
|
|
|
48
48
|
|
|
49
49
|
program
|
|
50
50
|
.command('list')
|
|
51
|
-
.description('List available IDE integrations')
|
|
51
|
+
.description('List available IDE integrations and detection status')
|
|
52
52
|
.option('-g, --global', 'Check global installations')
|
|
53
53
|
.action((options) => {
|
|
54
|
-
console.log(chalk.blue('šØ
|
|
55
|
-
|
|
54
|
+
console.log(chalk.blue('šØ OmniDesign IDE Status:\n'));
|
|
55
|
+
|
|
56
56
|
const ides = [
|
|
57
57
|
{ name: 'Claude Code', cmd: 'claude', ...getClaudePaths(options.global) },
|
|
58
58
|
{ name: 'Cursor', cmd: 'cursor', ...getCursorPaths(options.global) },
|
|
@@ -65,14 +65,34 @@ program
|
|
|
65
65
|
{ name: 'Aider', cmd: 'aider', ...getAiderPaths(options.global) },
|
|
66
66
|
{ name: 'Continue.dev', cmd: 'continue', ...getContinuePaths(options.global) },
|
|
67
67
|
];
|
|
68
|
-
|
|
68
|
+
|
|
69
69
|
ides.forEach(ide => {
|
|
70
|
-
const
|
|
71
|
-
const
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
console.log();
|
|
70
|
+
const skillInstalled = fs.existsSync(ide.configPath);
|
|
71
|
+
const ideDetected = fs.existsSync(ide.baseDir);
|
|
72
|
+
const skillStatus = skillInstalled ? chalk.green('ā skill') : chalk.gray('no skill');
|
|
73
|
+
const ideStatus = ideDetected ? chalk.blue('ā IDE') : chalk.gray('no IDE');
|
|
74
|
+
console.log(` ${chalk.bold(ide.name)}: ${ideStatus} / ${skillStatus}`);
|
|
75
75
|
});
|
|
76
|
+
|
|
77
|
+
console.log(chalk.blue('\nšÆ Auto-detect would find:'));
|
|
78
|
+
const detected = [];
|
|
79
|
+
if (fs.existsSync(path.join(homedir, '.claude'))) detected.push('claude');
|
|
80
|
+
if (fs.existsSync(path.join(homedir, '.cursor'))) detected.push('cursor');
|
|
81
|
+
if (fs.existsSync(path.join(homedir, '.config', 'opencode'))) detected.push('opencode');
|
|
82
|
+
if (fs.existsSync(path.join(homedir, '.config', 'agents'))) detected.push('amp');
|
|
83
|
+
if (fs.existsSync(path.join(homedir, '.config', 'Code'))) detected.push('vscode');
|
|
84
|
+
if (fs.existsSync(path.join(homedir, '.config', 'zed'))) detected.push('zed');
|
|
85
|
+
if (fs.existsSync(path.join(homedir, '.kilocode'))) detected.push('kilo');
|
|
86
|
+
if (fs.existsSync(path.join(homedir, '.gemini', 'antigravity'))) detected.push('antigravity');
|
|
87
|
+
if (fs.existsSync(path.join(homedir, '.continue'))) detected.push('continue');
|
|
88
|
+
|
|
89
|
+
if (detected.length === 0) {
|
|
90
|
+
console.log(chalk.gray(' No IDEs detected in home directory'));
|
|
91
|
+
} else {
|
|
92
|
+
detected.forEach(name => console.log(chalk.green(` ā ${name}`)));
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
console.log(chalk.gray('\nRun with --global to check global installs'));
|
|
76
96
|
});
|
|
77
97
|
|
|
78
98
|
program
|
|
@@ -197,37 +217,57 @@ function getContinuePaths(global = false) {
|
|
|
197
217
|
|
|
198
218
|
function detectIDE(global = false) {
|
|
199
219
|
const cwd = process.cwd();
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
220
|
+
const detected = [];
|
|
221
|
+
|
|
222
|
+
const checks = [
|
|
223
|
+
{ name: 'claude', path: path.join(homedir, '.claude'), global: true },
|
|
224
|
+
{ name: 'cursor', path: path.join(homedir, '.cursor'), global: true },
|
|
225
|
+
{ name: 'opencode', path: path.join(homedir, '.config', 'opencode'), global: true },
|
|
226
|
+
{ name: 'vscode', path: path.join(homedir, '.config', 'Code'), global: true },
|
|
227
|
+
{ name: 'zed', path: path.join(homedir, '.config', 'zed'), global: true },
|
|
228
|
+
{ name: 'amp', path: path.join(homedir, '.config', 'agents'), global: true },
|
|
229
|
+
{ name: 'kilo', path: path.join(homedir, '.kilocode'), global: true },
|
|
230
|
+
{ name: 'antigravity', path: path.join(homedir, '.gemini', 'antigravity'), global: true },
|
|
231
|
+
{ name: 'continue', path: path.join(homedir, '.continue'), global: true },
|
|
232
|
+
{ name: 'claude', path: path.join(cwd, '.claude'), global: false },
|
|
233
|
+
{ name: 'cursor', path: path.join(cwd, '.cursor'), global: false },
|
|
234
|
+
{ name: 'opencode', path: path.join(cwd, '.opencode'), global: false },
|
|
235
|
+
{ name: 'vscode', path: path.join(cwd, '.vscode'), global: false },
|
|
236
|
+
{ name: 'zed', path: path.join(cwd, '.zed'), global: false },
|
|
237
|
+
{ name: 'amp', path: path.join(cwd, '.agents'), global: false },
|
|
238
|
+
{ name: 'kilo', path: path.join(cwd, '.kilocode'), global: false },
|
|
239
|
+
{ name: 'antigravity', path: path.join(cwd, '.antigravity'), global: false },
|
|
240
|
+
{ name: 'aider', path: path.join(cwd, '.aider.conf.yml'), global: false },
|
|
241
|
+
{ name: 'continue', path: path.join(cwd, '.continue'), global: false },
|
|
242
|
+
{ name: 'claude', path: path.join(cwd, 'claude.md'), global: false },
|
|
243
|
+
{ name: 'cursor', path: path.join(cwd, '.cursorrules'), global: false },
|
|
244
|
+
];
|
|
245
|
+
|
|
246
|
+
for (const check of checks) {
|
|
247
|
+
if (fs.existsSync(check.path) && !detected.find(d => d.name === check.name)) {
|
|
248
|
+
detected.push({ name: check.name, global: check.global });
|
|
249
|
+
}
|
|
225
250
|
}
|
|
226
|
-
|
|
227
|
-
if (process.env.CLAUDE_CODE
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
251
|
+
|
|
252
|
+
if (process.env.CLAUDE_CODE && !detected.find(d => d.name === 'claude')) {
|
|
253
|
+
detected.push({ name: 'claude', global: true });
|
|
254
|
+
}
|
|
255
|
+
if (process.env.CURSOR_TRACE && !detected.find(d => d.name === 'cursor')) {
|
|
256
|
+
detected.push({ name: 'cursor', global: true });
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
if (detected.length === 0) return null;
|
|
260
|
+
if (detected.length === 1) return detected[0].name;
|
|
261
|
+
|
|
262
|
+
console.log(chalk.yellow('\nā ļø Multiple IDEs detected:'));
|
|
263
|
+
detected.forEach((ide, i) => {
|
|
264
|
+
const globalFlag = ide.global ? '--global' : '';
|
|
265
|
+
console.log(chalk.gray(` ${i + 1}. ${ide.name} ${globalFlag}`));
|
|
266
|
+
});
|
|
267
|
+
console.log(chalk.gray(`\nUsing first: ${detected[0].name}`));
|
|
268
|
+
console.log(chalk.gray(`To use different: npx omnidesign install --ide <name>\n`));
|
|
269
|
+
|
|
270
|
+
return detected[0].name;
|
|
231
271
|
}
|
|
232
272
|
|
|
233
273
|
async function installSkill(ide, global = false) {
|
|
@@ -274,18 +314,19 @@ async function installSkill(ide, global = false) {
|
|
|
274
314
|
}
|
|
275
315
|
}
|
|
276
316
|
|
|
277
|
-
function copyDirSync(src, dest) {
|
|
317
|
+
function copyDirSync(src, dest, { overwrite = true } = {}) {
|
|
278
318
|
fs.mkdirSync(dest, { recursive: true });
|
|
279
319
|
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
280
|
-
|
|
320
|
+
|
|
281
321
|
for (const entry of entries) {
|
|
282
322
|
const srcPath = path.join(src, entry.name);
|
|
283
323
|
const destPath = path.join(dest, entry.name);
|
|
284
|
-
|
|
324
|
+
|
|
285
325
|
if (entry.isDirectory()) {
|
|
286
|
-
copyDirSync(srcPath, destPath);
|
|
326
|
+
copyDirSync(srcPath, destPath, { overwrite });
|
|
287
327
|
} else {
|
|
288
|
-
fs.
|
|
328
|
+
const copyFlags = overwrite ? undefined : fs.constants.COPYFILE_EXCL;
|
|
329
|
+
fs.copyFileSync(srcPath, destPath, copyFlags);
|
|
289
330
|
}
|
|
290
331
|
}
|
|
291
332
|
}
|
package/bin/detect-ide.js
CHANGED
|
@@ -4,47 +4,75 @@ import fs from 'fs';
|
|
|
4
4
|
import path from 'path';
|
|
5
5
|
import { fileURLToPath } from 'url';
|
|
6
6
|
import { execSync } from 'child_process';
|
|
7
|
+
import os from 'os';
|
|
7
8
|
|
|
8
9
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
10
|
+
const homeDir = os.homedir();
|
|
9
11
|
|
|
10
|
-
function
|
|
12
|
+
function detectAllIDEs() {
|
|
13
|
+
const detected = [];
|
|
11
14
|
const cwd = process.cwd();
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
15
|
+
|
|
16
|
+
const checks = [
|
|
17
|
+
{ name: 'claude', path: path.join(homeDir, '.claude') },
|
|
18
|
+
{ name: 'cursor', path: path.join(homeDir, '.cursor') },
|
|
19
|
+
{ name: 'opencode', path: path.join(homeDir, '.config', 'opencode') },
|
|
20
|
+
{ name: 'vscode', path: path.join(homeDir, '.config', 'Code') },
|
|
21
|
+
{ name: 'zed', path: path.join(homeDir, '.config', 'zed') },
|
|
22
|
+
{ name: 'amp', path: path.join(homeDir, '.config', 'agents') },
|
|
23
|
+
{ name: 'kilo', path: path.join(homeDir, '.kilocode') },
|
|
24
|
+
{ name: 'antigravity', path: path.join(homeDir, '.gemini', 'antigravity') },
|
|
25
|
+
{ name: 'continue', path: path.join(homeDir, '.continue') },
|
|
26
|
+
{ name: 'claude', path: path.join(cwd, '.claude') },
|
|
27
|
+
{ name: 'cursor', path: path.join(cwd, '.cursor') },
|
|
28
|
+
{ name: 'aider', path: path.join(cwd, '.aider.conf.yml') },
|
|
29
|
+
];
|
|
30
|
+
|
|
31
|
+
const envChecks = [
|
|
32
|
+
{ name: 'claude', env: 'CLAUDE_CODE' },
|
|
33
|
+
{ name: 'cursor', env: 'CURSOR_TRACE' },
|
|
34
|
+
];
|
|
35
|
+
|
|
36
|
+
for (const check of checks) {
|
|
37
|
+
if (fs.existsSync(check.path) && !detected.find(d => d.name === check.name)) {
|
|
38
|
+
detected.push({ name: check.name, source: fs.statSync(check.path).isDirectory() ? 'global' : 'project' });
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
for (const check of envChecks) {
|
|
43
|
+
if (process.env[check.env] && !detected.find(d => d.name === check.name)) {
|
|
44
|
+
detected.push({ name: check.name, source: 'env' });
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return detected;
|
|
30
49
|
}
|
|
31
50
|
|
|
32
51
|
function autoInstall() {
|
|
33
|
-
const
|
|
34
|
-
|
|
35
|
-
if (
|
|
52
|
+
const detected = detectAllIDEs();
|
|
53
|
+
|
|
54
|
+
if (detected.length === 0) {
|
|
36
55
|
console.log(chalk.gray('ā¹ļø No IDE detected. Run: npx omnidesign install --ide <ide>'));
|
|
37
56
|
console.log(chalk.gray('Supported: claude, cursor, opencode, vscode, zed, amp, kilo, antigravity, aider, continue'));
|
|
38
57
|
return;
|
|
39
58
|
}
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
59
|
+
|
|
60
|
+
if (detected.length === 1) {
|
|
61
|
+
console.log(chalk.blue(`šØ OmniDesign detected ${detected[0].name}. Installing...\n`));
|
|
62
|
+
try {
|
|
63
|
+
execSync(`node ${path.join(__dirname, 'cli.js')} install --global`, { stdio: 'inherit' });
|
|
64
|
+
} catch (error) {
|
|
65
|
+
console.log(chalk.gray('ā¹ļø Run manually: npx omnidesign install --global'));
|
|
66
|
+
}
|
|
67
|
+
return;
|
|
47
68
|
}
|
|
69
|
+
|
|
70
|
+
console.log(chalk.blue(`šØ OmniDesign detected multiple IDEs:\n`));
|
|
71
|
+
detected.forEach((ide, i) => {
|
|
72
|
+
console.log(chalk.gray(` ${i + 1}. ${ide.name} (${ide.source})`));
|
|
73
|
+
});
|
|
74
|
+
console.log(chalk.gray(`\nInstall for all: npx omnidesign install --global`));
|
|
75
|
+
console.log(chalk.gray(`Or specify one: npx omnidesign install --ide <name> --global`));
|
|
48
76
|
}
|
|
49
77
|
|
|
50
78
|
autoInstall();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "omnidesign",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "Universal design system with Tailwind CSS integration - 25 themes, 176 colors, 39 Nerd Fonts, and AI-ready component recipes for Claude Code, Cursor, OpenCode, and more",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "index.js",
|