aiblueprint-cli 1.4.2 → 1.4.3

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 +61 -9
  2. package/package.json +1 -1
package/dist/cli.js CHANGED
@@ -33895,6 +33895,36 @@ function backupFile(filePath) {
33895
33895
  throw new Error(`Failed to create backup: ${error.message}`);
33896
33896
  }
33897
33897
  }
33898
+ function getPackageManager() {
33899
+ if (commandExists("apt")) {
33900
+ return { cmd: "apt", installCmd: "sudo apt install -y" };
33901
+ }
33902
+ if (commandExists("apt-get")) {
33903
+ return { cmd: "apt-get", installCmd: "sudo apt-get install -y" };
33904
+ }
33905
+ if (commandExists("brew")) {
33906
+ return { cmd: "brew", installCmd: "brew install" };
33907
+ }
33908
+ if (commandExists("dnf")) {
33909
+ return { cmd: "dnf", installCmd: "sudo dnf install -y" };
33910
+ }
33911
+ if (commandExists("yum")) {
33912
+ return { cmd: "yum", installCmd: "sudo yum install -y" };
33913
+ }
33914
+ if (commandExists("pacman")) {
33915
+ return { cmd: "pacman", installCmd: "sudo pacman -S --noconfirm" };
33916
+ }
33917
+ return null;
33918
+ }
33919
+ function installPrerequisiteSync(packageName, installCmd) {
33920
+ try {
33921
+ const fullCmd = `${installCmd} ${packageName}`;
33922
+ execSync3(fullCmd, { stdio: "inherit", timeout: INSTALL_TIMEOUT });
33923
+ return true;
33924
+ } catch {
33925
+ return false;
33926
+ }
33927
+ }
33898
33928
  async function installOhMyZsh(homeDir) {
33899
33929
  return new Promise((resolve, reject) => {
33900
33930
  const installCmd = `sh -c "$(curl -fsSL ${OHMYZSH_INSTALL_URL})" "" --unattended`;
@@ -34013,19 +34043,41 @@ async function setupTerminalCommand(options = {}) {
34013
34043
  missingPrereqs.push("zsh");
34014
34044
  }
34015
34045
  if (missingPrereqs.length > 0) {
34016
- s.stop(source_default.red("Missing prerequisites"));
34017
- console.log(source_default.red(`
34046
+ s.stop(`Missing: ${missingPrereqs.join(", ")}`);
34047
+ const packageManager = getPackageManager();
34048
+ if (!packageManager) {
34049
+ console.log(source_default.red(`
34018
34050
  ❌ Missing required tools: ${missingPrereqs.join(", ")}`));
34051
+ console.log(source_default.yellow(`
34052
+ Could not detect package manager. Please install manually:`));
34053
+ if (platformInfo.isMacOS) {
34054
+ console.log(source_default.gray(" brew install " + missingPrereqs.join(" ")));
34055
+ } else {
34056
+ console.log(source_default.gray(" sudo apt install " + missingPrereqs.join(" ")));
34057
+ }
34058
+ process.exit(1);
34059
+ }
34019
34060
  console.log(source_default.yellow(`
34020
- Please install them first:`));
34021
- if (platformInfo.isMacOS) {
34022
- console.log(source_default.gray(" brew install " + missingPrereqs.join(" ")));
34023
- } else {
34024
- console.log(source_default.gray(" sudo apt install " + missingPrereqs.join(" ")));
34061
+ Installing missing prerequisites: ${missingPrereqs.join(", ")}`));
34062
+ console.log(source_default.gray(`Using package manager: ${packageManager.cmd}`));
34063
+ for (const pkg of missingPrereqs) {
34064
+ console.log(source_default.yellow(`
34065
+ \uD83D\uDCE6 Installing ${pkg}...`));
34066
+ const success = installPrerequisiteSync(pkg, packageManager.installCmd);
34067
+ if (success) {
34068
+ console.log(source_default.green(`✓ ${pkg} installed`));
34069
+ } else {
34070
+ console.log(source_default.red(`
34071
+ ❌ Failed to install ${pkg}`));
34072
+ console.log(source_default.yellow("Please install it manually:"));
34073
+ console.log(source_default.gray(` ${packageManager.installCmd} ${pkg}`));
34074
+ process.exit(1);
34075
+ }
34025
34076
  }
34026
- process.exit(1);
34077
+ console.log(source_default.green("✓ All prerequisites installed"));
34078
+ } else {
34079
+ s.stop("Prerequisites OK");
34027
34080
  }
34028
- s.stop("Prerequisites OK");
34029
34081
  let selectedTheme = "robbyrussell";
34030
34082
  if (!skipInteractive) {
34031
34083
  const themeAnswer = await lib_default.prompt([
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiblueprint-cli",
3
- "version": "1.4.2",
3
+ "version": "1.4.3",
4
4
  "description": "AIBlueprint CLI for setting up Claude Code configurations",
5
5
  "author": "AIBlueprint",
6
6
  "license": "MIT",