md4ai 0.2.1 → 0.3.1

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.
@@ -914,7 +914,7 @@ function escapeHtml(text) {
914
914
 
915
915
  // dist/check-update.js
916
916
  import chalk8 from "chalk";
917
- var CURRENT_VERSION = "0.2.1";
917
+ var CURRENT_VERSION = "0.3.1";
918
918
  async function checkForUpdate() {
919
919
  try {
920
920
  const controller = new AbortController();
@@ -1118,7 +1118,7 @@ async function printCommand(title) {
1118
1118
  const projectRoot = process.cwd();
1119
1119
  const scanDataPath = join8(projectRoot, "output", "index.html");
1120
1120
  if (!existsSync7(scanDataPath)) {
1121
- console.error(chalk11.red("No scan data found. Run: md4ai update"));
1121
+ console.error(chalk11.red("No scan data found. Run: md4ai scan"));
1122
1122
  process.exit(1);
1123
1123
  }
1124
1124
  const html = await readFile4(scanDataPath, "utf-8");
@@ -1201,7 +1201,7 @@ async function syncCommand(options) {
1201
1201
  console.log(chalk12.blue(`Syncing: ${device.path}`));
1202
1202
  const { data: proposedAll } = await supabase.from("folder_files").select("file_path").eq("folder_id", device.folder_id).eq("proposed_for_deletion", true);
1203
1203
  if (proposedAll?.length) {
1204
- console.log(chalk12.yellow(` ${proposedAll.length} file(s) proposed for deletion \u2014 run \`md4ai update\` to review.`));
1204
+ console.log(chalk12.yellow(` ${proposedAll.length} file(s) proposed for deletion \u2014 run \`md4ai scan\` to review.`));
1205
1205
  }
1206
1206
  try {
1207
1207
  const result = await scanProject(device.path);
@@ -1224,7 +1224,7 @@ async function syncCommand(options) {
1224
1224
  } else {
1225
1225
  const state = await loadState();
1226
1226
  if (!state.lastFolderId) {
1227
- console.error(chalk12.yellow("No recent sync. Use: md4ai sync --all, or md4ai update <path> first."));
1227
+ console.error(chalk12.yellow("No recent sync. Use: md4ai sync --all, or md4ai scan <path> first."));
1228
1228
  process.exit(1);
1229
1229
  }
1230
1230
  const { data: device } = await supabase.from("device_paths").select("folder_id, device_name, path").eq("folder_id", state.lastFolderId).eq("device_name", state.lastDeviceName).single();
@@ -1235,7 +1235,7 @@ async function syncCommand(options) {
1235
1235
  console.log(chalk12.blue(`Syncing: ${device.path}`));
1236
1236
  const { data: proposedSingle } = await supabase.from("folder_files").select("file_path").eq("folder_id", device.folder_id).eq("proposed_for_deletion", true);
1237
1237
  if (proposedSingle?.length) {
1238
- console.log(chalk12.yellow(` ${proposedSingle.length} file(s) proposed for deletion \u2014 run \`md4ai update\` to review.`));
1238
+ console.log(chalk12.yellow(` ${proposedSingle.length} file(s) proposed for deletion \u2014 run \`md4ai scan\` to review.`));
1239
1239
  }
1240
1240
  const result = await scanProject(device.path);
1241
1241
  await supabase.from("claude_folders").update({
@@ -1353,7 +1353,7 @@ Linking "${folder.name}" to this device...
1353
1353
  console.log(chalk13.cyan(`
1354
1354
  ${projectUrl}
1355
1355
  `));
1356
- console.log(chalk13.grey('Run "md4ai update" to rescan at any time.'));
1356
+ console.log(chalk13.grey('Run "md4ai scan" to rescan at any time.'));
1357
1357
  }
1358
1358
 
1359
1359
  // dist/commands/import-bundle.js
@@ -1424,7 +1424,12 @@ Done! ${files.length} file(s) extracted to ${targetDir}`));
1424
1424
 
1425
1425
  // dist/index.js
1426
1426
  var program = new Command();
1427
- program.name("md4ai").description("MD4AI \u2014 Claude tooling visualiser").version(CURRENT_VERSION);
1427
+ program.name("md4ai").description("MD4AI \u2014 Claude tooling visualiser").version(CURRENT_VERSION).addHelpText("after", `
1428
+ Update to the latest version:
1429
+ npm install -g md4ai
1430
+
1431
+ Check for updates:
1432
+ md4ai check-update`);
1428
1433
  program.command("login").description("Log in to MD4AI with email and password").action(loginCommand);
1429
1434
  program.command("logout").description("Log out and clear stored credentials").action(logoutCommand);
1430
1435
  program.command("status").description("Show login status, device count, folder count, last sync").action(statusCommand);
@@ -1432,9 +1437,10 @@ program.command("add-folder").description("Create a new Claude folder").action(a
1432
1437
  program.command("add-device").description("Add a device path to a Claude folder").action(addDeviceCommand);
1433
1438
  program.command("list-devices").description("List all devices and their linked folders").action(listDevicesCommand);
1434
1439
  program.command("link <project-id>").description("Link the current directory to a project created in the web dashboard").action(linkCommand);
1435
- program.command("update [path]").description("Rescan a Claude project folder and push updated data to your dashboard").option("--offline", "Skip pushing to Supabase").action(mapCommand);
1440
+ program.command("scan [path]").description("Scan Claude project files and push results to your dashboard").option("--offline", "Skip pushing to Supabase").action(mapCommand);
1436
1441
  program.command("simulate <prompt>").description("Show which files Claude would load for a given prompt").action(simulateCommand);
1437
1442
  program.command("print <title>").description("Generate a printable wall-chart HTML from the last scan").action(printCommand);
1438
1443
  program.command("sync").description("Re-push latest scan data to Supabase").option("--all", "Sync all folders on all devices").action(syncCommand);
1439
1444
  program.command("import <zipfile>").description("Import a Claude setup bundle exported from the web dashboard").action(importBundleCommand);
1445
+ program.command("check-update").description("Check if a newer version of md4ai is available").action(checkForUpdate);
1440
1446
  program.parse();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "md4ai",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "description": "CLI for MD4AI — scan Claude projects and sync to your dashboard",
5
5
  "type": "module",
6
6
  "bin": {