clawon 0.1.7 → 0.1.8

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 +12 -0
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -170,6 +170,7 @@ program.command("login").description("Connect to Clawon with your API key").requ
170
170
  });
171
171
  console.log("\u2713 Logged in");
172
172
  console.log(` Profile ID: ${connectJson.profileId}`);
173
+ trackCliEvent(connectJson.profileId, "cli_login");
173
174
  } catch (e) {
174
175
  console.error(`\u2717 Login failed: ${e.message}`);
175
176
  process.exit(1);
@@ -350,6 +351,7 @@ program.command("list").description("List your backups").option("--limit <n>", "
350
351
  }
351
352
  console.log(`
352
353
  Total: ${snapshots.length} backup(s)`);
354
+ trackCliEvent(cfg.profileId, "cli_list_viewed", { count: snapshots.length });
353
355
  } catch (e) {
354
356
  console.error(`\u2717 Failed to list backups: ${e.message}`);
355
357
  process.exit(1);
@@ -407,6 +409,7 @@ program.command("activity").description("Show recent activity").option("--limit
407
409
  const details = formatEventDetails(ev.payload);
408
410
  console.log(`${date.padEnd(20)} | ${label.padEnd(18)} | ${details}`);
409
411
  }
412
+ trackCliEvent(cfg.profileId, "cli_activity_viewed");
410
413
  } catch (e) {
411
414
  console.error(`\u2717 Failed to load activity: ${e.message}`);
412
415
  process.exit(1);
@@ -446,6 +449,7 @@ program.command("delete [id]").description("Delete a snapshot").option("--oldest
446
449
  snapshotId
447
450
  });
448
451
  console.log(`\u2713 Deleted snapshot ${snapshotId}`);
452
+ trackCliEvent(cfg.profileId, "cloud_backup_deleted");
449
453
  } catch (e) {
450
454
  console.error(`\u2717 Delete failed: ${e.message}`);
451
455
  process.exit(1);
@@ -480,6 +484,8 @@ program.command("discover").description("Preview which files would be included i
480
484
  console.log(`
481
485
  Total: ${files.length} files (${(totalSize / 1024).toFixed(1)} KB)`);
482
486
  console.log(`Source: ${OPENCLAW_DIR}`);
487
+ const cfg = readConfig();
488
+ trackCliEvent(cfg?.profileId || "anonymous", "cli_discover", { file_count: files.length });
483
489
  });
484
490
  program.command("files").description("List files in a backup").option("--snapshot <id>", "Snapshot ID (default: latest)").action(async (opts) => {
485
491
  const cfg = readConfig();
@@ -516,6 +522,7 @@ program.command("files").description("List files in a backup").option("--snapsho
516
522
  }
517
523
  console.log(`
518
524
  Total: ${files.length} files`);
525
+ trackCliEvent(cfg.profileId, "cli_files_viewed", { file_count: files.length });
519
526
  } catch (e) {
520
527
  console.error(`\u2717 Failed to list files: ${e.message}`);
521
528
  process.exit(1);
@@ -584,6 +591,8 @@ local.command("list").description("List local backups").action(async () => {
584
591
  }
585
592
  console.log(`
586
593
  Total: ${entries.length} backup(s)`);
594
+ const cfg = readConfig();
595
+ trackCliEvent(cfg?.profileId || "anonymous", "local_list_viewed", { count: entries.length });
587
596
  console.log(`
588
597
  Restore a backup:`);
589
598
  console.log(` clawon local restore Restore the latest backup (#1)`);
@@ -662,11 +671,14 @@ program.command("status").description("Show current status").action(async () =>
662
671
  } else {
663
672
  console.log(`\u2717 OpenClaw not found: ${OPENCLAW_DIR}`);
664
673
  }
674
+ trackCliEvent(cfg?.profileId || "anonymous", "cli_status_viewed");
665
675
  });
666
676
  program.command("logout").description("Remove local credentials").action(() => {
677
+ const cfg = readConfig();
667
678
  if (fs.existsSync(CONFIG_PATH)) {
668
679
  fs.unlinkSync(CONFIG_PATH);
669
680
  console.log("\u2713 Logged out");
681
+ trackCliEvent(cfg?.profileId || "anonymous", "cli_logout");
670
682
  } else {
671
683
  console.log("Already logged out");
672
684
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "clawon",
3
- "version": "0.1.7",
3
+ "version": "0.1.8",
4
4
  "description": "Backup and restore your OpenClaw workspace",
5
5
  "type": "module",
6
6
  "bin": {