@petersobhy/ai-toolkit 1.8.5 → 1.9.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/index.js +14 -0
- package/package.json +1 -1
package/index.js
CHANGED
|
@@ -100,6 +100,16 @@ async function installSkill(name) {
|
|
|
100
100
|
return true;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
+
function printSetupHints(names, manifest) {
|
|
104
|
+
const hints = names.map(n => [n, manifest[n]?.setupHint]).filter(([, h]) => h);
|
|
105
|
+
if (hints.length === 0) return;
|
|
106
|
+
const pad = Math.max(...hints.map(([n]) => n.length));
|
|
107
|
+
console.log('\nSetup required:');
|
|
108
|
+
for (const [name, hint] of hints) {
|
|
109
|
+
console.log(` ${name.padEnd(pad)} → ${hint}`);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
|
|
103
113
|
async function cmdAdd(args) {
|
|
104
114
|
const all = args.includes('--all');
|
|
105
115
|
const names = all ? await listAvailable() : args.filter(a => !a.startsWith('-'));
|
|
@@ -110,8 +120,10 @@ async function cmdAdd(args) {
|
|
|
110
120
|
process.exit(1);
|
|
111
121
|
}
|
|
112
122
|
|
|
123
|
+
const manifest = await fetchManifest();
|
|
113
124
|
console.log(all ? `Installing all ${names.length} skills...\n` : `Installing ${names.length} skill(s)...\n`);
|
|
114
125
|
for (const name of names) await installSkill(name);
|
|
126
|
+
printSetupHints(names, manifest);
|
|
115
127
|
console.log('\nRestart Claude Code to activate installed skills.');
|
|
116
128
|
}
|
|
117
129
|
|
|
@@ -121,8 +133,10 @@ async function cmdUpdate() {
|
|
|
121
133
|
console.log('No skills installed. Run: ai-toolkit add --all');
|
|
122
134
|
return;
|
|
123
135
|
}
|
|
136
|
+
const manifest = await fetchManifest();
|
|
124
137
|
console.log(`Updating ${installed.length} installed skill(s)...\n`);
|
|
125
138
|
for (const name of installed) await installSkill(name);
|
|
139
|
+
printSetupHints(installed, manifest);
|
|
126
140
|
console.log('\nRestart Claude Code to activate updated skills.');
|
|
127
141
|
}
|
|
128
142
|
|