aayushus-skills 1.1.0 → 1.2.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/cli.js +68 -89
- package/package.json +1 -1
package/cli.js
CHANGED
|
@@ -18,21 +18,16 @@ const styles = {
|
|
|
18
18
|
};
|
|
19
19
|
|
|
20
20
|
const options = [
|
|
21
|
-
{ name: '
|
|
21
|
+
{ name: 'Antigravity Rules (.antigravityrules)', value: 'antigravity', checked: true },
|
|
22
|
+
{ name: 'Devin Rules (.devin/rules/rules.md & AGENTS.md)', value: 'devin', checked: true },
|
|
23
|
+
{ name: 'Cursor Rules (.cursorrules)', value: 'cursor', checked: true },
|
|
24
|
+
{ name: 'Claude Rules (CLAUDE.md)', value: 'claude', checked: true },
|
|
25
|
+
{ name: 'Codex/Copilot Rules (.github/copilot-instructions.md)', value: 'codex', checked: true },
|
|
22
26
|
{ name: 'Prism Design System (tokens, components CSS/TSX)', value: 'design', checked: true },
|
|
23
27
|
{ name: 'Development Guidelines (Architecture, Quality, Security)', value: 'guidelines', checked: true },
|
|
24
28
|
{ name: 'Solo Developer AI SOP (Standard Operating Procedure)', value: 'sop', checked: true }
|
|
25
29
|
];
|
|
26
30
|
|
|
27
|
-
const toolOptions = [
|
|
28
|
-
{ name: 'Antigravity (.antigravityrules)', value: 'antigravity', checked: true },
|
|
29
|
-
{ name: 'Devin (.devin/rules/rules.md & AGENTS.md)', value: 'devin', checked: true },
|
|
30
|
-
{ name: 'Cursor (.cursorrules)', value: 'cursor', checked: true },
|
|
31
|
-
{ name: 'Claude (CLAUDE.md)', value: 'claude', checked: true },
|
|
32
|
-
{ name: 'Codex/Copilot (.github/copilot-instructions.md)', value: 'codex', checked: true }
|
|
33
|
-
];
|
|
34
|
-
|
|
35
|
-
let currentStep = 0; // 0 = Component selection, 1 = AI Tool selection
|
|
36
31
|
let cursorIndex = 0;
|
|
37
32
|
|
|
38
33
|
const args = process.argv.slice(2);
|
|
@@ -49,29 +44,16 @@ function printMenu() {
|
|
|
49
44
|
}
|
|
50
45
|
console.log(`${styles.cyan}${styles.bold}=========================================${styles.reset}\n`);
|
|
51
46
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
console.log(`${styles.dim}Use ${styles.bold}↑/↓${styles.reset}${styles.dim} to navigate, ${styles.bold}space${styles.reset}${styles.dim} to toggle, and ${styles.bold}enter${styles.reset}${styles.dim} to continue.\n${styles.reset}`);
|
|
47
|
+
console.log(`${styles.dim}Select components and tools to install/configure:${styles.reset}`);
|
|
48
|
+
console.log(`${styles.dim}Use ${styles.bold}↑/↓${styles.reset}${styles.dim} to navigate, ${styles.bold}space${styles.reset}${styles.dim} to toggle, and ${styles.bold}enter${styles.reset}${styles.dim} to install.\n${styles.reset}`);
|
|
55
49
|
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
} else {
|
|
64
|
-
console.log(`${styles.dim}Step 2: Which AI coding tools do you use?${styles.reset}`);
|
|
65
|
-
console.log(`${styles.dim}Use ${styles.bold}↑/↓${styles.reset}${styles.dim} to navigate, ${styles.bold}space${styles.reset}${styles.dim} to toggle, and ${styles.bold}enter${styles.reset}${styles.dim} to install.\n${styles.reset}`);
|
|
66
|
-
|
|
67
|
-
toolOptions.forEach((opt, idx) => {
|
|
68
|
-
const isCursor = idx === cursorIndex;
|
|
69
|
-
const checkbox = opt.checked ? `[${styles.green}x${styles.reset}]` : '[ ]';
|
|
70
|
-
const prefix = isCursor ? `${styles.cyan}❯ ` : ' ';
|
|
71
|
-
const styledName = isCursor ? `${styles.cyan}${styles.bold}${opt.name}${styles.reset}` : opt.name;
|
|
72
|
-
console.log(`${prefix}${checkbox} ${styledName}`);
|
|
73
|
-
});
|
|
74
|
-
}
|
|
50
|
+
options.forEach((opt, idx) => {
|
|
51
|
+
const isCursor = idx === cursorIndex;
|
|
52
|
+
const checkbox = opt.checked ? `[${styles.green}x${styles.reset}]` : '[ ]';
|
|
53
|
+
const prefix = isCursor ? `${styles.cyan}❯ ` : ' ';
|
|
54
|
+
const styledName = isCursor ? `${styles.cyan}${styles.bold}${opt.name}${styles.reset}` : opt.name;
|
|
55
|
+
console.log(`${prefix}${checkbox} ${styledName}`);
|
|
56
|
+
});
|
|
75
57
|
|
|
76
58
|
console.log('\n');
|
|
77
59
|
}
|
|
@@ -118,47 +100,53 @@ function runInstallation() {
|
|
|
118
100
|
const targetRoot = process.cwd();
|
|
119
101
|
|
|
120
102
|
const selected = options.filter(opt => opt.checked).map(opt => opt.value);
|
|
121
|
-
const selectedTools = toolOptions.filter(opt => opt.checked).map(opt => opt.value);
|
|
122
103
|
|
|
123
104
|
if (selected.length === 0) {
|
|
124
105
|
console.log(`${styles.red}No options selected. Aborting.${styles.reset}\n`);
|
|
125
106
|
process.exit(0);
|
|
126
107
|
}
|
|
127
108
|
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
console.log(`${styles.blue} Installing AI Agent Configurations...${styles.reset}`);
|
|
131
|
-
const srcAgentDir = path.join(packageRoot, 'agent-config');
|
|
109
|
+
const srcAgentDir = path.join(packageRoot, 'agent-config');
|
|
110
|
+
const hasAgentConfigs = fs.existsSync(srcAgentDir);
|
|
132
111
|
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
112
|
+
if (hasAgentConfigs) {
|
|
113
|
+
const genericRulesFile = path.join(srcAgentDir, 'rules.md');
|
|
114
|
+
const claudeFile = path.join(srcAgentDir, 'CLAUDE.md');
|
|
115
|
+
const copilotFile = path.join(srcAgentDir, 'copilot-instructions.md');
|
|
137
116
|
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
copyFileSync(genericRulesFile, path.join(targetRoot, 'AGENTS.md'));
|
|
144
|
-
}
|
|
145
|
-
if (selectedTools.includes('cursor')) {
|
|
146
|
-
copyFileSync(genericRulesFile, path.join(targetRoot, '.cursorrules'));
|
|
147
|
-
}
|
|
148
|
-
if (selectedTools.includes('claude')) {
|
|
149
|
-
copyFileSync(claudeFile, path.join(targetRoot, 'CLAUDE.md'));
|
|
150
|
-
}
|
|
151
|
-
if (selectedTools.includes('codex')) {
|
|
152
|
-
copyFileSync(copilotFile, path.join(targetRoot, '.github', 'copilot-instructions.md'));
|
|
153
|
-
}
|
|
117
|
+
// 1. Antigravity
|
|
118
|
+
if (selected.includes('antigravity')) {
|
|
119
|
+
console.log(`${styles.blue} Configuring Antigravity rules...${styles.reset}`);
|
|
120
|
+
copyFileSync(genericRulesFile, path.join(targetRoot, '.antigravityrules'));
|
|
121
|
+
}
|
|
154
122
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
console.log(`${styles.
|
|
123
|
+
// 2. Devin
|
|
124
|
+
if (selected.includes('devin')) {
|
|
125
|
+
console.log(`${styles.blue} Configuring Devin rules...${styles.reset}`);
|
|
126
|
+
copyFileSync(genericRulesFile, path.join(targetRoot, '.devin', 'rules', 'rules.md'));
|
|
127
|
+
copyFileSync(genericRulesFile, path.join(targetRoot, 'AGENTS.md'));
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
// 3. Cursor
|
|
131
|
+
if (selected.includes('cursor')) {
|
|
132
|
+
console.log(`${styles.blue} Configuring Cursor rules...${styles.reset}`);
|
|
133
|
+
copyFileSync(genericRulesFile, path.join(targetRoot, '.cursorrules'));
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
// 4. Claude
|
|
137
|
+
if (selected.includes('claude')) {
|
|
138
|
+
console.log(`${styles.blue} Configuring Claude CLAUDE.md...${styles.reset}`);
|
|
139
|
+
copyFileSync(claudeFile, path.join(targetRoot, 'CLAUDE.md'));
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
// 5. Codex/Copilot
|
|
143
|
+
if (selected.includes('codex')) {
|
|
144
|
+
console.log(`${styles.blue} Configuring Codex/Copilot rules...${styles.reset}`);
|
|
145
|
+
copyFileSync(copilotFile, path.join(targetRoot, '.github', 'copilot-instructions.md'));
|
|
158
146
|
}
|
|
159
147
|
}
|
|
160
148
|
|
|
161
|
-
//
|
|
149
|
+
// 6. Design System
|
|
162
150
|
if (selected.includes('design')) {
|
|
163
151
|
console.log(`${styles.blue} Installing Prism Design System...${styles.reset}`);
|
|
164
152
|
const srcDesignDir = path.join(packageRoot, 'design');
|
|
@@ -174,7 +162,7 @@ function runInstallation() {
|
|
|
174
162
|
}
|
|
175
163
|
}
|
|
176
164
|
|
|
177
|
-
//
|
|
165
|
+
// 7. Development Guidelines
|
|
178
166
|
if (selected.includes('guidelines')) {
|
|
179
167
|
console.log(`${styles.blue} Installing Development Guidelines...${styles.reset}`);
|
|
180
168
|
const srcGuidelinesDir = path.join(packageRoot, 'guidelines');
|
|
@@ -188,7 +176,7 @@ function runInstallation() {
|
|
|
188
176
|
}
|
|
189
177
|
}
|
|
190
178
|
|
|
191
|
-
//
|
|
179
|
+
// 8. SOP
|
|
192
180
|
if (selected.includes('sop')) {
|
|
193
181
|
console.log(`${styles.blue} Installing Solo Developer AI SOP...${styles.reset}`);
|
|
194
182
|
const srcSopFile = path.join(packageRoot, 'Solo Developer AI SOP.md');
|
|
@@ -217,9 +205,13 @@ Usage:
|
|
|
217
205
|
npx aayushus-skills Interactive installation menu (default)
|
|
218
206
|
npx aayushus-skills all Install everything directly
|
|
219
207
|
npx aayushus-skills design Install Prism Design System only
|
|
220
|
-
npx aayushus-skills agent-config Install all AI Agent Configurations
|
|
221
208
|
npx aayushus-skills guidelines Install Development Guidelines only
|
|
222
209
|
npx aayushus-skills sop Install Solo Developer AI SOP only
|
|
210
|
+
npx aayushus-skills cursor Install Cursor rules only
|
|
211
|
+
npx aayushus-skills antigravity Install Antigravity rules only
|
|
212
|
+
npx aayushus-skills devin Install Devin rules only
|
|
213
|
+
npx aayushus-skills claude Install Claude rules only
|
|
214
|
+
npx aayushus-skills codex Install Codex/Copilot rules only
|
|
223
215
|
|
|
224
216
|
Flags:
|
|
225
217
|
-d, --dry-run Preview installation without making actual changes
|
|
@@ -229,9 +221,13 @@ Flags:
|
|
|
229
221
|
|
|
230
222
|
// Check for direct subcommands
|
|
231
223
|
const argMap = {
|
|
224
|
+
'antigravity': 'antigravity',
|
|
225
|
+
'devin': 'devin',
|
|
226
|
+
'cursor': 'cursor',
|
|
227
|
+
'claude': 'claude',
|
|
228
|
+
'codex': 'codex',
|
|
229
|
+
'copilot': 'codex',
|
|
232
230
|
'design': 'design',
|
|
233
|
-
'agent-config': 'agent-config',
|
|
234
|
-
'agent': 'agent-config',
|
|
235
231
|
'guidelines': 'guidelines',
|
|
236
232
|
'sop': 'sop'
|
|
237
233
|
};
|
|
@@ -247,7 +243,6 @@ if (hasDirectCommand) {
|
|
|
247
243
|
opt.checked = directArgs.some(arg => argMap[arg] === opt.value);
|
|
248
244
|
});
|
|
249
245
|
}
|
|
250
|
-
// If non-interactive, default to configuring rules for all AI tools
|
|
251
246
|
runInstallation();
|
|
252
247
|
}
|
|
253
248
|
|
|
@@ -271,41 +266,25 @@ process.stdin.on('keypress', (str, key) => {
|
|
|
271
266
|
process.exit(0);
|
|
272
267
|
}
|
|
273
268
|
|
|
274
|
-
const currentList = currentStep === 0 ? options : toolOptions;
|
|
275
|
-
|
|
276
269
|
switch (key.name) {
|
|
277
270
|
case 'up':
|
|
278
|
-
cursorIndex = (cursorIndex - 1 +
|
|
271
|
+
cursorIndex = (cursorIndex - 1 + options.length) % options.length;
|
|
279
272
|
printMenu();
|
|
280
273
|
break;
|
|
281
274
|
case 'down':
|
|
282
|
-
cursorIndex = (cursorIndex + 1) %
|
|
275
|
+
cursorIndex = (cursorIndex + 1) % options.length;
|
|
283
276
|
printMenu();
|
|
284
277
|
break;
|
|
285
278
|
case 'space':
|
|
286
|
-
|
|
279
|
+
options[cursorIndex].checked = !options[cursorIndex].checked;
|
|
287
280
|
printMenu();
|
|
288
281
|
break;
|
|
289
282
|
case 'return':
|
|
290
283
|
case 'enter':
|
|
291
|
-
if (
|
|
292
|
-
|
|
293
|
-
if (isAgentSelected) {
|
|
294
|
-
currentStep = 1;
|
|
295
|
-
cursorIndex = 0;
|
|
296
|
-
printMenu();
|
|
297
|
-
} else {
|
|
298
|
-
if (process.stdin.isTTY) {
|
|
299
|
-
process.stdin.setRawMode(false);
|
|
300
|
-
}
|
|
301
|
-
runInstallation();
|
|
302
|
-
}
|
|
303
|
-
} else {
|
|
304
|
-
if (process.stdin.isTTY) {
|
|
305
|
-
process.stdin.setRawMode(false);
|
|
306
|
-
}
|
|
307
|
-
runInstallation();
|
|
284
|
+
if (process.stdin.isTTY) {
|
|
285
|
+
process.stdin.setRawMode(false);
|
|
308
286
|
}
|
|
287
|
+
runInstallation();
|
|
309
288
|
break;
|
|
310
289
|
}
|
|
311
290
|
});
|