md4ai 0.17.1 → 0.17.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.
@@ -122,7 +122,7 @@ var CURRENT_VERSION;
122
122
  var init_check_update = __esm({
123
123
  "dist/check-update.js"() {
124
124
  "use strict";
125
- CURRENT_VERSION = true ? "0.17.1" : "0.0.0-dev";
125
+ CURRENT_VERSION = true ? "0.17.2" : "0.0.0-dev";
126
126
  }
127
127
  });
128
128
 
@@ -2803,8 +2803,14 @@ async function syncCommand(options) {
2803
2803
  const currentDeviceName = detectDeviceName();
2804
2804
  const { data: devices, error } = await supabase.from("device_paths").select("folder_id, device_name, path").eq("device_name", currentDeviceName);
2805
2805
  if (error || !devices?.length) {
2806
- console.error(chalk15.red("No devices found."));
2807
- process.exit(1);
2806
+ console.log(chalk15.yellow(`
2807
+ No projects linked on ${currentDeviceName} yet.
2808
+ `));
2809
+ console.log(chalk15.dim(" To link a project, cd into its folder and run:"));
2810
+ console.log(chalk15.cyan(" md4ai scan"));
2811
+ console.log(chalk15.dim(" Or link an existing project from the dashboard:"));
2812
+ console.log(chalk15.cyan(" md4ai link <project-id>\n"));
2813
+ return;
2808
2814
  }
2809
2815
  for (const device of devices) {
2810
2816
  if (!isValidProjectPath(device.path)) {
@@ -4708,14 +4714,26 @@ ${lines.join("\n")}`;
4708
4714
  }
4709
4715
  const { select: selectPrompt } = await import("@inquirer/prompts");
4710
4716
  const cwd = process.cwd();
4711
- const allLabel = linkedPaths?.length ? `All ${linkedPaths.length} linked project${linkedPaths.length === 1 ? "" : "s"} on this device${linkedDisplay}` : "All linked projects on this device";
4717
+ const hasLinked = linkedPaths && linkedPaths.length > 0;
4718
+ const choices = [
4719
+ { name: `Scan current folder (${cwd})`, value: "cwd" }
4720
+ ];
4721
+ if (hasLinked) {
4722
+ const allLabel = `All ${linkedPaths.length} linked project${linkedPaths.length === 1 ? "" : "s"} on this device${linkedDisplay}`;
4723
+ choices.push({ name: allLabel, value: "all" });
4724
+ }
4725
+ choices.push({ name: "Skip", value: "skip" });
4726
+ if (!hasLinked) {
4727
+ console.log(chalk23.dim(` Device: ${currentDeviceName}`));
4728
+ console.log(chalk23.dim(" No projects linked on this device yet.\n"));
4729
+ console.log(chalk23.dim(" To link a project, cd into its folder and run:"));
4730
+ console.log(chalk23.cyan(" md4ai scan"));
4731
+ console.log(chalk23.dim(" Or link an existing project from the dashboard:"));
4732
+ console.log(chalk23.cyan(" md4ai link <project-id>\n"));
4733
+ }
4712
4734
  const scanChoice = await selectPrompt({
4713
- message: "What would you like to scan?",
4714
- choices: [
4715
- { name: `Current folder (${cwd})`, value: "cwd" },
4716
- { name: allLabel, value: "all" },
4717
- { name: "Skip scanning", value: "skip" }
4718
- ]
4735
+ message: "What would you like to do?",
4736
+ choices
4719
4737
  });
4720
4738
  if (scanChoice === "cwd") {
4721
4739
  console.log("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md4ai",
3
- "version": "0.17.1",
3
+ "version": "0.17.2",
4
4
  "description": "CLI for MD4AI — scan Claude projects and sync to your dashboard",
5
5
  "type": "module",
6
6
  "bin": {