aiblueprint-cli 1.4.43 → 1.4.45

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/cli.js +130 -33
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -32265,7 +32265,7 @@ var lib_default = inquirer;
32265
32265
  // src/commands/setup.ts
32266
32266
  var import_fs_extra7 = __toESM(require_lib4(), 1);
32267
32267
  import path9 from "path";
32268
- import os9 from "os";
32268
+ import os10 from "os";
32269
32269
 
32270
32270
  // node_modules/chalk/source/vendor/ansi-styles/index.js
32271
32271
  var ANSI_BACKGROUND_OFFSET = 10;
@@ -33294,6 +33294,26 @@ async function updateSettings(options, claudeDir) {
33294
33294
  };
33295
33295
  }
33296
33296
  }
33297
+ if (!settings.permissions) {
33298
+ settings.permissions = {};
33299
+ }
33300
+ settings.permissions.defaultMode = "bypassPermissions";
33301
+ if (!settings.permissions.deny) {
33302
+ settings.permissions.deny = [];
33303
+ }
33304
+ const denyRules = [
33305
+ "Bash(rm -rf *)",
33306
+ "Bash(sudo *)",
33307
+ "Bash(curl * | bash)",
33308
+ "Bash(wget * | bash)",
33309
+ "Read(./.env)",
33310
+ "Read(./.env.*)"
33311
+ ];
33312
+ for (const rule of denyRules) {
33313
+ if (!settings.permissions.deny.includes(rule)) {
33314
+ settings.permissions.deny.push(rule);
33315
+ }
33316
+ }
33297
33317
  if (!settings.hooks) {
33298
33318
  settings.hooks = {};
33299
33319
  }
@@ -33488,6 +33508,53 @@ async function createBackup(claudeDir) {
33488
33508
  return backupPath;
33489
33509
  }
33490
33510
 
33511
+ // src/lib/telemetry.ts
33512
+ import os9 from "os";
33513
+ var TELEMETRY_URL = "https://codelynx.dev/api/cli/events";
33514
+ var isDisabled = () => {
33515
+ return process.env.AIBLUEPRINT_TELEMETRY_DISABLED === "1";
33516
+ };
33517
+ var getBasePayload = () => ({
33518
+ cliVersion: getVersion(),
33519
+ platform: os9.platform(),
33520
+ arch: os9.arch(),
33521
+ nodeVersion: process.version
33522
+ });
33523
+ var pendingRequest = null;
33524
+ function trackEvent(event, data) {
33525
+ if (isDisabled())
33526
+ return;
33527
+ const payload = {
33528
+ ...getBasePayload(),
33529
+ event,
33530
+ data
33531
+ };
33532
+ pendingRequest = fetch(TELEMETRY_URL, {
33533
+ method: "POST",
33534
+ headers: { "Content-Type": "application/json" },
33535
+ body: JSON.stringify(payload),
33536
+ signal: AbortSignal.timeout(5000)
33537
+ }).catch(() => {}).then(() => {
33538
+ pendingRequest = null;
33539
+ });
33540
+ }
33541
+ function trackError(error, context) {
33542
+ if (isDisabled())
33543
+ return;
33544
+ const message = error instanceof Error ? error.message : String(error);
33545
+ const stack = error instanceof Error ? error.stack?.slice(0, 500) : undefined;
33546
+ trackEvent("error", {
33547
+ message,
33548
+ stack,
33549
+ ...context
33550
+ });
33551
+ }
33552
+ async function flushTelemetry() {
33553
+ if (pendingRequest) {
33554
+ await pendingRequest;
33555
+ }
33556
+ }
33557
+
33491
33558
  // src/commands/setup.ts
33492
33559
  var __filename2 = fileURLToPath2(import.meta.url);
33493
33560
  var __dirname2 = dirname2(__filename2);
@@ -33512,6 +33579,7 @@ async function setupCommand(params = {}) {
33512
33579
  "customStatusline",
33513
33580
  "aiblueprintCommands",
33514
33581
  "aiblueprintAgents",
33582
+ "aiblueprintSkills",
33515
33583
  "notificationSounds",
33516
33584
  "codexSymlink",
33517
33585
  "openCodeSymlink"
@@ -33554,6 +33622,11 @@ async function setupCommand(params = {}) {
33554
33622
  name: "Notification sounds - Audio alerts for events",
33555
33623
  checked: true
33556
33624
  },
33625
+ {
33626
+ value: "aiblueprintSkills",
33627
+ name: "AIBlueprint skills - Pre-built skills (apex, commit, oneshot, etc.)",
33628
+ checked: true
33629
+ },
33557
33630
  {
33558
33631
  value: "codexSymlink",
33559
33632
  name: "Codex symlink - Link commands to ~/.codex/prompts",
@@ -33579,14 +33652,14 @@ async function setupCommand(params = {}) {
33579
33652
  customStatusline: features.includes("customStatusline"),
33580
33653
  aiblueprintCommands: features.includes("aiblueprintCommands"),
33581
33654
  aiblueprintAgents: features.includes("aiblueprintAgents"),
33582
- aiblueprintSkills: false,
33655
+ aiblueprintSkills: features.includes("aiblueprintSkills"),
33583
33656
  notificationSounds: features.includes("notificationSounds"),
33584
33657
  codexSymlink: features.includes("codexSymlink"),
33585
33658
  openCodeSymlink: features.includes("openCodeSymlink"),
33586
33659
  skipInteractive
33587
33660
  };
33588
33661
  const s = new SimpleSpinner;
33589
- const claudeDir = customClaudeCodeFolder ? path9.resolve(customClaudeCodeFolder) : path9.join(os9.homedir(), ".claude");
33662
+ const claudeDir = customClaudeCodeFolder ? path9.resolve(customClaudeCodeFolder) : path9.join(os10.homedir(), ".claude");
33590
33663
  console.log(source_default.gray(`Installing to: ${claudeDir}`));
33591
33664
  await import_fs_extra7.default.ensureDir(claudeDir);
33592
33665
  s.start("Creating backup of existing configuration");
@@ -33696,10 +33769,11 @@ async function setupCommand(params = {}) {
33696
33769
  await cleanupRepository(repoPath);
33697
33770
  s.stop("Cleanup complete");
33698
33771
  console.log(source_default.green("✨ Setup complete!"));
33772
+ trackEvent("setup", { features: options });
33699
33773
  console.log(source_default.gray(`
33700
33774
  Next steps:`));
33701
33775
  if (options.shellShortcuts) {
33702
- const platform = os9.platform();
33776
+ const platform = os10.platform();
33703
33777
  if (platform === "win32") {
33704
33778
  console.log(source_default.gray(" • Restart PowerShell to load the new functions"));
33705
33779
  } else {
@@ -33712,6 +33786,8 @@ Next steps:`));
33712
33786
  console.log(source_default.blue(`
33713
33787
  \uD83D\uDC8E Want premium features? Get AIBlueprint CLI Pro at https://mlv.sh/claude-cli`));
33714
33788
  } catch (error) {
33789
+ trackError(error, { command: "setup" });
33790
+ await flushTelemetry();
33715
33791
  console.error(source_default.red(`
33716
33792
  ❌ Setup failed:`), error);
33717
33793
  console.log(source_default.red("Setup failed!"));
@@ -33725,7 +33801,7 @@ Next steps:`));
33725
33801
  // src/commands/setup-terminal.ts
33726
33802
  var import_fs_extra8 = __toESM(require_lib4(), 1);
33727
33803
  import path10 from "path";
33728
- import os10 from "os";
33804
+ import os11 from "os";
33729
33805
  import { execSync as execSync3, exec as exec2 } from "child_process";
33730
33806
  var OHMYZSH_INSTALL_URL = "https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh";
33731
33807
  var INSTALL_TIMEOUT = 120000;
@@ -33892,7 +33968,7 @@ plugins=(${pluginsString})`;
33892
33968
  }
33893
33969
  async function setupTerminalCommand(options = {}) {
33894
33970
  const { skipInteractive, homeDir: customHomeDir } = options;
33895
- const homeDir = customHomeDir || os10.homedir();
33971
+ const homeDir = customHomeDir || os11.homedir();
33896
33972
  try {
33897
33973
  console.log(source_default.blue.bold(`
33898
33974
  \uD83D\uDDA5️ AIBlueprint Terminal Setup ${source_default.gray(`v${getVersion()}`)}
@@ -34921,12 +34997,12 @@ var Y2 = ({ indicator: t = "dots" } = {}) => {
34921
34997
  };
34922
34998
 
34923
34999
  // src/commands/pro.ts
34924
- import os13 from "os";
35000
+ import os14 from "os";
34925
35001
  import path13 from "path";
34926
35002
 
34927
35003
  // src/lib/pro-installer.ts
34928
35004
  var import_fs_extra9 = __toESM(require_lib4(), 1);
34929
- import os11 from "os";
35005
+ import os12 from "os";
34930
35006
  import path11 from "path";
34931
35007
  import { exec as exec3 } from "child_process";
34932
35008
  import { promisify as promisify2 } from "util";
@@ -34934,7 +35010,7 @@ var execAsync2 = promisify2(exec3);
34934
35010
  var PREMIUM_REPO = "Melvynx/aiblueprint-cli-premium";
34935
35011
  var PREMIUM_BRANCH = "main";
34936
35012
  function getCacheRepoDir() {
34937
- return path11.join(os11.homedir(), ".config", "aiblueprint", "pro-repos", "aiblueprint-cli-premium");
35013
+ return path11.join(os12.homedir(), ".config", "aiblueprint", "pro-repos", "aiblueprint-cli-premium");
34938
35014
  }
34939
35015
  async function execGitWithAuth(command, token, repoUrl, cwd) {
34940
35016
  const authenticatedUrl = `https://x-access-token:${token}@${repoUrl.replace(/^https?:\/\//, "")}`;
@@ -35051,7 +35127,7 @@ async function downloadDirectoryFromPrivateGitHub(repo, branch, dirPath, targetD
35051
35127
  }
35052
35128
  async function installProConfigs(options) {
35053
35129
  const { githubToken, claudeCodeFolder, onProgress } = options;
35054
- const claudeFolder = claudeCodeFolder || path11.join(os11.homedir(), ".claude");
35130
+ const claudeFolder = claudeCodeFolder || path11.join(os12.homedir(), ".claude");
35055
35131
  try {
35056
35132
  const cacheConfigDir = await cloneOrUpdateRepo(githubToken);
35057
35133
  await copyConfigFromCache(cacheConfigDir, claudeFolder, onProgress);
@@ -35059,7 +35135,7 @@ async function installProConfigs(options) {
35059
35135
  } catch (error) {
35060
35136
  console.warn("Git caching failed, falling back to API download");
35061
35137
  }
35062
- const tempDir = path11.join(os11.tmpdir(), `aiblueprint-premium-${Date.now()}`);
35138
+ const tempDir = path11.join(os12.tmpdir(), `aiblueprint-premium-${Date.now()}`);
35063
35139
  try {
35064
35140
  const success = await downloadDirectoryFromPrivateGitHub(PREMIUM_REPO, PREMIUM_BRANCH, "claude-code-config", tempDir, githubToken, onProgress);
35065
35141
  if (!success) {
@@ -35084,15 +35160,15 @@ async function installProConfigs(options) {
35084
35160
 
35085
35161
  // src/lib/token-storage.ts
35086
35162
  var import_fs_extra10 = __toESM(require_lib4(), 1);
35087
- import os12 from "os";
35163
+ import os13 from "os";
35088
35164
  import path12 from "path";
35089
35165
  function getConfigDir() {
35090
- const platform = os12.platform();
35166
+ const platform = os13.platform();
35091
35167
  if (platform === "win32") {
35092
- const appData = process.env.APPDATA || path12.join(os12.homedir(), "AppData", "Roaming");
35168
+ const appData = process.env.APPDATA || path12.join(os13.homedir(), "AppData", "Roaming");
35093
35169
  return path12.join(appData, "aiblueprint");
35094
35170
  } else {
35095
- const configHome = process.env.XDG_CONFIG_HOME || path12.join(os12.homedir(), ".config");
35171
+ const configHome = process.env.XDG_CONFIG_HOME || path12.join(os13.homedir(), ".config");
35096
35172
  return path12.join(configHome, "aiblueprint");
35097
35173
  }
35098
35174
  }
@@ -35128,7 +35204,7 @@ async function getToken() {
35128
35204
  function getTokenInfo() {
35129
35205
  return {
35130
35206
  path: getTokenFilePath(),
35131
- platform: os12.platform()
35207
+ platform: os13.platform()
35132
35208
  };
35133
35209
  }
35134
35210
 
@@ -35235,8 +35311,11 @@ async function proActivateCommand(userToken) {
35235
35311
  M2.info(`Token saved to: ${tokenInfo.path}`);
35236
35312
  M2.info(source_default.cyan(`
35237
35313
  \uD83D\uDCA1 Next step: Run 'npx aiblueprint-cli@latest claude-code pro setup' to install premium configs`));
35314
+ trackEvent("pro-activate");
35238
35315
  Se(source_default.green("✅ Activation complete!"));
35239
35316
  } catch (error) {
35317
+ trackError(error, { command: "pro-activate" });
35318
+ await flushTelemetry();
35240
35319
  if (error instanceof Error) {
35241
35320
  M2.error(error.message);
35242
35321
  }
@@ -35278,7 +35357,7 @@ async function proSetupCommand(options = {}) {
35278
35357
  Se(source_default.red("❌ Not activated"));
35279
35358
  process.exit(1);
35280
35359
  }
35281
- const claudeDir = options.folder ? path13.resolve(options.folder) : path13.join(os13.homedir(), ".claude");
35360
+ const claudeDir = options.folder ? path13.resolve(options.folder) : path13.join(os14.homedir(), ".claude");
35282
35361
  const spinner = Y2();
35283
35362
  const onProgress = (file, type) => {
35284
35363
  spinner.message(`Installing: ${source_default.cyan(file)} ${source_default.gray(`(${type})`)}`);
@@ -35315,6 +35394,11 @@ async function proSetupCommand(options = {}) {
35315
35394
  spinner.start("Counting installed items...");
35316
35395
  const counts = await countInstalledItems(claudeDir);
35317
35396
  spinner.stop("Installation summary ready");
35397
+ trackEvent("pro-setup", {
35398
+ commands: counts.commands,
35399
+ agents: counts.agents,
35400
+ skills: counts.skills
35401
+ });
35318
35402
  M2.success("✅ Setup complete!");
35319
35403
  M2.info("Installed:");
35320
35404
  M2.info(` • Commands (${counts.commands})`);
@@ -35325,6 +35409,8 @@ async function proSetupCommand(options = {}) {
35325
35409
  M2.info(" • Settings.json with hooks and statusline");
35326
35410
  Se(source_default.green("\uD83D\uDE80 Ready to use!"));
35327
35411
  } catch (error) {
35412
+ trackError(error, { command: "pro-setup" });
35413
+ await flushTelemetry();
35328
35414
  if (error instanceof Error) {
35329
35415
  M2.error(error.message);
35330
35416
  }
@@ -35349,8 +35435,11 @@ async function proUpdateCommand(options = {}) {
35349
35435
  claudeCodeFolder: options.folder
35350
35436
  });
35351
35437
  spinner.stop("Premium configurations updated");
35438
+ trackEvent("pro-update");
35352
35439
  Se(source_default.green("✅ Update completed"));
35353
35440
  } catch (error) {
35441
+ trackError(error, { command: "pro-update" });
35442
+ await flushTelemetry();
35354
35443
  if (error instanceof Error) {
35355
35444
  M2.error(error.message);
35356
35445
  }
@@ -35360,7 +35449,7 @@ async function proUpdateCommand(options = {}) {
35360
35449
  }
35361
35450
 
35362
35451
  // src/commands/sync.ts
35363
- import os14 from "os";
35452
+ import os15 from "os";
35364
35453
  import path15 from "path";
35365
35454
 
35366
35455
  // src/lib/sync-utils.ts
@@ -35847,7 +35936,7 @@ async function proSyncCommand(options = {}) {
35847
35936
  Se(source_default.red("❌ Not activated"));
35848
35937
  process.exit(1);
35849
35938
  }
35850
- const claudeDir = options.folder ? path15.resolve(options.folder) : path15.join(os14.homedir(), ".claude");
35939
+ const claudeDir = options.folder ? path15.resolve(options.folder) : path15.join(os15.homedir(), ".claude");
35851
35940
  const spinner = Y2();
35852
35941
  spinner.start("Analyzing changes...");
35853
35942
  const result = await analyzeSyncChanges(claudeDir, githubToken);
@@ -36081,8 +36170,16 @@ async function proSyncCommand(options = {}) {
36081
36170
  await installScriptsDependencies(claudeDir);
36082
36171
  spinner.stop("Scripts dependencies installed");
36083
36172
  }
36173
+ trackEvent("pro-sync", {
36174
+ added: syncResult.success,
36175
+ deleted: syncResult.deleted,
36176
+ failed: syncResult.failed,
36177
+ hookssynced: selectedHooks.length
36178
+ });
36084
36179
  Se(source_default.green("✅ Sync completed"));
36085
36180
  } catch (error) {
36181
+ trackError(error, { command: "pro-sync" });
36182
+ await flushTelemetry();
36086
36183
  if (error instanceof Error) {
36087
36184
  M2.error(error.message);
36088
36185
  }
@@ -36092,7 +36189,7 @@ async function proSyncCommand(options = {}) {
36092
36189
  }
36093
36190
 
36094
36191
  // src/commands/backup.ts
36095
- import os15 from "os";
36192
+ import os16 from "os";
36096
36193
  import path16 from "path";
36097
36194
  function formatBackupDate(date) {
36098
36195
  const now = new Date;
@@ -36113,7 +36210,7 @@ function formatBackupDate(date) {
36113
36210
  return `${date.toLocaleString()} (${relative})`;
36114
36211
  }
36115
36212
  async function backupLoadCommand(options = {}) {
36116
- const claudeDir = options.folder || path16.join(os15.homedir(), ".claude");
36213
+ const claudeDir = options.folder || path16.join(os16.homedir(), ".claude");
36117
36214
  Ie(source_default.blue("\uD83D\uDCE6 Load Backup"));
36118
36215
  const spinner = Y2();
36119
36216
  spinner.start("Scanning for backups...");
@@ -36169,19 +36266,19 @@ async function backupLoadCommand(options = {}) {
36169
36266
  }
36170
36267
 
36171
36268
  // src/commands/openclaw-pro.ts
36172
- import os18 from "os";
36269
+ import os19 from "os";
36173
36270
  import path19 from "path";
36174
36271
 
36175
36272
  // src/lib/openclaw-installer.ts
36176
36273
  var import_fs_extra13 = __toESM(require_lib4(), 1);
36177
- import os16 from "os";
36274
+ import os17 from "os";
36178
36275
  import path17 from "path";
36179
36276
  import { exec as exec4 } from "child_process";
36180
36277
  import { promisify as promisify3 } from "util";
36181
36278
  var execAsync3 = promisify3(exec4);
36182
36279
  var OPENCLAW_PRO_REPO = "Melvynx/openclawpro";
36183
36280
  function getCacheRepoDir2() {
36184
- return path17.join(os16.homedir(), ".config", "openclaw", "pro-repos", "openclawpro");
36281
+ return path17.join(os17.homedir(), ".config", "openclaw", "pro-repos", "openclawpro");
36185
36282
  }
36186
36283
  async function execGitWithAuth2(command, token, repoUrl, cwd) {
36187
36284
  const authenticatedUrl = `https://x-access-token:${token}@${repoUrl.replace(/^https?:\/\//, "")}`;
@@ -36230,7 +36327,7 @@ async function copyConfigFromCache2(cacheConfigDir, targetDir, onProgress) {
36230
36327
  }
36231
36328
  async function installOpenclawProConfigs(options) {
36232
36329
  const { githubToken, openclawFolder, onProgress } = options;
36233
- const targetFolder = openclawFolder || path17.join(os16.homedir(), ".openclaw");
36330
+ const targetFolder = openclawFolder || path17.join(os17.homedir(), ".openclaw");
36234
36331
  try {
36235
36332
  const cacheConfigDir = await cloneOrUpdateRepo2(githubToken);
36236
36333
  await copyConfigFromCache2(cacheConfigDir, targetFolder, onProgress);
@@ -36242,14 +36339,14 @@ async function installOpenclawProConfigs(options) {
36242
36339
 
36243
36340
  // src/lib/openclaw-token-storage.ts
36244
36341
  var import_fs_extra14 = __toESM(require_lib4(), 1);
36245
- import os17 from "os";
36342
+ import os18 from "os";
36246
36343
  import path18 from "path";
36247
36344
  function getConfigDir2() {
36248
- const platform = os17.platform();
36345
+ const platform = os18.platform();
36249
36346
  if (platform === "win32") {
36250
- return path18.join(process.env.APPDATA || os17.homedir(), "openclaw");
36347
+ return path18.join(process.env.APPDATA || os18.homedir(), "openclaw");
36251
36348
  }
36252
- return path18.join(os17.homedir(), ".config", "openclaw");
36349
+ return path18.join(os18.homedir(), ".config", "openclaw");
36253
36350
  }
36254
36351
  function getTokenPath() {
36255
36352
  return path18.join(getConfigDir2(), "token.txt");
@@ -36270,7 +36367,7 @@ async function getOpenclawToken() {
36270
36367
  function getOpenclawTokenInfo() {
36271
36368
  return {
36272
36369
  path: getTokenPath(),
36273
- platform: os17.platform()
36370
+ platform: os18.platform()
36274
36371
  };
36275
36372
  }
36276
36373
 
@@ -36382,7 +36479,7 @@ async function openclawProSetupCommand(options = {}) {
36382
36479
  Se(source_default.red("❌ Not activated"));
36383
36480
  process.exit(1);
36384
36481
  }
36385
- const openclawDir = options.folder ? path19.resolve(options.folder) : path19.join(os18.homedir(), ".openclaw");
36482
+ const openclawDir = options.folder ? path19.resolve(options.folder) : path19.join(os19.homedir(), ".openclaw");
36386
36483
  const spinner = Y2();
36387
36484
  const onProgress = (file, type) => {
36388
36485
  spinner.message(`Installing: ${source_default.cyan(file)} ${source_default.gray(`(${type})`)}`);
@@ -36556,10 +36653,10 @@ var import_fs_extra17 = __toESM(require_lib4(), 1);
36556
36653
  import { spawn as spawn2 } from "child_process";
36557
36654
  import { execSync as execSync4 } from "child_process";
36558
36655
  import path21 from "path";
36559
- import os19 from "os";
36656
+ import os20 from "os";
36560
36657
  function checkCommand2(cmd) {
36561
36658
  try {
36562
- const isWindows2 = os19.platform() === "win32";
36659
+ const isWindows2 = os20.platform() === "win32";
36563
36660
  const whichCmd = isWindows2 ? `where ${cmd}` : `which ${cmd}`;
36564
36661
  execSync4(whichCmd, { stdio: "ignore" });
36565
36662
  return true;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiblueprint-cli",
3
- "version": "1.4.43",
3
+ "version": "1.4.45",
4
4
  "description": "AIBlueprint CLI for setting up Claude Code configurations",
5
5
  "author": "AIBlueprint",
6
6
  "license": "MIT",