md4ai 0.17.0 → 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.0" : "0.0.0-dev";
125
+ CURRENT_VERSION = true ? "0.17.2" : "0.0.0-dev";
126
126
  }
127
127
  });
128
128
 
@@ -134,11 +134,12 @@ var init_types = __esm({
134
134
  });
135
135
 
136
136
  // ../packages/shared/dist/constants.js
137
- var SUPABASE_URL, ROOT_FILES, GLOBAL_ROOT_FILES, STALE_THRESHOLD_DAYS, CONFIG_DIR, CREDENTIALS_FILE, STATE_FILE;
137
+ var SUPABASE_URL, SUPABASE_ANON_KEY, ROOT_FILES, GLOBAL_ROOT_FILES, STALE_THRESHOLD_DAYS, CONFIG_DIR, CREDENTIALS_FILE, STATE_FILE;
138
138
  var init_constants = __esm({
139
139
  "../packages/shared/dist/constants.js"() {
140
140
  "use strict";
141
141
  SUPABASE_URL = "https://gkrfwmwlfnixeffhwwju.supabase.co";
142
+ SUPABASE_ANON_KEY = "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZSIsInJlZiI6ImdrcmZ3bXdsZm5peGVmZmh3d2p1Iiwicm9sZSI6ImFub24iLCJpYXQiOjE3NzI2Mjk0ODQsImV4cCI6MjA4ODIwNTQ4NH0.R_tpV0MUG6VgKY2Fhu0jj1LSQOni87UAhX-x6B2a2GM";
142
143
  ROOT_FILES = [
143
144
  "CLAUDE.md",
144
145
  ".claude/settings.json",
@@ -247,11 +248,7 @@ async function loadState() {
247
248
  }
248
249
  }
249
250
  function getAnonKey() {
250
- const key = process.env.MD4AI_SUPABASE_ANON_KEY;
251
- if (!key) {
252
- throw new Error("MD4AI_SUPABASE_ANON_KEY environment variable not set.\nSet it in your shell profile or .env file.");
253
- }
254
- return key;
251
+ return process.env.MD4AI_SUPABASE_ANON_KEY ?? SUPABASE_ANON_KEY;
255
252
  }
256
253
  var configPath, credentialsPath, statePath;
257
254
  var init_config = __esm({
@@ -2806,8 +2803,14 @@ async function syncCommand(options) {
2806
2803
  const currentDeviceName = detectDeviceName();
2807
2804
  const { data: devices, error } = await supabase.from("device_paths").select("folder_id, device_name, path").eq("device_name", currentDeviceName);
2808
2805
  if (error || !devices?.length) {
2809
- console.error(chalk15.red("No devices found."));
2810
- 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;
2811
2814
  }
2812
2815
  for (const device of devices) {
2813
2816
  if (!isValidProjectPath(device.path)) {
@@ -4711,14 +4714,26 @@ ${lines.join("\n")}`;
4711
4714
  }
4712
4715
  const { select: selectPrompt } = await import("@inquirer/prompts");
4713
4716
  const cwd = process.cwd();
4714
- 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
+ }
4715
4734
  const scanChoice = await selectPrompt({
4716
- message: "What would you like to scan?",
4717
- choices: [
4718
- { name: `Current folder (${cwd})`, value: "cwd" },
4719
- { name: allLabel, value: "all" },
4720
- { name: "Skip scanning", value: "skip" }
4721
- ]
4735
+ message: "What would you like to do?",
4736
+ choices
4722
4737
  });
4723
4738
  if (scanChoice === "cwd") {
4724
4739
  console.log("");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md4ai",
3
- "version": "0.17.0",
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": {