ccsini 0.1.37 → 0.1.38

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 +34 -23
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -28018,7 +28018,7 @@ var {
28018
28018
  } = import__.default;
28019
28019
 
28020
28020
  // src/version.ts
28021
- var VERSION = "0.1.37";
28021
+ var VERSION = "0.1.38";
28022
28022
 
28023
28023
  // src/commands/init.ts
28024
28024
  init_source();
@@ -30432,35 +30432,46 @@ async function showInteractiveMenu(program2) {
30432
30432
  console.log(TAGLINE);
30433
30433
  const configDir = getConfigDir();
30434
30434
  const initialized = await configExists(configDir);
30435
- const fmt = (cmd, desc) => `${source_default.bold(cmd.padEnd(16))} ${source_default.dim(desc)}`;
30436
- const choices = initialized ? [
30437
- { name: fmt("Sync Push", "Push local changes to cloud"), value: ["sync", "push"] },
30438
- { name: fmt("Sync Pull", "Pull changes from cloud"), value: ["sync", "pull"] },
30439
- { name: fmt("Sync Status", "Show sync status"), value: ["sync", "status"] },
30440
- { name: fmt("Sessions", "Configure session sync"), value: ["sessions", "status"] },
30441
- { name: fmt("Doctor", "Check system health"), value: ["doctor"] },
30442
- { name: fmt("Hooks Fix", "Repair broken hooks"), value: ["hooks", "fix"] },
30443
- { name: fmt("Help", "Show all commands"), value: ["--help"] },
30444
- { name: source_default.dim("Exit"), value: [] }
30435
+ const items = initialized ? [
30436
+ { label: "Sync Push", desc: "Push local changes to cloud", args: ["sync", "push"] },
30437
+ { label: "Sync Pull", desc: "Pull changes from cloud", args: ["sync", "pull"] },
30438
+ { label: "Sync Status", desc: "Show sync status", args: ["sync", "status"] },
30439
+ { label: "Sessions", desc: "Configure session sync", args: ["sessions", "status"] },
30440
+ { label: "Doctor", desc: "Check system health", args: ["doctor"] },
30441
+ { label: "Hooks Fix", desc: "Repair broken hooks", args: ["hooks", "fix"] },
30442
+ { label: "Help", desc: "Show all commands", args: ["--help"] },
30443
+ { label: "Exit", desc: "", args: [] }
30445
30444
  ] : [
30446
- { name: fmt("Setup", "Connect this device"), value: ["init"] },
30447
- { name: fmt("Doctor", "Check system health"), value: ["doctor"] },
30448
- { name: fmt("Help", "Show all commands"), value: ["--help"] },
30449
- { name: source_default.dim("Exit"), value: [] }
30445
+ { label: "Setup", desc: "Connect this device", args: ["init"] },
30446
+ { label: "Doctor", desc: "Check system health", args: ["doctor"] },
30447
+ { label: "Help", desc: "Show all commands", args: ["--help"] },
30448
+ { label: "Exit", desc: "", args: [] }
30450
30449
  ];
30450
+ for (let i = 0;i < items.length; i++) {
30451
+ const num = source_default.hex("#FFA500")(` ${i + 1})`);
30452
+ const label = source_default.bold(items[i].label);
30453
+ const desc = items[i].desc ? source_default.dim(` \u2014 ${items[i].desc}`) : "";
30454
+ console.log(`${num} ${label}${desc}`);
30455
+ }
30456
+ console.log();
30451
30457
  try {
30452
- const { action } = await dist_default12.prompt([
30458
+ const { choice } = await dist_default12.prompt([
30453
30459
  {
30454
- type: "list",
30455
- name: "action",
30456
- message: "What would you like to do?",
30457
- choices
30460
+ type: "number",
30461
+ name: "choice",
30462
+ message: "Pick an option:",
30463
+ validate: (v) => {
30464
+ if (v >= 1 && v <= items.length)
30465
+ return true;
30466
+ return `Enter a number between 1 and ${items.length}`;
30467
+ }
30458
30468
  }
30459
30469
  ]);
30460
- if (action.length === 0) {
30470
+ const selected = items[choice - 1];
30471
+ if (selected.args.length === 0)
30461
30472
  return;
30462
- }
30463
- await program2.parseAsync(["node", "ccsini", ...action]);
30473
+ console.log();
30474
+ await program2.parseAsync(["node", "ccsini", ...selected.args]);
30464
30475
  } catch {}
30465
30476
  }
30466
30477
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ccsini",
3
- "version": "0.1.37",
3
+ "version": "0.1.38",
4
4
  "description": "Claude Code seamless sync across devices",
5
5
  "type": "module",
6
6
  "bin": {