omnidesign 1.0.1 → 1.0.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.
- package/README.md +121 -488
- package/bin/cli.js +352 -151
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -4,9 +4,11 @@ import chalk from 'chalk';
|
|
|
4
4
|
import fs from 'fs';
|
|
5
5
|
import path from 'path';
|
|
6
6
|
import { fileURLToPath } from 'url';
|
|
7
|
+
import os from 'os';
|
|
7
8
|
|
|
8
9
|
const __dirname = path.dirname(fileURLToPath(import.meta.url));
|
|
9
10
|
const packageJson = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'package.json'), 'utf8'));
|
|
11
|
+
const homedir = os.homedir();
|
|
10
12
|
|
|
11
13
|
program
|
|
12
14
|
.name('omnidesign')
|
|
@@ -21,7 +23,7 @@ program
|
|
|
21
23
|
.action(async (options) => {
|
|
22
24
|
console.log(chalk.blue('🎨 OmniDesign Skill Installer\n'));
|
|
23
25
|
|
|
24
|
-
const detectedIde = options.ide || detectIDE();
|
|
26
|
+
const detectedIde = options.ide || detectIDE(options.global);
|
|
25
27
|
|
|
26
28
|
if (!detectedIde) {
|
|
27
29
|
console.log(chalk.yellow('⚠️ Could not auto-detect IDE. Please specify with --ide flag'));
|
|
@@ -47,27 +49,28 @@ program
|
|
|
47
49
|
program
|
|
48
50
|
.command('list')
|
|
49
51
|
.description('List available IDE integrations')
|
|
50
|
-
.
|
|
52
|
+
.option('-g, --global', 'Check global installations')
|
|
53
|
+
.action((options) => {
|
|
51
54
|
console.log(chalk.blue('🎨 Supported IDEs:\n'));
|
|
52
55
|
|
|
53
56
|
const ides = [
|
|
54
|
-
{ name: 'Claude Code', cmd: 'claude',
|
|
55
|
-
{ name: 'Cursor', cmd: 'cursor',
|
|
56
|
-
{ name: 'OpenCode', cmd: 'opencode',
|
|
57
|
-
{ name: 'VS Code', cmd: 'vscode',
|
|
58
|
-
{ name: 'Zed', cmd: 'zed',
|
|
59
|
-
{ name: 'Amp Code', cmd: 'amp',
|
|
60
|
-
{ name: 'Kilo Code', cmd: 'kilo',
|
|
61
|
-
{ name: 'Antigravity', cmd: 'antigravity',
|
|
62
|
-
{ name: 'Aider', cmd: 'aider',
|
|
63
|
-
{ name: 'Continue.dev', cmd: 'continue',
|
|
57
|
+
{ name: 'Claude Code', cmd: 'claude', ...getClaudePaths(options.global) },
|
|
58
|
+
{ name: 'Cursor', cmd: 'cursor', ...getCursorPaths(options.global) },
|
|
59
|
+
{ name: 'OpenCode', cmd: 'opencode', ...getOpenCodePaths(options.global) },
|
|
60
|
+
{ name: 'VS Code', cmd: 'vscode', ...getVSCodePaths(options.global) },
|
|
61
|
+
{ name: 'Zed', cmd: 'zed', ...getZedPaths(options.global) },
|
|
62
|
+
{ name: 'Amp Code', cmd: 'amp', ...getAmpPaths(options.global) },
|
|
63
|
+
{ name: 'Kilo Code', cmd: 'kilo', ...getKiloPaths(options.global) },
|
|
64
|
+
{ name: 'Antigravity', cmd: 'antigravity', ...getAntigravityPaths(options.global) },
|
|
65
|
+
{ name: 'Aider', cmd: 'aider', ...getAiderPaths(options.global) },
|
|
66
|
+
{ name: 'Continue.dev', cmd: 'continue', ...getContinuePaths(options.global) },
|
|
64
67
|
];
|
|
65
68
|
|
|
66
69
|
ides.forEach(ide => {
|
|
67
|
-
const installed = fs.existsSync(
|
|
70
|
+
const installed = fs.existsSync(ide.configPath);
|
|
68
71
|
const status = installed ? chalk.green('✓ installed') : chalk.gray('not installed');
|
|
69
72
|
console.log(` ${chalk.bold(ide.name)}: ${status}`);
|
|
70
|
-
console.log(` Config: ${ide.
|
|
73
|
+
console.log(` Config: ${ide.configFile}`);
|
|
71
74
|
console.log();
|
|
72
75
|
});
|
|
73
76
|
});
|
|
@@ -76,8 +79,9 @@ program
|
|
|
76
79
|
.command('uninstall')
|
|
77
80
|
.description('Remove OmniDesign skill from your IDE')
|
|
78
81
|
.option('-i, --ide <ide>', 'Target IDE')
|
|
82
|
+
.option('-g, --global', 'Uninstall globally')
|
|
79
83
|
.action(async (options) => {
|
|
80
|
-
const detectedIde = options.ide || detectIDE();
|
|
84
|
+
const detectedIde = options.ide || detectIDE(options.global);
|
|
81
85
|
|
|
82
86
|
if (!detectedIde) {
|
|
83
87
|
console.log(chalk.yellow('⚠️ Please specify IDE with --ide flag'));
|
|
@@ -85,11 +89,113 @@ program
|
|
|
85
89
|
}
|
|
86
90
|
|
|
87
91
|
console.log(chalk.blue(`Removing OmniDesign from ${detectedIde}...`));
|
|
88
|
-
await uninstallSkill(detectedIde);
|
|
92
|
+
await uninstallSkill(detectedIde, options.global);
|
|
89
93
|
console.log(chalk.green('✅ Uninstalled successfully'));
|
|
90
94
|
});
|
|
91
95
|
|
|
92
|
-
function
|
|
96
|
+
function getClaudePaths(global = false) {
|
|
97
|
+
const baseDir = global ? path.join(homedir, '.claude') : path.join(process.cwd(), '.claude');
|
|
98
|
+
return {
|
|
99
|
+
configPath: path.join(baseDir, 'skills', 'omnidesign', 'SKILL.md'),
|
|
100
|
+
configFile: path.relative(process.cwd(), path.join(baseDir, 'skills', 'omnidesign', 'SKILL.md')),
|
|
101
|
+
baseDir
|
|
102
|
+
};
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
function getCursorPaths(global = false) {
|
|
106
|
+
const baseDir = global ? path.join(homedir, '.cursor') : path.join(process.cwd(), '.cursor');
|
|
107
|
+
return {
|
|
108
|
+
configPath: path.join(baseDir, 'skills', 'omnidesign', 'SKILL.md'),
|
|
109
|
+
configFile: path.relative(process.cwd(), path.join(baseDir, 'skills', 'omnidesign', 'SKILL.md')),
|
|
110
|
+
baseDir
|
|
111
|
+
};
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
function getOpenCodePaths(global = false) {
|
|
115
|
+
const baseDir = global
|
|
116
|
+
? path.join(homedir, '.config', 'opencode')
|
|
117
|
+
: path.join(process.cwd(), '.opencode');
|
|
118
|
+
return {
|
|
119
|
+
configPath: path.join(baseDir, 'skills', 'omnidesign', 'SKILL.md'),
|
|
120
|
+
configFile: path.relative(process.cwd(), path.join(baseDir, 'skills', 'omnidesign', 'SKILL.md')),
|
|
121
|
+
baseDir,
|
|
122
|
+
configJsonPath: path.join(baseDir, 'config.json')
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
|
|
126
|
+
function getVSCodePaths(global = false) {
|
|
127
|
+
const baseDir = global
|
|
128
|
+
? path.join(homedir, '.config', 'Code', 'User')
|
|
129
|
+
: path.join(process.cwd(), '.vscode');
|
|
130
|
+
return {
|
|
131
|
+
configPath: path.join(baseDir, global ? 'settings.json' : 'settings.json'),
|
|
132
|
+
configFile: path.relative(process.cwd(), path.join(baseDir, 'settings.json')),
|
|
133
|
+
baseDir
|
|
134
|
+
};
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
function getZedPaths(global = false) {
|
|
138
|
+
const baseDir = global ? path.join(homedir, '.config', 'zed') : path.join(process.cwd(), '.zed');
|
|
139
|
+
return {
|
|
140
|
+
configPath: path.join(baseDir, 'omnidesign.json'),
|
|
141
|
+
configFile: path.relative(process.cwd(), path.join(baseDir, 'omnidesign.json')),
|
|
142
|
+
baseDir
|
|
143
|
+
};
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function getAmpPaths(global = false) {
|
|
147
|
+
const baseDir = global
|
|
148
|
+
? path.join(homedir, '.config', 'agents')
|
|
149
|
+
: path.join(process.cwd(), '.agents');
|
|
150
|
+
return {
|
|
151
|
+
configPath: path.join(baseDir, 'skills', 'omnidesign', 'SKILL.md'),
|
|
152
|
+
configFile: path.relative(process.cwd(), path.join(baseDir, 'skills', 'omnidesign', 'SKILL.md')),
|
|
153
|
+
baseDir
|
|
154
|
+
};
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
function getKiloPaths(global = false) {
|
|
158
|
+
const baseDir = global
|
|
159
|
+
? path.join(homedir, '.kilocode')
|
|
160
|
+
: path.join(process.cwd(), '.kilocode');
|
|
161
|
+
return {
|
|
162
|
+
configPath: path.join(baseDir, 'skills', 'omnidesign', 'SKILL.md'),
|
|
163
|
+
configFile: path.relative(process.cwd(), path.join(baseDir, 'skills', 'omnidesign', 'SKILL.md')),
|
|
164
|
+
baseDir
|
|
165
|
+
};
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
function getAntigravityPaths(global = false) {
|
|
169
|
+
const baseDir = global
|
|
170
|
+
? path.join(homedir, '.gemini', 'antigravity')
|
|
171
|
+
: path.join(process.cwd(), '.agent');
|
|
172
|
+
return {
|
|
173
|
+
configPath: path.join(baseDir, 'skills', 'omnidesign', 'SKILL.md'),
|
|
174
|
+
configFile: path.relative(process.cwd(), path.join(baseDir, 'skills', 'omnidesign', 'SKILL.md')),
|
|
175
|
+
baseDir
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
function getAiderPaths(global = false) {
|
|
180
|
+
return {
|
|
181
|
+
configPath: path.join(process.cwd(), 'CONVENTIONS.md'),
|
|
182
|
+
configFile: 'CONVENTIONS.md',
|
|
183
|
+
baseDir: process.cwd()
|
|
184
|
+
};
|
|
185
|
+
}
|
|
186
|
+
|
|
187
|
+
function getContinuePaths(global = false) {
|
|
188
|
+
const baseDir = global
|
|
189
|
+
? path.join(homedir, '.continue')
|
|
190
|
+
: path.join(process.cwd(), '.continue');
|
|
191
|
+
return {
|
|
192
|
+
configPath: path.join(baseDir, 'omnidesign.yaml'),
|
|
193
|
+
configFile: path.relative(process.cwd(), path.join(baseDir, 'omnidesign.yaml')),
|
|
194
|
+
baseDir
|
|
195
|
+
};
|
|
196
|
+
}
|
|
197
|
+
|
|
198
|
+
function detectIDE(global = false) {
|
|
93
199
|
const cwd = process.cwd();
|
|
94
200
|
|
|
95
201
|
if (fs.existsSync(path.join(cwd, '.claude'))) return 'claude';
|
|
@@ -97,14 +203,27 @@ function detectIDE() {
|
|
|
97
203
|
if (fs.existsSync(path.join(cwd, '.opencode'))) return 'opencode';
|
|
98
204
|
if (fs.existsSync(path.join(cwd, '.vscode'))) return 'vscode';
|
|
99
205
|
if (fs.existsSync(path.join(cwd, '.zed'))) return 'zed';
|
|
100
|
-
if (fs.existsSync(path.join(cwd, '.
|
|
206
|
+
if (fs.existsSync(path.join(cwd, '.agents'))) return 'amp';
|
|
101
207
|
if (fs.existsSync(path.join(cwd, '.kilocode'))) return 'kilo';
|
|
102
208
|
if (fs.existsSync(path.join(cwd, '.antigravity'))) return 'antigravity';
|
|
103
|
-
if (fs.existsSync(path.join(cwd, '.
|
|
209
|
+
if (fs.existsSync(path.join(cwd, '.agent'))) return 'antigravity';
|
|
104
210
|
if (fs.existsSync(path.join(cwd, '.aider.conf.yml'))) return 'aider';
|
|
105
211
|
if (fs.existsSync(path.join(cwd, '.continue'))) return 'continue';
|
|
106
212
|
if (fs.existsSync(path.join(cwd, 'claude.md'))) return 'claude';
|
|
107
213
|
if (fs.existsSync(path.join(cwd, '.cursorrules'))) return 'cursor';
|
|
214
|
+
|
|
215
|
+
if (global || true) {
|
|
216
|
+
if (fs.existsSync(path.join(homedir, '.claude'))) return 'claude';
|
|
217
|
+
if (fs.existsSync(path.join(homedir, '.cursor'))) return 'cursor';
|
|
218
|
+
if (fs.existsSync(path.join(homedir, '.config', 'opencode'))) return 'opencode';
|
|
219
|
+
if (fs.existsSync(path.join(homedir, '.kilocode'))) return 'kilo';
|
|
220
|
+
if (fs.existsSync(path.join(homedir, '.gemini', 'antigravity'))) return 'antigravity';
|
|
221
|
+
if (fs.existsSync(path.join(homedir, '.config', 'Code'))) return 'vscode';
|
|
222
|
+
if (fs.existsSync(path.join(homedir, '.config', 'zed'))) return 'zed';
|
|
223
|
+
if (fs.existsSync(path.join(homedir, '.config', 'agents'))) return 'amp';
|
|
224
|
+
if (fs.existsSync(path.join(homedir, '.continue'))) return 'continue';
|
|
225
|
+
}
|
|
226
|
+
|
|
108
227
|
if (process.env.CLAUDE_CODE) return 'claude';
|
|
109
228
|
if (process.env.CURSOR_TRACE) return 'cursor';
|
|
110
229
|
|
|
@@ -112,8 +231,8 @@ function detectIDE() {
|
|
|
112
231
|
}
|
|
113
232
|
|
|
114
233
|
async function installSkill(ide, global = false) {
|
|
115
|
-
const cwd = process.cwd();
|
|
116
234
|
const skillsDir = path.join(__dirname, '..', 'skills', ide);
|
|
235
|
+
const packageDir = path.join(__dirname, '..');
|
|
117
236
|
|
|
118
237
|
if (!fs.existsSync(skillsDir)) {
|
|
119
238
|
throw new Error(`Skill files for ${ide} not found`);
|
|
@@ -121,57 +240,102 @@ async function installSkill(ide, global = false) {
|
|
|
121
240
|
|
|
122
241
|
switch (ide) {
|
|
123
242
|
case 'claude':
|
|
124
|
-
await installClaudeSkill(
|
|
243
|
+
await installClaudeSkill(skillsDir, packageDir, global);
|
|
125
244
|
break;
|
|
126
245
|
case 'cursor':
|
|
127
|
-
await installCursorSkill(
|
|
246
|
+
await installCursorSkill(skillsDir, packageDir, global);
|
|
128
247
|
break;
|
|
129
248
|
case 'opencode':
|
|
130
|
-
await installOpenCodeSkill(
|
|
249
|
+
await installOpenCodeSkill(skillsDir, packageDir, global);
|
|
131
250
|
break;
|
|
132
251
|
case 'vscode':
|
|
133
|
-
await installVSCodeSkill(
|
|
252
|
+
await installVSCodeSkill(skillsDir, packageDir, global);
|
|
134
253
|
break;
|
|
135
254
|
case 'aider':
|
|
136
|
-
await installAiderSkill(
|
|
255
|
+
await installAiderSkill(skillsDir, packageDir, global);
|
|
137
256
|
break;
|
|
138
257
|
case 'continue':
|
|
139
|
-
await installContinueSkill(
|
|
258
|
+
await installContinueSkill(skillsDir, packageDir, global);
|
|
140
259
|
break;
|
|
141
260
|
case 'zed':
|
|
142
|
-
await installZedSkill(
|
|
261
|
+
await installZedSkill(skillsDir, packageDir, global);
|
|
143
262
|
break;
|
|
144
263
|
case 'amp':
|
|
145
|
-
await installAmpSkill(
|
|
264
|
+
await installAmpSkill(skillsDir, packageDir, global);
|
|
146
265
|
break;
|
|
147
266
|
case 'kilo':
|
|
148
|
-
await installKiloSkill(
|
|
267
|
+
await installKiloSkill(skillsDir, packageDir, global);
|
|
149
268
|
break;
|
|
150
269
|
case 'antigravity':
|
|
151
|
-
await installAntigravitySkill(
|
|
270
|
+
await installAntigravitySkill(skillsDir, packageDir, global);
|
|
152
271
|
break;
|
|
153
272
|
default:
|
|
154
273
|
throw new Error(`Unsupported IDE: ${ide}`);
|
|
155
274
|
}
|
|
156
275
|
}
|
|
157
276
|
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
277
|
+
function copyDirSync(src, dest) {
|
|
278
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
279
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
280
|
+
|
|
281
|
+
for (const entry of entries) {
|
|
282
|
+
const srcPath = path.join(src, entry.name);
|
|
283
|
+
const destPath = path.join(dest, entry.name);
|
|
284
|
+
|
|
285
|
+
if (entry.isDirectory()) {
|
|
286
|
+
copyDirSync(srcPath, destPath);
|
|
287
|
+
} else {
|
|
288
|
+
fs.copyFileSync(srcPath, destPath);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
}
|
|
292
|
+
|
|
293
|
+
function copySkillContent(skillDir, targetDir, packageDir) {
|
|
294
|
+
const entries = fs.readdirSync(skillDir);
|
|
295
|
+
|
|
296
|
+
for (const entry of entries) {
|
|
297
|
+
const srcPath = path.join(skillDir, entry);
|
|
298
|
+
const destPath = path.join(targetDir, entry);
|
|
299
|
+
|
|
300
|
+
if (fs.statSync(srcPath).isDirectory()) {
|
|
301
|
+
fs.mkdirSync(destPath, { recursive: true });
|
|
302
|
+
copyDirSync(srcPath, destPath);
|
|
303
|
+
} else {
|
|
304
|
+
fs.copyFileSync(srcPath, destPath);
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
|
|
308
|
+
const tokensSrc = path.join(packageDir, 'tokens');
|
|
309
|
+
const tokensDest = path.join(targetDir, 'tokens');
|
|
310
|
+
if (fs.existsSync(tokensSrc)) {
|
|
311
|
+
copyDirSync(tokensSrc, tokensDest);
|
|
312
|
+
console.log(chalk.gray(` Copied: tokens/ → ${path.relative(process.cwd(), tokensDest)}`));
|
|
313
|
+
}
|
|
314
|
+
|
|
315
|
+
const recipesSrc = path.join(packageDir, 'recipes');
|
|
316
|
+
const recipesDest = path.join(targetDir, 'recipes');
|
|
317
|
+
if (fs.existsSync(recipesSrc)) {
|
|
318
|
+
copyDirSync(recipesSrc, recipesDest);
|
|
319
|
+
console.log(chalk.gray(` Copied: recipes/ → ${path.relative(process.cwd(), recipesDest)}`));
|
|
320
|
+
}
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
async function installClaudeSkill(skillsDir, packageDir, global) {
|
|
324
|
+
const paths = getClaudePaths(global);
|
|
325
|
+
const targetDir = path.dirname(paths.configPath);
|
|
162
326
|
|
|
163
327
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
164
328
|
|
|
165
|
-
|
|
166
|
-
path.join(skillsDir, 'omnidesign.md'),
|
|
167
|
-
path.join(targetDir, 'omnidesign.md')
|
|
168
|
-
);
|
|
329
|
+
copySkillContent(skillsDir, targetDir, packageDir);
|
|
169
330
|
|
|
170
|
-
|
|
331
|
+
const skillMdSource = path.join(skillsDir, 'omnidesign.md');
|
|
332
|
+
const skillMdTarget = path.join(targetDir, 'SKILL.md');
|
|
333
|
+
if (fs.existsSync(skillMdSource)) {
|
|
334
|
+
fs.copyFileSync(skillMdSource, skillMdTarget);
|
|
335
|
+
console.log(chalk.gray(` Created: ${path.relative(process.cwd(), skillMdTarget)}`));
|
|
336
|
+
}
|
|
171
337
|
|
|
172
|
-
const marketplacePath =
|
|
173
|
-
? path.join(require('os').homedir(), '.claude', 'marketplace.json')
|
|
174
|
-
: path.join(cwd, '.claude', 'marketplace.json');
|
|
338
|
+
const marketplacePath = path.join(paths.baseDir, 'marketplace.json');
|
|
175
339
|
|
|
176
340
|
let marketplace = { name: 'local', plugins: [] };
|
|
177
341
|
if (fs.existsSync(marketplacePath)) {
|
|
@@ -181,209 +345,246 @@ async function installClaudeSkill(cwd, skillsDir, global) {
|
|
|
181
345
|
if (!marketplace.plugins.find(p => p.name === 'omnidesign')) {
|
|
182
346
|
marketplace.plugins.push({
|
|
183
347
|
name: 'omnidesign',
|
|
184
|
-
source: './skills/omnidesign
|
|
185
|
-
description: 'Universal design system with 25 themes and AI components',
|
|
186
|
-
version:
|
|
348
|
+
source: './skills/omnidesign/',
|
|
349
|
+
description: 'Universal design system with 25 themes, tokens, recipes, and AI components',
|
|
350
|
+
version: packageJson.version
|
|
187
351
|
});
|
|
188
352
|
fs.writeFileSync(marketplacePath, JSON.stringify(marketplace, null, 2));
|
|
189
|
-
console.log(chalk.gray(` Updated: ${path.relative(cwd, marketplacePath)}`));
|
|
353
|
+
console.log(chalk.gray(` Updated: ${path.relative(process.cwd(), marketplacePath)}`));
|
|
190
354
|
}
|
|
191
355
|
}
|
|
192
356
|
|
|
193
|
-
async function installCursorSkill(
|
|
194
|
-
const
|
|
195
|
-
|
|
196
|
-
: path.join(cwd, '.cursor', 'skills');
|
|
357
|
+
async function installCursorSkill(skillsDir, packageDir, global) {
|
|
358
|
+
const paths = getCursorPaths(global);
|
|
359
|
+
const targetDir = path.dirname(paths.configPath);
|
|
197
360
|
|
|
198
361
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
199
362
|
|
|
200
|
-
|
|
201
|
-
path.join(skillsDir, 'omnidesign.md'),
|
|
202
|
-
path.join(targetDir, 'omnidesign.md')
|
|
203
|
-
);
|
|
363
|
+
copySkillContent(skillsDir, targetDir, packageDir);
|
|
204
364
|
|
|
205
|
-
|
|
365
|
+
const skillMdSource = path.join(skillsDir, 'omnidesign.md');
|
|
366
|
+
const skillMdTarget = path.join(targetDir, 'SKILL.md');
|
|
367
|
+
if (fs.existsSync(skillMdSource)) {
|
|
368
|
+
fs.copyFileSync(skillMdSource, skillMdTarget);
|
|
369
|
+
console.log(chalk.gray(` Created: ${path.relative(process.cwd(), skillMdTarget)}`));
|
|
370
|
+
}
|
|
206
371
|
}
|
|
207
372
|
|
|
208
|
-
async function installOpenCodeSkill(
|
|
209
|
-
const
|
|
210
|
-
|
|
211
|
-
: path.join(cwd, '.opencode', 'skills');
|
|
373
|
+
async function installOpenCodeSkill(skillsDir, packageDir, global) {
|
|
374
|
+
const paths = getOpenCodePaths(global);
|
|
375
|
+
const targetDir = path.dirname(paths.configPath);
|
|
212
376
|
|
|
213
377
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
214
378
|
|
|
215
|
-
|
|
216
|
-
path.join(skillsDir, 'omnidesign.md'),
|
|
217
|
-
path.join(targetDir, 'omnidesign.md')
|
|
218
|
-
);
|
|
219
|
-
|
|
220
|
-
console.log(chalk.gray(` Created: ${path.relative(cwd, path.join(targetDir, 'omnidesign.md'))}`));
|
|
379
|
+
copySkillContent(skillsDir, targetDir, packageDir);
|
|
221
380
|
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
|
|
381
|
+
const skillMdSource = path.join(skillsDir, 'omnidesign.md');
|
|
382
|
+
const skillMdTarget = path.join(targetDir, 'SKILL.md');
|
|
383
|
+
if (fs.existsSync(skillMdSource)) {
|
|
384
|
+
fs.copyFileSync(skillMdSource, skillMdTarget);
|
|
385
|
+
console.log(chalk.gray(` Created: ${path.relative(process.cwd(), skillMdTarget)}`));
|
|
386
|
+
}
|
|
225
387
|
|
|
226
388
|
let config = { plugins: [] };
|
|
227
|
-
if (fs.existsSync(
|
|
228
|
-
config = JSON.parse(fs.readFileSync(
|
|
389
|
+
if (fs.existsSync(paths.configJsonPath)) {
|
|
390
|
+
config = JSON.parse(fs.readFileSync(paths.configJsonPath, 'utf8'));
|
|
229
391
|
}
|
|
230
392
|
|
|
231
393
|
if (!config.plugins.includes('omnidesign')) {
|
|
232
394
|
config.plugins.push('omnidesign');
|
|
233
|
-
fs.writeFileSync(
|
|
234
|
-
console.log(chalk.gray(` Updated: ${path.relative(cwd,
|
|
395
|
+
fs.writeFileSync(paths.configJsonPath, JSON.stringify(config, null, 2));
|
|
396
|
+
console.log(chalk.gray(` Updated: ${path.relative(process.cwd(), paths.configJsonPath)}`));
|
|
235
397
|
}
|
|
236
398
|
}
|
|
237
399
|
|
|
238
|
-
async function installVSCodeSkill(
|
|
239
|
-
const
|
|
240
|
-
|
|
400
|
+
async function installVSCodeSkill(skillsDir, packageDir, global) {
|
|
401
|
+
const paths = getVSCodePaths(global);
|
|
402
|
+
|
|
403
|
+
fs.mkdirSync(paths.baseDir, { recursive: true });
|
|
241
404
|
|
|
242
|
-
const settingsPath = path.join(targetDir, 'settings.json');
|
|
243
405
|
let settings = {};
|
|
244
406
|
|
|
245
|
-
if (fs.existsSync(
|
|
246
|
-
settings = JSON.parse(fs.readFileSync(
|
|
407
|
+
if (fs.existsSync(paths.configPath)) {
|
|
408
|
+
settings = JSON.parse(fs.readFileSync(paths.configPath, 'utf8'));
|
|
247
409
|
}
|
|
248
410
|
|
|
249
411
|
settings['omnidesign.enabled'] = true;
|
|
250
412
|
settings['omnidesign.theme'] = 'corporate';
|
|
251
413
|
|
|
252
|
-
fs.writeFileSync(
|
|
253
|
-
console.log(chalk.gray(` Updated: ${
|
|
414
|
+
fs.writeFileSync(paths.configPath, JSON.stringify(settings, null, 2));
|
|
415
|
+
console.log(chalk.gray(` Updated: ${paths.configFile}`));
|
|
416
|
+
console.log(chalk.yellow(' Note: VS Code extension coming soon. Settings configured.'));
|
|
254
417
|
}
|
|
255
418
|
|
|
256
|
-
async function installAiderSkill(
|
|
257
|
-
const
|
|
419
|
+
async function installAiderSkill(skillsDir, packageDir, global) {
|
|
420
|
+
const paths = getAiderPaths(global);
|
|
421
|
+
const targetDir = path.join(paths.baseDir, '.omnidesign');
|
|
422
|
+
|
|
423
|
+
fs.mkdirSync(targetDir, { recursive: true });
|
|
258
424
|
|
|
259
|
-
|
|
260
|
-
console.log(chalk.gray(` Created: ${path.relative(cwd, conventionsPath)}`));
|
|
425
|
+
copySkillContent(skillsDir, targetDir, packageDir);
|
|
261
426
|
|
|
262
|
-
const
|
|
427
|
+
const conventionsSource = path.join(skillsDir, 'omnidesign.md');
|
|
428
|
+
fs.copyFileSync(conventionsSource, paths.configPath);
|
|
429
|
+
console.log(chalk.gray(` Created: ${paths.configFile}`));
|
|
430
|
+
console.log(chalk.gray(` Created: ${path.relative(process.cwd(), targetDir)}/ (tokens, recipes)`));
|
|
431
|
+
|
|
432
|
+
const configPath = path.join(paths.baseDir, '.aider.conf.yml');
|
|
263
433
|
if (fs.existsSync(configPath)) {
|
|
264
434
|
let config = fs.readFileSync(configPath, 'utf8');
|
|
265
435
|
if (!config.includes('CONVENTIONS.md')) {
|
|
266
436
|
config += '\nread: CONVENTIONS.md\n';
|
|
267
437
|
fs.writeFileSync(configPath, config);
|
|
268
|
-
console.log(chalk.gray(` Updated: ${path.relative(cwd, configPath)}`));
|
|
438
|
+
console.log(chalk.gray(` Updated: ${path.relative(process.cwd(), configPath)}`));
|
|
269
439
|
}
|
|
270
440
|
}
|
|
271
441
|
}
|
|
272
442
|
|
|
273
|
-
async function installContinueSkill(
|
|
274
|
-
const
|
|
443
|
+
async function installContinueSkill(skillsDir, packageDir, global) {
|
|
444
|
+
const paths = getContinuePaths(global);
|
|
445
|
+
const targetDir = path.join(paths.baseDir, 'omnidesign');
|
|
446
|
+
|
|
275
447
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
276
448
|
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
console.log(chalk.
|
|
449
|
+
copySkillContent(skillsDir, targetDir, packageDir);
|
|
450
|
+
|
|
451
|
+
fs.copyFileSync(path.join(skillsDir, 'omnidesign.yaml'), paths.configPath);
|
|
452
|
+
console.log(chalk.gray(` Created: ${paths.configFile}`));
|
|
453
|
+
console.log(chalk.gray(` Created: ${path.relative(process.cwd(), targetDir)}/ (tokens, recipes)`));
|
|
454
|
+
console.log(chalk.yellow(' Note: Add OmniDesign to your Continue config'));
|
|
281
455
|
}
|
|
282
456
|
|
|
283
|
-
async function installZedSkill(
|
|
284
|
-
const
|
|
457
|
+
async function installZedSkill(skillsDir, packageDir, global) {
|
|
458
|
+
const paths = getZedPaths(global);
|
|
459
|
+
const targetDir = path.join(paths.baseDir, 'omnidesign');
|
|
460
|
+
|
|
285
461
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
286
462
|
|
|
287
|
-
|
|
463
|
+
copySkillContent(skillsDir, targetDir, packageDir);
|
|
464
|
+
|
|
288
465
|
const config = {
|
|
289
466
|
name: 'OmniDesign',
|
|
290
|
-
version:
|
|
467
|
+
version: packageJson.version,
|
|
291
468
|
description: 'Universal design system skill',
|
|
292
469
|
enabled: true
|
|
293
470
|
};
|
|
294
471
|
|
|
295
|
-
fs.writeFileSync(configPath, JSON.stringify(config, null, 2));
|
|
296
|
-
console.log(chalk.gray(` Created: ${
|
|
472
|
+
fs.writeFileSync(paths.configPath, JSON.stringify(config, null, 2));
|
|
473
|
+
console.log(chalk.gray(` Created: ${paths.configFile}`));
|
|
474
|
+
console.log(chalk.gray(` Created: ${path.relative(process.cwd(), targetDir)}/ (tokens, recipes)`));
|
|
297
475
|
console.log(chalk.yellow(' Note: Add OmniDesign to your Zed settings.json'));
|
|
298
476
|
}
|
|
299
477
|
|
|
300
|
-
async function installAmpSkill(
|
|
301
|
-
const
|
|
302
|
-
|
|
303
|
-
: path.join(cwd, '.agents', 'skills', 'omnidesign');
|
|
478
|
+
async function installAmpSkill(skillsDir, packageDir, global) {
|
|
479
|
+
const paths = getAmpPaths(global);
|
|
480
|
+
const targetDir = path.dirname(paths.configPath);
|
|
304
481
|
|
|
305
482
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
306
483
|
|
|
307
|
-
|
|
308
|
-
path.join(skillsDir, 'SKILL.md'),
|
|
309
|
-
path.join(targetDir, 'SKILL.md')
|
|
310
|
-
);
|
|
484
|
+
copySkillContent(skillsDir, targetDir, packageDir);
|
|
311
485
|
|
|
312
|
-
|
|
486
|
+
const skillMdSource = path.join(skillsDir, 'SKILL.md');
|
|
487
|
+
const skillMdTarget = paths.configPath;
|
|
488
|
+
if (fs.existsSync(skillMdSource)) {
|
|
489
|
+
fs.copyFileSync(skillMdSource, skillMdTarget);
|
|
490
|
+
console.log(chalk.gray(` Created: ${paths.configFile}`));
|
|
491
|
+
}
|
|
313
492
|
console.log(chalk.blue(' You can also use: amp skill add owner/omnidesign'));
|
|
314
493
|
}
|
|
315
494
|
|
|
316
|
-
async function installKiloSkill(
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
: path.join(cwd, '.kilocode', 'skills', 'omnidesign');
|
|
495
|
+
async function installKiloSkill(skillsDir, packageDir, global) {
|
|
496
|
+
const paths = getKiloPaths(global);
|
|
497
|
+
const targetDir = path.dirname(paths.configPath);
|
|
320
498
|
|
|
321
499
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
322
500
|
|
|
323
|
-
|
|
324
|
-
path.join(skillsDir, 'SKILL.md'),
|
|
325
|
-
path.join(targetDir, 'SKILL.md')
|
|
326
|
-
);
|
|
501
|
+
copySkillContent(skillsDir, targetDir, packageDir);
|
|
327
502
|
|
|
328
|
-
|
|
503
|
+
const skillMdSource = path.join(skillsDir, 'SKILL.md');
|
|
504
|
+
const skillMdTarget = paths.configPath;
|
|
505
|
+
if (fs.existsSync(skillMdSource)) {
|
|
506
|
+
fs.copyFileSync(skillMdSource, skillMdTarget);
|
|
507
|
+
console.log(chalk.gray(` Created: ${paths.configFile}`));
|
|
508
|
+
}
|
|
329
509
|
console.log(chalk.yellow(' Reload VS Code window to activate skill'));
|
|
330
510
|
}
|
|
331
511
|
|
|
332
|
-
async function installAntigravitySkill(
|
|
333
|
-
const
|
|
334
|
-
|
|
335
|
-
: path.join(cwd, '.agent', 'skills', 'omnidesign');
|
|
512
|
+
async function installAntigravitySkill(skillsDir, packageDir, global) {
|
|
513
|
+
const paths = getAntigravityPaths(global);
|
|
514
|
+
const targetDir = path.dirname(paths.configPath);
|
|
336
515
|
|
|
337
516
|
fs.mkdirSync(targetDir, { recursive: true });
|
|
338
517
|
|
|
339
|
-
|
|
340
|
-
path.join(skillsDir, 'SKILL.md'),
|
|
341
|
-
path.join(targetDir, 'SKILL.md')
|
|
342
|
-
);
|
|
518
|
+
copySkillContent(skillsDir, targetDir, packageDir);
|
|
343
519
|
|
|
344
|
-
|
|
520
|
+
const skillMdSource = path.join(skillsDir, 'SKILL.md');
|
|
521
|
+
const skillMdTarget = paths.configPath;
|
|
522
|
+
if (fs.existsSync(skillMdSource)) {
|
|
523
|
+
fs.copyFileSync(skillMdSource, skillMdTarget);
|
|
524
|
+
console.log(chalk.gray(` Created: ${paths.configFile}`));
|
|
525
|
+
}
|
|
345
526
|
}
|
|
346
527
|
|
|
347
|
-
async function uninstallSkill(ide) {
|
|
348
|
-
const cwd = process.cwd();
|
|
349
|
-
|
|
528
|
+
async function uninstallSkill(ide, global = false) {
|
|
350
529
|
switch (ide) {
|
|
351
|
-
case 'claude':
|
|
352
|
-
|
|
530
|
+
case 'claude': {
|
|
531
|
+
const paths = getClaudePaths(global);
|
|
532
|
+
fs.rmSync(path.dirname(paths.configPath), { force: true, recursive: true });
|
|
353
533
|
break;
|
|
354
|
-
|
|
355
|
-
|
|
534
|
+
}
|
|
535
|
+
case 'cursor': {
|
|
536
|
+
const paths = getCursorPaths(global);
|
|
537
|
+
fs.rmSync(path.dirname(paths.configPath), { force: true, recursive: true });
|
|
356
538
|
break;
|
|
357
|
-
|
|
358
|
-
|
|
539
|
+
}
|
|
540
|
+
case 'opencode': {
|
|
541
|
+
const paths = getOpenCodePaths(global);
|
|
542
|
+
fs.rmSync(path.dirname(paths.configPath), { force: true, recursive: true });
|
|
359
543
|
break;
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
544
|
+
}
|
|
545
|
+
case 'vscode': {
|
|
546
|
+
const paths = getVSCodePaths(global);
|
|
547
|
+
if (fs.existsSync(paths.configPath)) {
|
|
548
|
+
const settings = JSON.parse(fs.readFileSync(paths.configPath, 'utf8'));
|
|
364
549
|
delete settings['omnidesign.enabled'];
|
|
365
550
|
delete settings['omnidesign.theme'];
|
|
366
|
-
fs.writeFileSync(
|
|
551
|
+
fs.writeFileSync(paths.configPath, JSON.stringify(settings, null, 2));
|
|
367
552
|
}
|
|
368
553
|
break;
|
|
369
|
-
|
|
370
|
-
|
|
554
|
+
}
|
|
555
|
+
case 'zed': {
|
|
556
|
+
const paths = getZedPaths(global);
|
|
557
|
+
fs.rmSync(path.join(paths.baseDir, 'omnidesign'), { force: true, recursive: true });
|
|
558
|
+
fs.rmSync(paths.configPath, { force: true });
|
|
371
559
|
break;
|
|
372
|
-
|
|
373
|
-
|
|
560
|
+
}
|
|
561
|
+
case 'amp': {
|
|
562
|
+
const paths = getAmpPaths(global);
|
|
563
|
+
fs.rmSync(path.dirname(paths.configPath), { force: true, recursive: true });
|
|
374
564
|
break;
|
|
375
|
-
|
|
376
|
-
|
|
565
|
+
}
|
|
566
|
+
case 'kilo': {
|
|
567
|
+
const paths = getKiloPaths(global);
|
|
568
|
+
fs.rmSync(path.dirname(paths.configPath), { force: true, recursive: true });
|
|
377
569
|
break;
|
|
378
|
-
|
|
379
|
-
|
|
570
|
+
}
|
|
571
|
+
case 'antigravity': {
|
|
572
|
+
const paths = getAntigravityPaths(global);
|
|
573
|
+
fs.rmSync(path.dirname(paths.configPath), { force: true, recursive: true });
|
|
380
574
|
break;
|
|
381
|
-
|
|
382
|
-
|
|
575
|
+
}
|
|
576
|
+
case 'aider': {
|
|
577
|
+
const paths = getAiderPaths(global);
|
|
578
|
+
fs.rmSync(paths.configPath, { force: true });
|
|
579
|
+
fs.rmSync(path.join(paths.baseDir, '.omnidesign'), { force: true, recursive: true });
|
|
383
580
|
break;
|
|
384
|
-
|
|
385
|
-
|
|
581
|
+
}
|
|
582
|
+
case 'continue': {
|
|
583
|
+
const paths = getContinuePaths(global);
|
|
584
|
+
fs.rmSync(paths.configPath, { force: true });
|
|
585
|
+
fs.rmSync(path.join(paths.baseDir, 'omnidesign'), { force: true, recursive: true });
|
|
386
586
|
break;
|
|
587
|
+
}
|
|
387
588
|
}
|
|
388
589
|
}
|
|
389
590
|
|