uloop-cli 0.45.0 → 0.45.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.
@@ -3690,7 +3690,7 @@ var import_path3 = require("path");
3690
3690
 
3691
3691
  // src/default-tools.json
3692
3692
  var default_tools_default = {
3693
- version: "0.45.0",
3693
+ version: "0.45.2",
3694
3694
  tools: [
3695
3695
  {
3696
3696
  name: "compile",
@@ -4087,7 +4087,7 @@ function getCacheFilePath() {
4087
4087
  }
4088
4088
 
4089
4089
  // src/version.ts
4090
- var VERSION = "0.45.0";
4090
+ var VERSION = "0.45.2";
4091
4091
 
4092
4092
  // src/spinner.ts
4093
4093
  var SPINNER_FRAMES = ["\u280B", "\u2819", "\u2839", "\u2838", "\u283C", "\u2834", "\u2826", "\u2827", "\u2807", "\u280F"];
@@ -4428,53 +4428,53 @@ var BUNDLED_SKILLS = [
4428
4428
  ];
4429
4429
 
4430
4430
  // src/skills/skills-manager.ts
4431
- function getGlobalSkillsDir() {
4432
- return (0, import_path5.join)((0, import_os.homedir)(), ".claude", "skills");
4431
+ function getGlobalSkillsDir(target) {
4432
+ return (0, import_path5.join)((0, import_os.homedir)(), target.projectDir, "skills");
4433
4433
  }
4434
- function getProjectSkillsDir() {
4435
- return (0, import_path5.join)(process.cwd(), ".claude", "skills");
4434
+ function getProjectSkillsDir(target) {
4435
+ return (0, import_path5.join)(process.cwd(), target.projectDir, "skills");
4436
4436
  }
4437
- function getSkillPath(skillDirName, global) {
4438
- const baseDir = global ? getGlobalSkillsDir() : getProjectSkillsDir();
4439
- return (0, import_path5.join)(baseDir, skillDirName, "SKILL.md");
4437
+ function getSkillPath(skillDirName, target, global) {
4438
+ const baseDir = global ? getGlobalSkillsDir(target) : getProjectSkillsDir(target);
4439
+ return (0, import_path5.join)(baseDir, skillDirName, target.skillFileName);
4440
4440
  }
4441
- function isSkillInstalled(skill, global) {
4442
- const skillPath = getSkillPath(skill.dirName, global);
4441
+ function isSkillInstalled(skill, target, global) {
4442
+ const skillPath = getSkillPath(skill.dirName, target, global);
4443
4443
  return (0, import_fs4.existsSync)(skillPath);
4444
4444
  }
4445
- function isSkillOutdated(skill, global) {
4446
- const skillPath = getSkillPath(skill.dirName, global);
4445
+ function isSkillOutdated(skill, target, global) {
4446
+ const skillPath = getSkillPath(skill.dirName, target, global);
4447
4447
  if (!(0, import_fs4.existsSync)(skillPath)) {
4448
4448
  return false;
4449
4449
  }
4450
4450
  const installedContent = (0, import_fs4.readFileSync)(skillPath, "utf-8");
4451
4451
  return installedContent !== skill.content;
4452
4452
  }
4453
- function getSkillStatus(skill, global) {
4454
- if (!isSkillInstalled(skill, global)) {
4453
+ function getSkillStatus(skill, target, global) {
4454
+ if (!isSkillInstalled(skill, target, global)) {
4455
4455
  return "not_installed";
4456
4456
  }
4457
- if (isSkillOutdated(skill, global)) {
4457
+ if (isSkillOutdated(skill, target, global)) {
4458
4458
  return "outdated";
4459
4459
  }
4460
4460
  return "installed";
4461
4461
  }
4462
- function getAllSkillStatuses(global) {
4462
+ function getAllSkillStatuses(target, global) {
4463
4463
  return BUNDLED_SKILLS.map((skill) => ({
4464
4464
  name: skill.name,
4465
- status: getSkillStatus(skill, global),
4466
- path: isSkillInstalled(skill, global) ? getSkillPath(skill.dirName, global) : void 0
4465
+ status: getSkillStatus(skill, target, global),
4466
+ path: isSkillInstalled(skill, target, global) ? getSkillPath(skill.dirName, target, global) : void 0
4467
4467
  }));
4468
4468
  }
4469
- function installSkill(skill, global) {
4470
- const baseDir = global ? getGlobalSkillsDir() : getProjectSkillsDir();
4469
+ function installSkill(skill, target, global) {
4470
+ const baseDir = global ? getGlobalSkillsDir(target) : getProjectSkillsDir(target);
4471
4471
  const skillDir = (0, import_path5.join)(baseDir, skill.dirName);
4472
- const skillPath = (0, import_path5.join)(skillDir, "SKILL.md");
4472
+ const skillPath = (0, import_path5.join)(skillDir, target.skillFileName);
4473
4473
  (0, import_fs4.mkdirSync)(skillDir, { recursive: true });
4474
4474
  (0, import_fs4.writeFileSync)(skillPath, skill.content, "utf-8");
4475
4475
  }
4476
- function uninstallSkill(skill, global) {
4477
- const baseDir = global ? getGlobalSkillsDir() : getProjectSkillsDir();
4476
+ function uninstallSkill(skill, target, global) {
4477
+ const baseDir = global ? getGlobalSkillsDir(target) : getProjectSkillsDir(target);
4478
4478
  const skillDir = (0, import_path5.join)(baseDir, skill.dirName);
4479
4479
  if (!(0, import_fs4.existsSync)(skillDir)) {
4480
4480
  return false;
@@ -4482,15 +4482,15 @@ function uninstallSkill(skill, global) {
4482
4482
  (0, import_fs4.rmSync)(skillDir, { recursive: true, force: true });
4483
4483
  return true;
4484
4484
  }
4485
- function installAllSkills(global) {
4485
+ function installAllSkills(target, global) {
4486
4486
  const result = { installed: 0, updated: 0, skipped: 0 };
4487
4487
  for (const skill of BUNDLED_SKILLS) {
4488
- const status = getSkillStatus(skill, global);
4488
+ const status = getSkillStatus(skill, target, global);
4489
4489
  if (status === "not_installed") {
4490
- installSkill(skill, global);
4490
+ installSkill(skill, target, global);
4491
4491
  result.installed++;
4492
4492
  } else if (status === "outdated") {
4493
- installSkill(skill, global);
4493
+ installSkill(skill, target, global);
4494
4494
  result.updated++;
4495
4495
  } else {
4496
4496
  result.skipped++;
@@ -4498,10 +4498,10 @@ function installAllSkills(global) {
4498
4498
  }
4499
4499
  return result;
4500
4500
  }
4501
- function uninstallAllSkills(global) {
4501
+ function uninstallAllSkills(target, global) {
4502
4502
  const result = { removed: 0, notFound: 0 };
4503
4503
  for (const skill of BUNDLED_SKILLS) {
4504
- if (uninstallSkill(skill, global)) {
4504
+ if (uninstallSkill(skill, target, global)) {
4505
4505
  result.removed++;
4506
4506
  } else {
4507
4507
  result.notFound++;
@@ -4509,41 +4509,103 @@ function uninstallAllSkills(global) {
4509
4509
  }
4510
4510
  return result;
4511
4511
  }
4512
- function getInstallDir(global) {
4513
- return global ? getGlobalSkillsDir() : getProjectSkillsDir();
4512
+ function getInstallDir(target, global) {
4513
+ return global ? getGlobalSkillsDir(target) : getProjectSkillsDir(target);
4514
4514
  }
4515
4515
  function getTotalSkillCount() {
4516
4516
  return BUNDLED_SKILLS.length;
4517
4517
  }
4518
4518
 
4519
+ // src/skills/target-config.ts
4520
+ var TARGET_CONFIGS = {
4521
+ claude: {
4522
+ id: "claude",
4523
+ displayName: "Claude Code",
4524
+ projectDir: ".claude",
4525
+ skillFileName: "SKILL.md"
4526
+ },
4527
+ codex: {
4528
+ id: "codex",
4529
+ displayName: "Codex CLI",
4530
+ projectDir: ".codex",
4531
+ skillFileName: "SKILL.md"
4532
+ }
4533
+ };
4534
+ var ALL_TARGET_IDS = ["claude", "codex"];
4535
+ function getTargetConfig(id) {
4536
+ return TARGET_CONFIGS[id];
4537
+ }
4538
+
4519
4539
  // src/skills/skills-command.ts
4520
4540
  function registerSkillsCommand(program3) {
4521
- const skillsCmd = program3.command("skills").description("Manage uloop skills for Claude Code");
4522
- skillsCmd.command("list").description("List all uloop skills and their installation status").option("-g, --global", "Check global installation (~/.claude/skills/)").action((options) => {
4523
- listSkills(options.global ?? false);
4541
+ const skillsCmd = program3.command("skills").description("Manage uloop skills for AI coding tools");
4542
+ skillsCmd.command("list").description("List all uloop skills and their installation status").option("-g, --global", "Check global installation").option("--claude", "Check Claude Code installation").option("--codex", "Check Codex CLI installation").action((options) => {
4543
+ const targets = resolveTargets(options);
4544
+ const global = options.global ?? false;
4545
+ listSkills(targets, global);
4524
4546
  });
4525
- skillsCmd.command("install").description("Install all uloop skills").option("-g, --global", "Install to global location (~/.claude/skills/)").action((options) => {
4526
- installSkills(options.global ?? false);
4547
+ skillsCmd.command("install").description("Install all uloop skills").option("-g, --global", "Install to global location").option("--claude", "Install to Claude Code").option("--codex", "Install to Codex CLI").action((options) => {
4548
+ const targets = resolveTargets(options);
4549
+ if (targets.length === 0) {
4550
+ showTargetGuidance("install");
4551
+ return;
4552
+ }
4553
+ installSkills(targets, options.global ?? false);
4527
4554
  });
4528
- skillsCmd.command("uninstall").description("Uninstall all uloop skills").option("-g, --global", "Uninstall from global location (~/.claude/skills/)").action((options) => {
4529
- uninstallSkills(options.global ?? false);
4555
+ skillsCmd.command("uninstall").description("Uninstall all uloop skills").option("-g, --global", "Uninstall from global location").option("--claude", "Uninstall from Claude Code").option("--codex", "Uninstall from Codex CLI").action((options) => {
4556
+ const targets = resolveTargets(options);
4557
+ if (targets.length === 0) {
4558
+ showTargetGuidance("uninstall");
4559
+ return;
4560
+ }
4561
+ uninstallSkills(targets, options.global ?? false);
4530
4562
  });
4531
4563
  }
4532
- function listSkills(global) {
4564
+ function resolveTargets(options) {
4565
+ const targets = [];
4566
+ if (options.claude) {
4567
+ targets.push(getTargetConfig("claude"));
4568
+ }
4569
+ if (options.codex) {
4570
+ targets.push(getTargetConfig("codex"));
4571
+ }
4572
+ return targets;
4573
+ }
4574
+ function showTargetGuidance(command) {
4575
+ console.log(`
4576
+ Please specify at least one target for '${command}':`);
4577
+ console.log("");
4578
+ console.log("Available targets:");
4579
+ console.log(" --claude Claude Code (.claude/skills/)");
4580
+ console.log(" --codex Codex CLI (.codex/skills/)");
4581
+ console.log("");
4582
+ console.log("Options:");
4583
+ console.log(" -g, --global Use global location (~/.claude/ or ~/.codex/)");
4584
+ console.log("");
4585
+ console.log("Examples:");
4586
+ console.log(` uloop skills ${command} --claude`);
4587
+ console.log(` uloop skills ${command} --codex --global`);
4588
+ console.log(` uloop skills ${command} --claude --codex`);
4589
+ }
4590
+ function listSkills(targets, global) {
4533
4591
  const location = global ? "Global" : "Project";
4534
- const dir = getInstallDir(global);
4592
+ const targetConfigs = targets.length > 0 ? targets : ALL_TARGET_IDS.map(getTargetConfig);
4535
4593
  console.log(`
4536
- uloop Skills Status (${location}):`);
4537
- console.log(`Location: ${dir}`);
4538
- console.log("=".repeat(50));
4594
+ uloop Skills Status:`);
4539
4595
  console.log("");
4540
- const statuses = getAllSkillStatuses(global);
4541
- for (const skill of statuses) {
4542
- const icon = getStatusIcon(skill.status);
4543
- const statusText = getStatusText(skill.status);
4544
- console.log(` ${icon} ${skill.name} (${statusText})`);
4596
+ for (const target of targetConfigs) {
4597
+ const dir = getInstallDir(target, global);
4598
+ console.log(`${target.displayName} (${location}):`);
4599
+ console.log(`Location: ${dir}`);
4600
+ console.log("=".repeat(50));
4601
+ const statuses = getAllSkillStatuses(target, global);
4602
+ for (const skill of statuses) {
4603
+ const icon = getStatusIcon(skill.status);
4604
+ const statusText = getStatusText(skill.status);
4605
+ console.log(` ${icon} ${skill.name} (${statusText})`);
4606
+ }
4607
+ console.log("");
4545
4608
  }
4546
- console.log("");
4547
4609
  console.log(`Total: ${getTotalSkillCount()} bundled skills`);
4548
4610
  }
4549
4611
  function getStatusIcon(status) {
@@ -4570,30 +4632,36 @@ function getStatusText(status) {
4570
4632
  return "unknown";
4571
4633
  }
4572
4634
  }
4573
- function installSkills(global) {
4635
+ function installSkills(targets, global) {
4574
4636
  const location = global ? "global" : "project";
4575
- const dir = getInstallDir(global);
4576
4637
  console.log(`
4577
4638
  Installing uloop skills (${location})...`);
4578
4639
  console.log("");
4579
- const result = installAllSkills(global);
4580
- console.log(`\x1B[32m\u2713\x1B[0m Installed: ${result.installed}`);
4581
- console.log(`\x1B[33m\u2191\x1B[0m Updated: ${result.updated}`);
4582
- console.log(`\x1B[90m-\x1B[0m Skipped (up-to-date): ${result.skipped}`);
4583
- console.log("");
4584
- console.log(`Skills installed to ${dir}`);
4640
+ for (const target of targets) {
4641
+ const dir = getInstallDir(target, global);
4642
+ const result = installAllSkills(target, global);
4643
+ console.log(`${target.displayName}:`);
4644
+ console.log(` \x1B[32m\u2713\x1B[0m Installed: ${result.installed}`);
4645
+ console.log(` \x1B[33m\u2191\x1B[0m Updated: ${result.updated}`);
4646
+ console.log(` \x1B[90m-\x1B[0m Skipped (up-to-date): ${result.skipped}`);
4647
+ console.log(` Location: ${dir}`);
4648
+ console.log("");
4649
+ }
4585
4650
  }
4586
- function uninstallSkills(global) {
4651
+ function uninstallSkills(targets, global) {
4587
4652
  const location = global ? "global" : "project";
4588
- const dir = getInstallDir(global);
4589
4653
  console.log(`
4590
4654
  Uninstalling uloop skills (${location})...`);
4591
4655
  console.log("");
4592
- const result = uninstallAllSkills(global);
4593
- console.log(`\x1B[31m\u2717\x1B[0m Removed: ${result.removed}`);
4594
- console.log(`\x1B[90m-\x1B[0m Not found: ${result.notFound}`);
4595
- console.log("");
4596
- console.log(`Skills removed from ${dir}`);
4656
+ for (const target of targets) {
4657
+ const dir = getInstallDir(target, global);
4658
+ const result = uninstallAllSkills(target, global);
4659
+ console.log(`${target.displayName}:`);
4660
+ console.log(` \x1B[31m\u2717\x1B[0m Removed: ${result.removed}`);
4661
+ console.log(` \x1B[90m-\x1B[0m Not found: ${result.notFound}`);
4662
+ console.log(` Location: ${dir}`);
4663
+ console.log("");
4664
+ }
4597
4665
  }
4598
4666
 
4599
4667
  // src/cli.ts