claudekit-cli 3.31.0-dev.5 → 3.31.0-dev.6

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.
Files changed (2) hide show
  1. package/dist/index.js +53 -39
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -49050,6 +49050,7 @@ async function skillCommand(options2) {
49050
49050
  const ctx = {
49051
49051
  options: validOptions,
49052
49052
  cancelled: false,
49053
+ selectedSkills: [],
49053
49054
  selectedAgents: [],
49054
49055
  installGlobally: validOptions.global ?? false,
49055
49056
  availableSkills,
@@ -49072,12 +49073,12 @@ async function skillCommand(options2) {
49072
49073
  $e(import_picocolors21.default.red("Installation failed"));
49073
49074
  process.exit(1);
49074
49075
  }
49075
- ctx.selectedSkill = skill;
49076
+ ctx.selectedSkills = [skill];
49076
49077
  f2.info(`Skill: ${import_picocolors21.default.cyan(skill.name)}`);
49077
49078
  f2.message(import_picocolors21.default.dim(skill.description));
49078
49079
  } else if (availableSkills.length === 1) {
49079
- ctx.selectedSkill = availableSkills[0];
49080
- f2.info(`Skill: ${import_picocolors21.default.cyan(ctx.selectedSkill.name)}`);
49080
+ ctx.selectedSkills = [availableSkills[0]];
49081
+ f2.info(`Skill: ${import_picocolors21.default.cyan(ctx.selectedSkills[0].name)}`);
49081
49082
  } else if (validOptions.yes) {
49082
49083
  f2.error("--name required in non-interactive mode with multiple skills");
49083
49084
  process.exit(1);
@@ -49087,15 +49088,17 @@ async function skillCommand(options2) {
49087
49088
  label: s.name,
49088
49089
  hint: s.description.length > 50 ? `${s.description.slice(0, 47)}...` : s.description
49089
49090
  }));
49090
- const selected = await ie({
49091
- message: "Select a skill to install",
49092
- options: skillChoices
49091
+ const selected = await ae({
49092
+ message: "Select skill(s) to install",
49093
+ options: skillChoices,
49094
+ required: true
49093
49095
  });
49094
49096
  if (lD(selected)) {
49095
49097
  ue("Installation cancelled");
49096
49098
  return;
49097
49099
  }
49098
- ctx.selectedSkill = selected;
49100
+ ctx.selectedSkills = selected;
49101
+ f2.info(`Selected ${ctx.selectedSkills.length} skill(s)`);
49099
49102
  }
49100
49103
  const validAgentTypes = Object.keys(agents);
49101
49104
  if (validOptions.agent && validOptions.agent.length > 0) {
@@ -49173,60 +49176,71 @@ async function skillCommand(options2) {
49173
49176
  }
49174
49177
  ctx.installGlobally = scope;
49175
49178
  }
49176
- if (!ctx.selectedSkill) {
49177
- f2.error("No skill selected");
49179
+ if (ctx.selectedSkills.length === 0) {
49180
+ f2.error("No skills selected");
49178
49181
  process.exit(1);
49179
49182
  }
49180
- const selectedSkill = ctx.selectedSkill;
49181
49183
  console.log();
49182
49184
  f2.step(import_picocolors21.default.bold("Installation Summary"));
49183
- const preview = getInstallPreview(selectedSkill, ctx.selectedAgents, {
49184
- global: ctx.installGlobally
49185
- });
49186
- for (const item of preview) {
49187
- const status = item.exists ? import_picocolors21.default.yellow(" (will overwrite)") : "";
49188
- f2.message(` ${import_picocolors21.default.dim("→")} ${item.displayName}: ${import_picocolors21.default.dim(item.path)}${status}`);
49185
+ for (const skill of ctx.selectedSkills) {
49186
+ f2.message(` ${import_picocolors21.default.cyan(skill.name)}`);
49187
+ const preview = getInstallPreview(skill, ctx.selectedAgents, {
49188
+ global: ctx.installGlobally
49189
+ });
49190
+ for (const item of preview) {
49191
+ const status = item.exists ? import_picocolors21.default.yellow(" (overwrite)") : "";
49192
+ f2.message(` ${import_picocolors21.default.dim("→")} ${item.displayName}${status}`);
49193
+ }
49189
49194
  }
49190
49195
  console.log();
49191
49196
  if (!validOptions.yes) {
49192
- const confirmed = await se({ message: "Proceed with installation?" });
49197
+ const confirmed = await se({
49198
+ message: `Install ${ctx.selectedSkills.length} skill(s) to ${ctx.selectedAgents.length} agent(s)?`
49199
+ });
49193
49200
  if (lD(confirmed) || !confirmed) {
49194
49201
  ue("Installation cancelled");
49195
49202
  return;
49196
49203
  }
49197
49204
  }
49198
49205
  const spinner = de();
49199
- spinner.start("Installing skill...");
49200
- const results = await installSkillToAgents(selectedSkill, ctx.selectedAgents, {
49201
- global: ctx.installGlobally
49202
- });
49206
+ spinner.start(`Installing ${ctx.selectedSkills.length} skill(s)...`);
49207
+ let totalSuccessful = 0;
49208
+ let totalFailed = 0;
49209
+ const allResults = [];
49210
+ for (const skill of ctx.selectedSkills) {
49211
+ const results = await installSkillToAgents(skill, ctx.selectedAgents, {
49212
+ global: ctx.installGlobally
49213
+ });
49214
+ allResults.push({ skill: skill.name, results });
49215
+ totalSuccessful += results.filter((r2) => r2.success).length;
49216
+ totalFailed += results.filter((r2) => !r2.success).length;
49217
+ }
49203
49218
  spinner.stop("Installation complete");
49204
49219
  console.log();
49205
- const successful = results.filter((r2) => r2.success);
49206
- const failed = results.filter((r2) => !r2.success);
49207
- if (successful.length > 0) {
49208
- f2.success(import_picocolors21.default.green(`Successfully installed to ${successful.length} agent(s)`));
49209
- for (const r2 of successful) {
49210
- f2.message(` ${import_picocolors21.default.green("✓")} ${r2.agentDisplayName}`);
49211
- f2.message(` ${import_picocolors21.default.dim(r2.path)}`);
49220
+ for (const { skill, results } of allResults) {
49221
+ const successful = results.filter((r2) => r2.success);
49222
+ const failed = results.filter((r2) => !r2.success);
49223
+ if (successful.length > 0) {
49224
+ f2.success(`${import_picocolors21.default.cyan(skill)} ${successful.length} agent(s)`);
49225
+ for (const r2 of successful) {
49226
+ f2.message(` ${import_picocolors21.default.green("✓")} ${r2.agentDisplayName}`);
49227
+ }
49212
49228
  }
49213
- }
49214
- if (failed.length > 0) {
49215
- console.log();
49216
- f2.error(import_picocolors21.default.red(`Failed to install to ${failed.length} agent(s)`));
49217
- for (const r2 of failed) {
49218
- f2.message(` ${import_picocolors21.default.red("✗")} ${r2.agentDisplayName}`);
49219
- f2.message(` ${import_picocolors21.default.dim(r2.error)}`);
49229
+ if (failed.length > 0) {
49230
+ f2.error(`${import_picocolors21.default.cyan(skill)} failed: ${failed.length} agent(s)`);
49231
+ for (const r2 of failed) {
49232
+ f2.message(` ${import_picocolors21.default.red("✗")} ${r2.agentDisplayName}: ${import_picocolors21.default.dim(r2.error)}`);
49233
+ }
49220
49234
  }
49221
49235
  }
49222
49236
  console.log();
49223
- if (successful.length === 0 && failed.length === 0) {
49237
+ if (totalSuccessful === 0 && totalFailed === 0) {
49224
49238
  $e(import_picocolors21.default.yellow("No installations performed"));
49225
- } else if (failed.length > 0 && successful.length === 0) {
49239
+ } else if (totalFailed > 0 && totalSuccessful === 0) {
49226
49240
  $e(import_picocolors21.default.red("Installation failed"));
49227
49241
  process.exit(1);
49228
49242
  } else {
49229
- $e(import_picocolors21.default.green("Done!"));
49243
+ $e(import_picocolors21.default.green(`Done! ${totalSuccessful} installed, ${totalFailed} failed`));
49230
49244
  }
49231
49245
  } catch (error) {
49232
49246
  logger.error(error instanceof Error ? error.message : "Unknown error");
@@ -49730,7 +49744,7 @@ var import_fs_extra37 = __toESM(require_lib(), 1);
49730
49744
  // package.json
49731
49745
  var package_default = {
49732
49746
  name: "claudekit-cli",
49733
- version: "3.31.0-dev.5",
49747
+ version: "3.31.0-dev.6",
49734
49748
  description: "CLI tool for bootstrapping and updating ClaudeKit projects",
49735
49749
  type: "module",
49736
49750
  repository: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claudekit-cli",
3
- "version": "3.31.0-dev.5",
3
+ "version": "3.31.0-dev.6",
4
4
  "description": "CLI tool for bootstrapping and updating ClaudeKit projects",
5
5
  "type": "module",
6
6
  "repository": {