aiblueprint-cli 1.4.54 → 1.4.56
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.
- package/agents-config/codex-config/config.toml +6 -0
- package/dist/cli.js +262 -357
- package/package.json +1 -1
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
# Codex CLI defaults installed by aiblueprint-cli.
|
|
2
|
+
# This file is only written when ~/.codex/config.toml is absent — your own
|
|
3
|
+
# config (project trust list, model preferences, etc.) is never overwritten.
|
|
4
|
+
|
|
5
|
+
approval_policy = "never"
|
|
6
|
+
sandbox_mode = "danger-full-access"
|
package/dist/cli.js
CHANGED
|
@@ -32263,9 +32263,9 @@ var inquirer = {
|
|
|
32263
32263
|
var lib_default = inquirer;
|
|
32264
32264
|
|
|
32265
32265
|
// src/commands/setup.ts
|
|
32266
|
-
var
|
|
32267
|
-
import
|
|
32268
|
-
import
|
|
32266
|
+
var import_fs_extra7 = __toESM(require_lib4(), 1);
|
|
32267
|
+
import path11 from "path";
|
|
32268
|
+
import os11 from "os";
|
|
32269
32269
|
|
|
32270
32270
|
// node_modules/chalk/source/vendor/ansi-styles/index.js
|
|
32271
32271
|
var ANSI_BACKGROUND_OFFSET = 10;
|
|
@@ -32820,122 +32820,11 @@ function ccc { claude --dangerously-skip-permissions -c $args }
|
|
|
32820
32820
|
}
|
|
32821
32821
|
}
|
|
32822
32822
|
|
|
32823
|
-
// src/commands/setup/symlinks.ts
|
|
32824
|
-
var import_fs_extra2 = __toESM(require_lib4(), 1);
|
|
32825
|
-
import path3 from "path";
|
|
32826
|
-
import os4 from "os";
|
|
32827
|
-
async function getToolPaths(tool, customFolder) {
|
|
32828
|
-
let baseDir;
|
|
32829
|
-
switch (tool) {
|
|
32830
|
-
case "claude-code":
|
|
32831
|
-
baseDir = customFolder ? path3.resolve(customFolder) : path3.join(os4.homedir(), ".claude");
|
|
32832
|
-
return {
|
|
32833
|
-
baseDir,
|
|
32834
|
-
commandsPath: path3.join(baseDir, "commands"),
|
|
32835
|
-
agentsPath: path3.join(baseDir, "agents")
|
|
32836
|
-
};
|
|
32837
|
-
case "codex":
|
|
32838
|
-
baseDir = customFolder ? path3.resolve(customFolder) : path3.join(os4.homedir(), ".codex");
|
|
32839
|
-
return {
|
|
32840
|
-
baseDir,
|
|
32841
|
-
commandsPath: path3.join(baseDir, "prompts")
|
|
32842
|
-
};
|
|
32843
|
-
case "opencode":
|
|
32844
|
-
baseDir = customFolder ? path3.resolve(customFolder) : path3.join(os4.homedir(), ".config", "opencode");
|
|
32845
|
-
return {
|
|
32846
|
-
baseDir,
|
|
32847
|
-
commandsPath: path3.join(baseDir, "command")
|
|
32848
|
-
};
|
|
32849
|
-
case "factoryai":
|
|
32850
|
-
baseDir = customFolder ? path3.resolve(customFolder) : path3.join(os4.homedir(), ".factory");
|
|
32851
|
-
return {
|
|
32852
|
-
baseDir,
|
|
32853
|
-
commandsPath: path3.join(baseDir, "commands"),
|
|
32854
|
-
agentsPath: path3.join(baseDir, "droids")
|
|
32855
|
-
};
|
|
32856
|
-
default:
|
|
32857
|
-
throw new Error(`Unknown tool type: ${tool}`);
|
|
32858
|
-
}
|
|
32859
|
-
}
|
|
32860
|
-
async function createSymlink(sourcePath, targetPath, options = {}) {
|
|
32861
|
-
try {
|
|
32862
|
-
const sourceExists = await import_fs_extra2.default.pathExists(sourcePath);
|
|
32863
|
-
if (!sourceExists) {
|
|
32864
|
-
console.log(source_default.yellow(` Source path ${sourcePath} does not exist. Skipping symlink creation...`));
|
|
32865
|
-
return false;
|
|
32866
|
-
}
|
|
32867
|
-
const targetDir = path3.dirname(targetPath);
|
|
32868
|
-
await import_fs_extra2.default.ensureDir(targetDir);
|
|
32869
|
-
const targetExists = await import_fs_extra2.default.pathExists(targetPath);
|
|
32870
|
-
if (targetExists) {
|
|
32871
|
-
const stat = await import_fs_extra2.default.lstat(targetPath);
|
|
32872
|
-
if (stat.isSymbolicLink()) {
|
|
32873
|
-
await import_fs_extra2.default.remove(targetPath);
|
|
32874
|
-
} else {
|
|
32875
|
-
console.log(source_default.yellow(options.skipMessage || ` ${targetPath} already exists and is not a symlink. Skipping...`));
|
|
32876
|
-
return false;
|
|
32877
|
-
}
|
|
32878
|
-
}
|
|
32879
|
-
const isWindows = os4.platform() === "win32";
|
|
32880
|
-
if (isWindows) {
|
|
32881
|
-
await import_fs_extra2.default.symlink(sourcePath, targetPath, "junction");
|
|
32882
|
-
} else {
|
|
32883
|
-
await import_fs_extra2.default.symlink(sourcePath, targetPath);
|
|
32884
|
-
}
|
|
32885
|
-
return true;
|
|
32886
|
-
} catch (error) {
|
|
32887
|
-
console.error(source_default.red(options.errorPrefix || "Error creating symlink:"), error);
|
|
32888
|
-
throw error;
|
|
32889
|
-
}
|
|
32890
|
-
}
|
|
32891
|
-
async function setupCodexSymlink(claudeDir, customCodexFolder, customClaudeCodeFolder) {
|
|
32892
|
-
try {
|
|
32893
|
-
let codexDir;
|
|
32894
|
-
if (customCodexFolder) {
|
|
32895
|
-
codexDir = path3.resolve(customCodexFolder);
|
|
32896
|
-
} else if (customClaudeCodeFolder) {
|
|
32897
|
-
const parentDir = path3.dirname(claudeDir);
|
|
32898
|
-
codexDir = path3.join(parentDir, "codex");
|
|
32899
|
-
} else {
|
|
32900
|
-
codexDir = path3.join(os4.homedir(), ".codex");
|
|
32901
|
-
}
|
|
32902
|
-
const promptsPath = path3.join(codexDir, "prompts");
|
|
32903
|
-
const commandsPath = path3.join(claudeDir, "commands");
|
|
32904
|
-
await createSymlink(commandsPath, promptsPath, {
|
|
32905
|
-
skipMessage: " ~/.codex/prompts already exists and is not a symlink. Skipping...",
|
|
32906
|
-
errorPrefix: "Error setting up Codex symlink:"
|
|
32907
|
-
});
|
|
32908
|
-
} catch (error) {
|
|
32909
|
-
console.error(source_default.red("Error setting up Codex symlink:"), error);
|
|
32910
|
-
}
|
|
32911
|
-
}
|
|
32912
|
-
async function setupOpenCodeSymlink(claudeDir, customOpenCodeFolder, customClaudeCodeFolder) {
|
|
32913
|
-
try {
|
|
32914
|
-
let openCodeDir;
|
|
32915
|
-
if (customOpenCodeFolder) {
|
|
32916
|
-
openCodeDir = path3.resolve(customOpenCodeFolder);
|
|
32917
|
-
} else if (customClaudeCodeFolder) {
|
|
32918
|
-
const parentDir = path3.dirname(claudeDir);
|
|
32919
|
-
openCodeDir = path3.join(parentDir, ".opencode");
|
|
32920
|
-
} else {
|
|
32921
|
-
openCodeDir = path3.join(os4.homedir(), ".config", "opencode");
|
|
32922
|
-
}
|
|
32923
|
-
const commandPath = path3.join(openCodeDir, "command");
|
|
32924
|
-
const commandsPath = path3.join(claudeDir, "commands");
|
|
32925
|
-
await createSymlink(commandsPath, commandPath, {
|
|
32926
|
-
skipMessage: " ~/.config/opencode/command already exists and is not a symlink. Skipping...",
|
|
32927
|
-
errorPrefix: "Error setting up OpenCode symlink:"
|
|
32928
|
-
});
|
|
32929
|
-
} catch (error) {
|
|
32930
|
-
console.error(source_default.red("Error setting up OpenCode symlink:"), error);
|
|
32931
|
-
}
|
|
32932
|
-
}
|
|
32933
|
-
|
|
32934
32823
|
// src/commands/setup/dependencies.ts
|
|
32935
32824
|
import { execSync } from "child_process";
|
|
32936
|
-
import
|
|
32937
|
-
import
|
|
32938
|
-
var isWindows =
|
|
32825
|
+
import path3 from "path";
|
|
32826
|
+
import os4 from "os";
|
|
32827
|
+
var isWindows = os4.platform() === "win32";
|
|
32939
32828
|
function checkCommand(cmd) {
|
|
32940
32829
|
try {
|
|
32941
32830
|
const whichCmd = isWindows ? `where ${cmd}` : `which ${cmd}`;
|
|
@@ -33011,7 +32900,7 @@ async function checkAndInstallDependencies() {
|
|
|
33011
32900
|
}
|
|
33012
32901
|
}
|
|
33013
32902
|
async function installScriptsDependencies(claudeDir) {
|
|
33014
|
-
const scriptsDir =
|
|
32903
|
+
const scriptsDir = path3.join(claudeDir, "scripts");
|
|
33015
32904
|
console.log(source_default.yellow(`
|
|
33016
32905
|
Installing scripts dependencies...`));
|
|
33017
32906
|
try {
|
|
@@ -33039,15 +32928,15 @@ async function installStatuslineDependencies(claudeDir) {
|
|
|
33039
32928
|
}
|
|
33040
32929
|
|
|
33041
32930
|
// src/commands/setup/settings.ts
|
|
33042
|
-
var
|
|
33043
|
-
import
|
|
32931
|
+
var import_fs_extra2 = __toESM(require_lib4(), 1);
|
|
32932
|
+
import path4 from "path";
|
|
33044
32933
|
function toPosixPath(p) {
|
|
33045
32934
|
return p.replace(/\\/g, "/");
|
|
33046
32935
|
}
|
|
33047
32936
|
async function hasExistingStatusLine(claudeDir) {
|
|
33048
|
-
const settingsPath =
|
|
32937
|
+
const settingsPath = path4.join(claudeDir, "settings.json");
|
|
33049
32938
|
try {
|
|
33050
|
-
const existingSettings = await
|
|
32939
|
+
const existingSettings = await import_fs_extra2.default.readFile(settingsPath, "utf-8");
|
|
33051
32940
|
const settings = JSON.parse(existingSettings);
|
|
33052
32941
|
return !!settings.statusLine;
|
|
33053
32942
|
} catch {
|
|
@@ -33055,10 +32944,10 @@ async function hasExistingStatusLine(claudeDir) {
|
|
|
33055
32944
|
}
|
|
33056
32945
|
}
|
|
33057
32946
|
async function updateSettings(options, claudeDir) {
|
|
33058
|
-
const settingsPath =
|
|
32947
|
+
const settingsPath = path4.join(claudeDir, "settings.json");
|
|
33059
32948
|
let settings = {};
|
|
33060
32949
|
try {
|
|
33061
|
-
const existingSettings = await
|
|
32950
|
+
const existingSettings = await import_fs_extra2.default.readFile(settingsPath, "utf-8");
|
|
33062
32951
|
settings = JSON.parse(existingSettings);
|
|
33063
32952
|
} catch {}
|
|
33064
32953
|
if (options.customStatusline) {
|
|
@@ -33066,7 +32955,7 @@ async function updateSettings(options, claudeDir) {
|
|
|
33066
32955
|
if (shouldReplace) {
|
|
33067
32956
|
settings.statusLine = {
|
|
33068
32957
|
type: "command",
|
|
33069
|
-
command: `bun ${toPosixPath(
|
|
32958
|
+
command: `bun ${toPosixPath(path4.join(claudeDir, "scripts/statusline/src/index.ts"))}`,
|
|
33070
32959
|
padding: 0
|
|
33071
32960
|
};
|
|
33072
32961
|
}
|
|
@@ -33091,13 +32980,13 @@ async function updateSettings(options, claudeDir) {
|
|
|
33091
32980
|
settings.permissions.deny.push(rule);
|
|
33092
32981
|
}
|
|
33093
32982
|
}
|
|
33094
|
-
await
|
|
32983
|
+
await import_fs_extra2.default.writeJson(settingsPath, settings, { spaces: 2 });
|
|
33095
32984
|
}
|
|
33096
32985
|
|
|
33097
32986
|
// src/commands/setup/utils.ts
|
|
33098
|
-
var
|
|
33099
|
-
import
|
|
33100
|
-
import
|
|
32987
|
+
var import_fs_extra3 = __toESM(require_lib4(), 1);
|
|
32988
|
+
import path5 from "path";
|
|
32989
|
+
import os5 from "os";
|
|
33101
32990
|
import { exec } from "child_process";
|
|
33102
32991
|
import { promisify } from "util";
|
|
33103
32992
|
var execAsync = promisify(exec);
|
|
@@ -33114,20 +33003,20 @@ class SimpleSpinner {
|
|
|
33114
33003
|
}
|
|
33115
33004
|
var GITHUB_REPO = "https://github.com/Melvynx/aiblueprint.git";
|
|
33116
33005
|
async function cloneRepository() {
|
|
33117
|
-
const tmpDir =
|
|
33006
|
+
const tmpDir = path5.join(os5.tmpdir(), `aiblueprint-${Date.now()}`);
|
|
33118
33007
|
try {
|
|
33119
|
-
await
|
|
33008
|
+
await import_fs_extra3.default.ensureDir(tmpDir);
|
|
33120
33009
|
await execAsync(`git clone --depth 1 --quiet ${GITHUB_REPO} "${tmpDir}"`);
|
|
33121
33010
|
return tmpDir;
|
|
33122
33011
|
} catch (error) {
|
|
33123
33012
|
console.error(source_default.yellow(` Warning: Failed to clone repository: ${error instanceof Error ? error.message : String(error)}`));
|
|
33124
|
-
await
|
|
33013
|
+
await import_fs_extra3.default.remove(tmpDir).catch(() => {});
|
|
33125
33014
|
return null;
|
|
33126
33015
|
}
|
|
33127
33016
|
}
|
|
33128
33017
|
async function cleanupRepository(repoPath) {
|
|
33129
33018
|
try {
|
|
33130
|
-
await
|
|
33019
|
+
await import_fs_extra3.default.remove(repoPath);
|
|
33131
33020
|
} catch (error) {
|
|
33132
33021
|
console.error(source_default.yellow(` Warning: Failed to cleanup temporary directory: ${error instanceof Error ? error.message : String(error)}`));
|
|
33133
33022
|
}
|
|
@@ -33135,8 +33024,8 @@ async function cleanupRepository(repoPath) {
|
|
|
33135
33024
|
async function resolveConfigDir(repoPath) {
|
|
33136
33025
|
const candidates = CONFIG_FOLDER_CANDIDATES;
|
|
33137
33026
|
for (const name of candidates) {
|
|
33138
|
-
const candidate =
|
|
33139
|
-
if (await
|
|
33027
|
+
const candidate = path5.join(repoPath, name);
|
|
33028
|
+
if (await import_fs_extra3.default.pathExists(candidate)) {
|
|
33140
33029
|
return candidate;
|
|
33141
33030
|
}
|
|
33142
33031
|
}
|
|
@@ -33163,20 +33052,20 @@ function getVersion() {
|
|
|
33163
33052
|
}
|
|
33164
33053
|
|
|
33165
33054
|
// src/lib/backup-utils.ts
|
|
33166
|
-
var
|
|
33167
|
-
import
|
|
33168
|
-
import
|
|
33169
|
-
var BACKUP_BASE_DIR =
|
|
33055
|
+
var import_fs_extra4 = __toESM(require_lib4(), 1);
|
|
33056
|
+
import path6 from "path";
|
|
33057
|
+
import os6 from "os";
|
|
33058
|
+
var BACKUP_BASE_DIR = path6.join(os6.homedir(), ".config", "aiblueprint", "backup");
|
|
33170
33059
|
function formatDate(date) {
|
|
33171
33060
|
const pad = (n) => n.toString().padStart(2, "0");
|
|
33172
33061
|
return `${date.getFullYear()}-${pad(date.getMonth() + 1)}-${pad(date.getDate())}-${pad(date.getHours())}-${pad(date.getMinutes())}-${pad(date.getSeconds())}`;
|
|
33173
33062
|
}
|
|
33174
33063
|
async function listBackups() {
|
|
33175
|
-
const exists = await
|
|
33064
|
+
const exists = await import_fs_extra4.default.pathExists(BACKUP_BASE_DIR);
|
|
33176
33065
|
if (!exists) {
|
|
33177
33066
|
return [];
|
|
33178
33067
|
}
|
|
33179
|
-
const entries = await
|
|
33068
|
+
const entries = await import_fs_extra4.default.readdir(BACKUP_BASE_DIR, { withFileTypes: true });
|
|
33180
33069
|
const backups = [];
|
|
33181
33070
|
for (const entry of entries) {
|
|
33182
33071
|
if (!entry.isDirectory())
|
|
@@ -33188,7 +33077,7 @@ async function listBackups() {
|
|
|
33188
33077
|
const date = new Date(parseInt(year), parseInt(month) - 1, parseInt(day), parseInt(hour), parseInt(minute), parseInt(second));
|
|
33189
33078
|
backups.push({
|
|
33190
33079
|
name: entry.name,
|
|
33191
|
-
path:
|
|
33080
|
+
path: path6.join(BACKUP_BASE_DIR, entry.name),
|
|
33192
33081
|
date
|
|
33193
33082
|
});
|
|
33194
33083
|
}
|
|
@@ -33197,12 +33086,12 @@ async function listBackups() {
|
|
|
33197
33086
|
var AGENTS_BACKUP_SUBDIR = ".agents";
|
|
33198
33087
|
var CLAUDE_ITEMS = ["commands", "agents", "skills", "scripts", "settings.json"];
|
|
33199
33088
|
async function copyForBackup(sourcePath, destPath) {
|
|
33200
|
-
await
|
|
33089
|
+
await import_fs_extra4.default.copy(sourcePath, destPath, {
|
|
33201
33090
|
overwrite: true,
|
|
33202
33091
|
dereference: false,
|
|
33203
33092
|
filter: async (src) => {
|
|
33204
33093
|
try {
|
|
33205
|
-
const stat = await
|
|
33094
|
+
const stat = await import_fs_extra4.default.lstat(src);
|
|
33206
33095
|
return !stat.isSymbolicLink();
|
|
33207
33096
|
} catch {
|
|
33208
33097
|
return true;
|
|
@@ -33211,28 +33100,28 @@ async function copyForBackup(sourcePath, destPath) {
|
|
|
33211
33100
|
});
|
|
33212
33101
|
}
|
|
33213
33102
|
async function hasMeaningfulContent(dir) {
|
|
33214
|
-
if (!await
|
|
33103
|
+
if (!await import_fs_extra4.default.pathExists(dir))
|
|
33215
33104
|
return false;
|
|
33216
|
-
const files = await
|
|
33105
|
+
const files = await import_fs_extra4.default.readdir(dir);
|
|
33217
33106
|
return files.some((f) => f !== ".DS_Store");
|
|
33218
33107
|
}
|
|
33219
33108
|
async function loadBackup(backupPath, claudeDir, agentsDir) {
|
|
33220
|
-
const exists = await
|
|
33109
|
+
const exists = await import_fs_extra4.default.pathExists(backupPath);
|
|
33221
33110
|
if (!exists) {
|
|
33222
33111
|
throw new Error(`Backup not found: ${backupPath}`);
|
|
33223
33112
|
}
|
|
33224
|
-
await
|
|
33113
|
+
await import_fs_extra4.default.ensureDir(claudeDir);
|
|
33225
33114
|
for (const item of CLAUDE_ITEMS) {
|
|
33226
|
-
const sourcePath =
|
|
33227
|
-
const destPath =
|
|
33228
|
-
if (await
|
|
33115
|
+
const sourcePath = path6.join(backupPath, item);
|
|
33116
|
+
const destPath = path6.join(claudeDir, item);
|
|
33117
|
+
if (await import_fs_extra4.default.pathExists(sourcePath)) {
|
|
33229
33118
|
await copyForBackup(sourcePath, destPath);
|
|
33230
33119
|
}
|
|
33231
33120
|
}
|
|
33232
33121
|
if (agentsDir) {
|
|
33233
|
-
const agentsBackupPath =
|
|
33234
|
-
if (await
|
|
33235
|
-
await
|
|
33122
|
+
const agentsBackupPath = path6.join(backupPath, AGENTS_BACKUP_SUBDIR);
|
|
33123
|
+
if (await import_fs_extra4.default.pathExists(agentsBackupPath)) {
|
|
33124
|
+
await import_fs_extra4.default.ensureDir(agentsDir);
|
|
33236
33125
|
await copyForBackup(agentsBackupPath, agentsDir);
|
|
33237
33126
|
}
|
|
33238
33127
|
}
|
|
@@ -33244,28 +33133,28 @@ async function createBackup(claudeDir, agentsDir) {
|
|
|
33244
33133
|
return null;
|
|
33245
33134
|
}
|
|
33246
33135
|
const timestamp = formatDate(new Date);
|
|
33247
|
-
const backupPath =
|
|
33248
|
-
await
|
|
33136
|
+
const backupPath = path6.join(BACKUP_BASE_DIR, timestamp);
|
|
33137
|
+
await import_fs_extra4.default.ensureDir(backupPath);
|
|
33249
33138
|
if (claudeHasContent) {
|
|
33250
33139
|
for (const item of CLAUDE_ITEMS) {
|
|
33251
|
-
const sourcePath =
|
|
33252
|
-
const destPath =
|
|
33253
|
-
if (await
|
|
33140
|
+
const sourcePath = path6.join(claudeDir, item);
|
|
33141
|
+
const destPath = path6.join(backupPath, item);
|
|
33142
|
+
if (await import_fs_extra4.default.pathExists(sourcePath)) {
|
|
33254
33143
|
await copyForBackup(sourcePath, destPath);
|
|
33255
33144
|
}
|
|
33256
33145
|
}
|
|
33257
33146
|
}
|
|
33258
33147
|
if (agentsHasContent && agentsDir) {
|
|
33259
|
-
const destPath =
|
|
33148
|
+
const destPath = path6.join(backupPath, AGENTS_BACKUP_SUBDIR);
|
|
33260
33149
|
await copyForBackup(agentsDir, destPath);
|
|
33261
33150
|
}
|
|
33262
33151
|
return backupPath;
|
|
33263
33152
|
}
|
|
33264
33153
|
|
|
33265
33154
|
// src/lib/platform.ts
|
|
33266
|
-
var
|
|
33267
|
-
import
|
|
33268
|
-
import
|
|
33155
|
+
var import_fs_extra5 = __toESM(require_lib4(), 1);
|
|
33156
|
+
import os7 from "os";
|
|
33157
|
+
import path7 from "path";
|
|
33269
33158
|
import { execSync as execSync2 } from "child_process";
|
|
33270
33159
|
function escapeShellArg(arg) {
|
|
33271
33160
|
return "'" + arg.replace(/'/g, "'\\''") + "'";
|
|
@@ -33273,15 +33162,15 @@ function escapeShellArg(arg) {
|
|
|
33273
33162
|
var cachedPlatformInfo = null;
|
|
33274
33163
|
var cachedAudioPlayer = undefined;
|
|
33275
33164
|
function isWSL() {
|
|
33276
|
-
if (
|
|
33165
|
+
if (os7.platform() !== "linux")
|
|
33277
33166
|
return false;
|
|
33278
|
-
const release =
|
|
33167
|
+
const release = os7.release().toLowerCase();
|
|
33279
33168
|
return release.includes("microsoft") || release.includes("wsl");
|
|
33280
33169
|
}
|
|
33281
33170
|
function getPlatformInfo() {
|
|
33282
33171
|
if (cachedPlatformInfo)
|
|
33283
33172
|
return cachedPlatformInfo;
|
|
33284
|
-
const platform =
|
|
33173
|
+
const platform = os7.platform();
|
|
33285
33174
|
const wsl = isWSL();
|
|
33286
33175
|
cachedPlatformInfo = {
|
|
33287
33176
|
platform,
|
|
@@ -33289,14 +33178,14 @@ function getPlatformInfo() {
|
|
|
33289
33178
|
isMacOS: platform === "darwin",
|
|
33290
33179
|
isLinux: platform === "linux" && !wsl,
|
|
33291
33180
|
isWSL: wsl,
|
|
33292
|
-
homeDir:
|
|
33181
|
+
homeDir: os7.homedir()
|
|
33293
33182
|
};
|
|
33294
33183
|
return cachedPlatformInfo;
|
|
33295
33184
|
}
|
|
33296
33185
|
function detectAudioPlayer() {
|
|
33297
33186
|
if (cachedAudioPlayer !== undefined)
|
|
33298
33187
|
return cachedAudioPlayer;
|
|
33299
|
-
const platform =
|
|
33188
|
+
const platform = os7.platform();
|
|
33300
33189
|
if (platform === "darwin") {
|
|
33301
33190
|
cachedAudioPlayer = "afplay";
|
|
33302
33191
|
return cachedAudioPlayer;
|
|
@@ -33335,7 +33224,7 @@ function getPlaySoundCommand(soundPath) {
|
|
|
33335
33224
|
const player = detectAudioPlayer();
|
|
33336
33225
|
if (!player)
|
|
33337
33226
|
return null;
|
|
33338
|
-
const platform =
|
|
33227
|
+
const platform = os7.platform();
|
|
33339
33228
|
const safePath = escapeShellArg(soundPath);
|
|
33340
33229
|
if (platform === "darwin") {
|
|
33341
33230
|
return `afplay -v 0.1 ${safePath}`;
|
|
@@ -33418,20 +33307,34 @@ function replaceClaudePathPlaceholder(content, claudeDir) {
|
|
|
33418
33307
|
return content.replaceAll("{CLAUDE_PATH}", claudeDir);
|
|
33419
33308
|
}
|
|
33420
33309
|
async function replacePathPlaceholdersInDir(dir, claudeDir) {
|
|
33421
|
-
const entries = await
|
|
33310
|
+
const entries = await import_fs_extra5.default.readdir(dir, { withFileTypes: true });
|
|
33422
33311
|
for (const entry of entries) {
|
|
33423
|
-
const fullPath =
|
|
33312
|
+
const fullPath = path7.join(dir, entry.name);
|
|
33424
33313
|
if (entry.isDirectory()) {
|
|
33425
33314
|
await replacePathPlaceholdersInDir(fullPath, claudeDir);
|
|
33426
33315
|
} else if (isTextFile(entry.name)) {
|
|
33427
|
-
const content = await
|
|
33316
|
+
const content = await import_fs_extra5.default.readFile(fullPath, "utf-8");
|
|
33428
33317
|
const replaced = replaceClaudePathPlaceholder(content, claudeDir);
|
|
33429
33318
|
if (replaced !== content) {
|
|
33430
|
-
await
|
|
33319
|
+
await import_fs_extra5.default.writeFile(fullPath, replaced, "utf-8");
|
|
33431
33320
|
}
|
|
33432
33321
|
}
|
|
33433
33322
|
}
|
|
33434
33323
|
}
|
|
33324
|
+
async function applyPathPlaceholders(target, claudeDir) {
|
|
33325
|
+
const stat = await import_fs_extra5.default.stat(target).catch(() => null);
|
|
33326
|
+
if (!stat)
|
|
33327
|
+
return;
|
|
33328
|
+
if (stat.isDirectory()) {
|
|
33329
|
+
await replacePathPlaceholdersInDir(target, claudeDir);
|
|
33330
|
+
} else if (isTextFile(target)) {
|
|
33331
|
+
const content = await import_fs_extra5.default.readFile(target, "utf-8");
|
|
33332
|
+
const replaced = replaceClaudePathPlaceholder(content, claudeDir);
|
|
33333
|
+
if (replaced !== content) {
|
|
33334
|
+
await import_fs_extra5.default.writeFile(target, replaced, "utf-8");
|
|
33335
|
+
}
|
|
33336
|
+
}
|
|
33337
|
+
}
|
|
33435
33338
|
function transformFileContent(content, claudeDir) {
|
|
33436
33339
|
let transformed = content;
|
|
33437
33340
|
transformed = replaceClaudePathPlaceholder(transformed, claudeDir);
|
|
@@ -33457,40 +33360,40 @@ function transformFileContent(content, claudeDir) {
|
|
|
33457
33360
|
}
|
|
33458
33361
|
|
|
33459
33362
|
// src/lib/telemetry.ts
|
|
33460
|
-
import
|
|
33461
|
-
import
|
|
33462
|
-
import
|
|
33363
|
+
import os8 from "os";
|
|
33364
|
+
import fs6 from "fs";
|
|
33365
|
+
import path8 from "path";
|
|
33463
33366
|
var TELEMETRY_URL = "https://codelynx.dev/api/cli/events";
|
|
33464
33367
|
var isDisabled = () => {
|
|
33465
33368
|
return process.env.AIBLUEPRINT_TELEMETRY_DISABLED === "1";
|
|
33466
33369
|
};
|
|
33467
33370
|
var getBasePayload = () => ({
|
|
33468
33371
|
cliVersion: getVersion(),
|
|
33469
|
-
platform:
|
|
33470
|
-
arch:
|
|
33372
|
+
platform: os8.platform(),
|
|
33373
|
+
arch: os8.arch(),
|
|
33471
33374
|
nodeVersion: process.version
|
|
33472
33375
|
});
|
|
33473
33376
|
function getTokenFilePath() {
|
|
33474
|
-
const homeDir =
|
|
33475
|
-
if (
|
|
33476
|
-
const appData = process.env.APPDATA ||
|
|
33477
|
-
return
|
|
33377
|
+
const homeDir = os8.homedir();
|
|
33378
|
+
if (os8.platform() === "win32") {
|
|
33379
|
+
const appData = process.env.APPDATA || path8.join(homeDir, "AppData", "Roaming");
|
|
33380
|
+
return path8.join(appData, "aiblueprint", "token.txt");
|
|
33478
33381
|
}
|
|
33479
|
-
const configHome = process.env.XDG_CONFIG_HOME ||
|
|
33480
|
-
return
|
|
33382
|
+
const configHome = process.env.XDG_CONFIG_HOME || path8.join(homeDir, ".config");
|
|
33383
|
+
return path8.join(configHome, "aiblueprint", "token.txt");
|
|
33481
33384
|
}
|
|
33482
33385
|
function getSystemInfo() {
|
|
33483
33386
|
let hasProToken = false;
|
|
33484
33387
|
try {
|
|
33485
|
-
hasProToken =
|
|
33388
|
+
hasProToken = fs6.existsSync(getTokenFilePath());
|
|
33486
33389
|
} catch {}
|
|
33487
33390
|
return {
|
|
33488
|
-
osVersion:
|
|
33489
|
-
osType:
|
|
33490
|
-
totalMemory: `${Math.round(
|
|
33491
|
-
cpus:
|
|
33391
|
+
osVersion: os8.release(),
|
|
33392
|
+
osType: os8.type(),
|
|
33393
|
+
totalMemory: `${Math.round(os8.totalmem() / (1024 * 1024 * 1024))}GB`,
|
|
33394
|
+
cpus: os8.cpus().length,
|
|
33492
33395
|
shell: process.env.SHELL || process.env.COMSPEC || "unknown",
|
|
33493
|
-
homeDir:
|
|
33396
|
+
homeDir: os8.homedir(),
|
|
33494
33397
|
locale: process.env.LANG || process.env.LC_ALL || "unknown",
|
|
33495
33398
|
hasProToken
|
|
33496
33399
|
};
|
|
@@ -33532,42 +33435,28 @@ async function flushTelemetry() {
|
|
|
33532
33435
|
}
|
|
33533
33436
|
|
|
33534
33437
|
// src/lib/agents-installer.ts
|
|
33535
|
-
var
|
|
33536
|
-
import
|
|
33537
|
-
import
|
|
33538
|
-
async function applyPathPlaceholders(target, claudeDir) {
|
|
33539
|
-
const stat = await import_fs_extra7.default.stat(target).catch(() => null);
|
|
33540
|
-
if (!stat)
|
|
33541
|
-
return;
|
|
33542
|
-
if (stat.isDirectory()) {
|
|
33543
|
-
await replacePathPlaceholdersInDir(target, claudeDir);
|
|
33544
|
-
} else if (isTextFile(target)) {
|
|
33545
|
-
const content = await import_fs_extra7.default.readFile(target, "utf-8");
|
|
33546
|
-
const replaced = replaceClaudePathPlaceholder(content, claudeDir);
|
|
33547
|
-
if (replaced !== content) {
|
|
33548
|
-
await import_fs_extra7.default.writeFile(target, replaced, "utf-8");
|
|
33549
|
-
}
|
|
33550
|
-
}
|
|
33551
|
-
}
|
|
33438
|
+
var import_fs_extra6 = __toESM(require_lib4(), 1);
|
|
33439
|
+
import os9 from "os";
|
|
33440
|
+
import path9 from "path";
|
|
33552
33441
|
var AGENT_CATEGORIES = ["skills", "agents"];
|
|
33553
33442
|
async function platformSymlink(source, target) {
|
|
33554
|
-
await
|
|
33555
|
-
const isWindows2 =
|
|
33556
|
-
const sourceStat = await
|
|
33443
|
+
await import_fs_extra6.default.ensureDir(path9.dirname(target));
|
|
33444
|
+
const isWindows2 = os9.platform() === "win32";
|
|
33445
|
+
const sourceStat = await import_fs_extra6.default.stat(source).catch(() => null);
|
|
33557
33446
|
const isDir = sourceStat?.isDirectory() ?? false;
|
|
33558
33447
|
if (isWindows2 && isDir) {
|
|
33559
|
-
await
|
|
33448
|
+
await import_fs_extra6.default.symlink(source, target, "junction");
|
|
33560
33449
|
return;
|
|
33561
33450
|
}
|
|
33562
33451
|
try {
|
|
33563
|
-
await
|
|
33452
|
+
await import_fs_extra6.default.symlink(source, target);
|
|
33564
33453
|
} catch (error) {
|
|
33565
33454
|
if (!isWindows2 || isDir)
|
|
33566
33455
|
throw error;
|
|
33567
33456
|
try {
|
|
33568
|
-
await
|
|
33457
|
+
await import_fs_extra6.default.link(source, target);
|
|
33569
33458
|
} catch {
|
|
33570
|
-
await
|
|
33459
|
+
await import_fs_extra6.default.copy(source, target, { overwrite: true });
|
|
33571
33460
|
}
|
|
33572
33461
|
}
|
|
33573
33462
|
}
|
|
@@ -33578,37 +33467,37 @@ async function installCategoryToAgents(sourceCategoryDir, category, agentsDir, c
|
|
|
33578
33467
|
symlinked: [],
|
|
33579
33468
|
skipped: []
|
|
33580
33469
|
};
|
|
33581
|
-
if (!await
|
|
33470
|
+
if (!await import_fs_extra6.default.pathExists(sourceCategoryDir)) {
|
|
33582
33471
|
return result;
|
|
33583
33472
|
}
|
|
33584
|
-
const agentsCategoryDir =
|
|
33585
|
-
await
|
|
33586
|
-
const entries = await
|
|
33473
|
+
const agentsCategoryDir = path9.join(agentsDir, category);
|
|
33474
|
+
await import_fs_extra6.default.ensureDir(agentsCategoryDir);
|
|
33475
|
+
const entries = await import_fs_extra6.default.readdir(sourceCategoryDir, { withFileTypes: true });
|
|
33587
33476
|
for (const entry of entries) {
|
|
33588
33477
|
if (entry.name === ".DS_Store" || entry.name === "node_modules")
|
|
33589
33478
|
continue;
|
|
33590
|
-
const sourcePath =
|
|
33591
|
-
const agentsTarget =
|
|
33592
|
-
const claudeTarget =
|
|
33593
|
-
const agentsExists = await
|
|
33479
|
+
const sourcePath = path9.join(sourceCategoryDir, entry.name);
|
|
33480
|
+
const agentsTarget = path9.join(agentsCategoryDir, entry.name);
|
|
33481
|
+
const claudeTarget = path9.join(claudeDir, category, entry.name);
|
|
33482
|
+
const agentsExists = await import_fs_extra6.default.pathExists(agentsTarget);
|
|
33594
33483
|
if (!agentsExists) {
|
|
33595
33484
|
let migrated = false;
|
|
33596
33485
|
if (options.migrateClaudeDirs) {
|
|
33597
|
-
const claudeStat = await
|
|
33486
|
+
const claudeStat = await import_fs_extra6.default.lstat(claudeTarget).catch(() => null);
|
|
33598
33487
|
if (claudeStat && !claudeStat.isSymbolicLink()) {
|
|
33599
|
-
await
|
|
33488
|
+
await import_fs_extra6.default.move(claudeTarget, agentsTarget);
|
|
33600
33489
|
result.migrated.push(entry.name);
|
|
33601
33490
|
migrated = true;
|
|
33602
33491
|
}
|
|
33603
33492
|
}
|
|
33604
33493
|
if (!migrated) {
|
|
33605
|
-
await
|
|
33494
|
+
await import_fs_extra6.default.copy(sourcePath, agentsTarget, { overwrite: false });
|
|
33606
33495
|
await applyPathPlaceholders(agentsTarget, claudeDir);
|
|
33607
33496
|
result.copied.push(entry.name);
|
|
33608
33497
|
}
|
|
33609
33498
|
} else if (options.overwrite) {
|
|
33610
|
-
await
|
|
33611
|
-
await
|
|
33499
|
+
await import_fs_extra6.default.remove(agentsTarget);
|
|
33500
|
+
await import_fs_extra6.default.copy(sourcePath, agentsTarget, { overwrite: false });
|
|
33612
33501
|
await applyPathPlaceholders(agentsTarget, claudeDir);
|
|
33613
33502
|
result.copied.push(entry.name);
|
|
33614
33503
|
}
|
|
@@ -33617,24 +33506,24 @@ async function installCategoryToAgents(sourceCategoryDir, category, agentsDir, c
|
|
|
33617
33506
|
return result;
|
|
33618
33507
|
}
|
|
33619
33508
|
async function syncCategorySymlinks(category, agentsDir, claudeDir, result, silent = false) {
|
|
33620
|
-
const agentsCategoryDir =
|
|
33621
|
-
const claudeCategoryDir =
|
|
33622
|
-
if (!await
|
|
33509
|
+
const agentsCategoryDir = path9.join(agentsDir, category);
|
|
33510
|
+
const claudeCategoryDir = path9.join(claudeDir, category);
|
|
33511
|
+
if (!await import_fs_extra6.default.pathExists(agentsCategoryDir)) {
|
|
33623
33512
|
return;
|
|
33624
33513
|
}
|
|
33625
|
-
await
|
|
33626
|
-
const entries = await
|
|
33514
|
+
await import_fs_extra6.default.ensureDir(claudeCategoryDir);
|
|
33515
|
+
const entries = await import_fs_extra6.default.readdir(agentsCategoryDir, { withFileTypes: true });
|
|
33627
33516
|
for (const entry of entries) {
|
|
33628
33517
|
if (entry.name === ".DS_Store")
|
|
33629
33518
|
continue;
|
|
33630
|
-
const agentsTarget =
|
|
33631
|
-
const claudeTarget =
|
|
33632
|
-
const claudeStat = await
|
|
33519
|
+
const agentsTarget = path9.join(agentsCategoryDir, entry.name);
|
|
33520
|
+
const claudeTarget = path9.join(claudeCategoryDir, entry.name);
|
|
33521
|
+
const claudeStat = await import_fs_extra6.default.lstat(claudeTarget).catch(() => null);
|
|
33633
33522
|
if (!claudeStat) {
|
|
33634
33523
|
await platformSymlink(agentsTarget, claudeTarget);
|
|
33635
33524
|
result?.symlinked.push(entry.name);
|
|
33636
33525
|
} else if (claudeStat.isSymbolicLink()) {
|
|
33637
|
-
await
|
|
33526
|
+
await import_fs_extra6.default.remove(claudeTarget);
|
|
33638
33527
|
await platformSymlink(agentsTarget, claudeTarget);
|
|
33639
33528
|
result?.symlinked.push(entry.name);
|
|
33640
33529
|
} else {
|
|
@@ -33645,15 +33534,15 @@ async function syncCategorySymlinks(category, agentsDir, claudeDir, result, sile
|
|
|
33645
33534
|
}
|
|
33646
33535
|
}
|
|
33647
33536
|
}
|
|
33648
|
-
if (await
|
|
33649
|
-
const claudeEntries = await
|
|
33537
|
+
if (await import_fs_extra6.default.pathExists(claudeCategoryDir)) {
|
|
33538
|
+
const claudeEntries = await import_fs_extra6.default.readdir(claudeCategoryDir, { withFileTypes: true });
|
|
33650
33539
|
for (const entry of claudeEntries) {
|
|
33651
|
-
const claudeTarget =
|
|
33652
|
-
const stat = await
|
|
33540
|
+
const claudeTarget = path9.join(claudeCategoryDir, entry.name);
|
|
33541
|
+
const stat = await import_fs_extra6.default.lstat(claudeTarget).catch(() => null);
|
|
33653
33542
|
if (stat?.isSymbolicLink()) {
|
|
33654
|
-
const exists = await
|
|
33543
|
+
const exists = await import_fs_extra6.default.pathExists(claudeTarget);
|
|
33655
33544
|
if (!exists) {
|
|
33656
|
-
await
|
|
33545
|
+
await import_fs_extra6.default.remove(claudeTarget);
|
|
33657
33546
|
}
|
|
33658
33547
|
}
|
|
33659
33548
|
}
|
|
@@ -33664,13 +33553,13 @@ function isAgentCategory(category) {
|
|
|
33664
33553
|
}
|
|
33665
33554
|
|
|
33666
33555
|
// src/lib/folder-paths.ts
|
|
33667
|
-
import
|
|
33668
|
-
import
|
|
33556
|
+
import os10 from "os";
|
|
33557
|
+
import path10 from "path";
|
|
33669
33558
|
function resolveFolders(options = {}) {
|
|
33670
|
-
const rootDir = options.folder ?
|
|
33671
|
-
const claudeDir = options.claudeCodeFolder ?
|
|
33672
|
-
const codexDir = options.codexFolder ?
|
|
33673
|
-
const agentsDir = options.agentsFolder ?
|
|
33559
|
+
const rootDir = options.folder ? path10.resolve(options.folder) : os10.homedir();
|
|
33560
|
+
const claudeDir = options.claudeCodeFolder ? path10.resolve(options.claudeCodeFolder) : path10.join(rootDir, ".claude");
|
|
33561
|
+
const codexDir = options.codexFolder ? path10.resolve(options.codexFolder) : path10.join(rootDir, ".codex");
|
|
33562
|
+
const agentsDir = options.agentsFolder ? path10.resolve(options.agentsFolder) : path10.join(rootDir, ".agents");
|
|
33674
33563
|
return { rootDir, claudeDir, codexDir, agentsDir };
|
|
33675
33564
|
}
|
|
33676
33565
|
|
|
@@ -33679,11 +33568,11 @@ var __filename2 = fileURLToPath2(import.meta.url);
|
|
|
33679
33568
|
var __dirname2 = dirname2(__filename2);
|
|
33680
33569
|
async function resolveClaudeAssetPath(sourceDir, name) {
|
|
33681
33570
|
const candidates = [
|
|
33682
|
-
|
|
33683
|
-
|
|
33571
|
+
path11.join(sourceDir, "claude-config", name),
|
|
33572
|
+
path11.join(sourceDir, name)
|
|
33684
33573
|
];
|
|
33685
33574
|
for (const candidate of candidates) {
|
|
33686
|
-
if (await
|
|
33575
|
+
if (await import_fs_extra7.default.pathExists(candidate))
|
|
33687
33576
|
return candidate;
|
|
33688
33577
|
}
|
|
33689
33578
|
return null;
|
|
@@ -33693,7 +33582,6 @@ async function setupCommand(params = {}) {
|
|
|
33693
33582
|
folder,
|
|
33694
33583
|
claudeCodeFolder,
|
|
33695
33584
|
codexFolder,
|
|
33696
|
-
openCodeFolder,
|
|
33697
33585
|
agentsFolder,
|
|
33698
33586
|
skipInteractive
|
|
33699
33587
|
} = params;
|
|
@@ -33708,11 +33596,9 @@ async function setupCommand(params = {}) {
|
|
|
33708
33596
|
features = [
|
|
33709
33597
|
"shellShortcuts",
|
|
33710
33598
|
"customStatusline",
|
|
33711
|
-
"aiblueprintCommands",
|
|
33712
33599
|
"aiblueprintAgents",
|
|
33713
33600
|
"aiblueprintSkills",
|
|
33714
|
-
"
|
|
33715
|
-
"openCodeSymlink"
|
|
33601
|
+
"installCodex"
|
|
33716
33602
|
];
|
|
33717
33603
|
console.log(source_default.green("✓ Installing all features (--skip mode)"));
|
|
33718
33604
|
} else {
|
|
@@ -33732,11 +33618,6 @@ async function setupCommand(params = {}) {
|
|
|
33732
33618
|
name: "Custom statusline - Shows git, costs, tokens info",
|
|
33733
33619
|
checked: true
|
|
33734
33620
|
},
|
|
33735
|
-
{
|
|
33736
|
-
value: "aiblueprintCommands",
|
|
33737
|
-
name: "AIBlueprint commands - Pre-configured command templates",
|
|
33738
|
-
checked: true
|
|
33739
|
-
},
|
|
33740
33621
|
{
|
|
33741
33622
|
value: "aiblueprintAgents",
|
|
33742
33623
|
name: "AIBlueprint agents - Specialized AI agents",
|
|
@@ -33748,14 +33629,9 @@ async function setupCommand(params = {}) {
|
|
|
33748
33629
|
checked: true
|
|
33749
33630
|
},
|
|
33750
33631
|
{
|
|
33751
|
-
value: "
|
|
33752
|
-
name: "Codex
|
|
33753
|
-
checked:
|
|
33754
|
-
},
|
|
33755
|
-
{
|
|
33756
|
-
value: "openCodeSymlink",
|
|
33757
|
-
name: "OpenCode symlink - Link commands to ~/.config/opencode/command",
|
|
33758
|
-
checked: false
|
|
33632
|
+
value: "installCodex",
|
|
33633
|
+
name: "Codex setup - Starter config + share skills/agents with ~/.codex",
|
|
33634
|
+
checked: true
|
|
33759
33635
|
}
|
|
33760
33636
|
]
|
|
33761
33637
|
}
|
|
@@ -33769,11 +33645,9 @@ async function setupCommand(params = {}) {
|
|
|
33769
33645
|
const options = {
|
|
33770
33646
|
shellShortcuts: features.includes("shellShortcuts"),
|
|
33771
33647
|
customStatusline: features.includes("customStatusline"),
|
|
33772
|
-
aiblueprintCommands: features.includes("aiblueprintCommands"),
|
|
33773
33648
|
aiblueprintAgents: features.includes("aiblueprintAgents"),
|
|
33774
33649
|
aiblueprintSkills: features.includes("aiblueprintSkills"),
|
|
33775
|
-
|
|
33776
|
-
openCodeSymlink: features.includes("openCodeSymlink"),
|
|
33650
|
+
installCodex: features.includes("installCodex"),
|
|
33777
33651
|
skipInteractive
|
|
33778
33652
|
};
|
|
33779
33653
|
const s = new SimpleSpinner;
|
|
@@ -33786,8 +33660,8 @@ async function setupCommand(params = {}) {
|
|
|
33786
33660
|
console.log(source_default.gray(`Claude: ${claudeDir}`));
|
|
33787
33661
|
console.log(source_default.gray(`Codex: ${codexDir}`));
|
|
33788
33662
|
console.log(source_default.gray(`Agents: ${agentsDir}`));
|
|
33789
|
-
await
|
|
33790
|
-
await
|
|
33663
|
+
await import_fs_extra7.default.ensureDir(claudeDir);
|
|
33664
|
+
await import_fs_extra7.default.ensureDir(agentsDir);
|
|
33791
33665
|
s.start("Creating backup of existing configuration");
|
|
33792
33666
|
const backupPath = await createBackup(claudeDir, agentsDir);
|
|
33793
33667
|
if (backupPath) {
|
|
@@ -33815,33 +33689,20 @@ async function setupCommand(params = {}) {
|
|
|
33815
33689
|
s.start("Setting up scripts");
|
|
33816
33690
|
const scriptsSource = await resolveClaudeAssetPath(sourceDir, "scripts");
|
|
33817
33691
|
if (scriptsSource) {
|
|
33818
|
-
await
|
|
33692
|
+
await import_fs_extra7.default.copy(scriptsSource, path11.join(claudeDir, "scripts"), {
|
|
33819
33693
|
overwrite: true
|
|
33820
33694
|
});
|
|
33821
|
-
await replacePathPlaceholdersInDir(
|
|
33822
|
-
await
|
|
33695
|
+
await replacePathPlaceholdersInDir(path11.join(claudeDir, "scripts"), claudeDir);
|
|
33696
|
+
await import_fs_extra7.default.ensureDir(path11.join(claudeDir, "scripts/statusline/data"));
|
|
33823
33697
|
s.stop("Scripts installed");
|
|
33824
33698
|
} else {
|
|
33825
33699
|
s.stop("Scripts not available in repository");
|
|
33826
33700
|
}
|
|
33827
33701
|
}
|
|
33828
|
-
if (options.aiblueprintCommands) {
|
|
33829
|
-
s.start("Setting up AIBlueprint commands");
|
|
33830
|
-
const commandsSource = await resolveClaudeAssetPath(sourceDir, "commands");
|
|
33831
|
-
if (commandsSource) {
|
|
33832
|
-
await import_fs_extra8.default.copy(commandsSource, path12.join(claudeDir, "commands"), {
|
|
33833
|
-
overwrite: true
|
|
33834
|
-
});
|
|
33835
|
-
await replacePathPlaceholdersInDir(path12.join(claudeDir, "commands"), claudeDir);
|
|
33836
|
-
s.stop("Commands installed");
|
|
33837
|
-
} else {
|
|
33838
|
-
s.stop("Commands not available in repository");
|
|
33839
|
-
}
|
|
33840
|
-
}
|
|
33841
33702
|
if (options.aiblueprintAgents) {
|
|
33842
33703
|
s.start("Setting up AIBlueprint agents");
|
|
33843
|
-
const agentsSource =
|
|
33844
|
-
if (await
|
|
33704
|
+
const agentsSource = path11.join(sourceDir, "agents");
|
|
33705
|
+
if (await import_fs_extra7.default.pathExists(agentsSource)) {
|
|
33845
33706
|
const installResult = await installCategoryToAgents(agentsSource, "agents", agentsDir, claudeDir, { migrateClaudeDirs: true, silent: true });
|
|
33846
33707
|
const summary = [
|
|
33847
33708
|
installResult.copied.length && `${installResult.copied.length} copied`,
|
|
@@ -33856,8 +33717,8 @@ async function setupCommand(params = {}) {
|
|
|
33856
33717
|
}
|
|
33857
33718
|
if (options.aiblueprintSkills) {
|
|
33858
33719
|
s.start("Setting up AIBlueprint Skills");
|
|
33859
|
-
const skillsSourcePath =
|
|
33860
|
-
if (await
|
|
33720
|
+
const skillsSourcePath = path11.join(sourceDir, "skills");
|
|
33721
|
+
if (await import_fs_extra7.default.pathExists(skillsSourcePath)) {
|
|
33861
33722
|
const installResult = await installCategoryToAgents(skillsSourcePath, "skills", agentsDir, claudeDir, { migrateClaudeDirs: true, silent: true });
|
|
33862
33723
|
const summary = [
|
|
33863
33724
|
installResult.copied.length && `${installResult.copied.length} copied`,
|
|
@@ -33875,14 +33736,12 @@ async function setupCommand(params = {}) {
|
|
|
33875
33736
|
s.stop("Skills not available in repository");
|
|
33876
33737
|
}
|
|
33877
33738
|
}
|
|
33878
|
-
if (options.
|
|
33879
|
-
s.start("Setting up Codex
|
|
33880
|
-
|
|
33881
|
-
|
|
33882
|
-
|
|
33883
|
-
|
|
33884
|
-
if (options.aiblueprintCommands) {
|
|
33885
|
-
await setupCodexSymlink(claudeDir, codexDir, claudeCodeFolder);
|
|
33739
|
+
if (options.installCodex) {
|
|
33740
|
+
s.start("Setting up Codex");
|
|
33741
|
+
await import_fs_extra7.default.ensureDir(codexDir);
|
|
33742
|
+
const codexConfigSource = path11.join(sourceDir, "codex-config");
|
|
33743
|
+
if (await import_fs_extra7.default.pathExists(codexConfigSource)) {
|
|
33744
|
+
await import_fs_extra7.default.copy(codexConfigSource, codexDir, { overwrite: false });
|
|
33886
33745
|
}
|
|
33887
33746
|
if (options.aiblueprintSkills) {
|
|
33888
33747
|
await syncCategorySymlinks("skills", agentsDir, codexDir, undefined, true);
|
|
@@ -33892,11 +33751,6 @@ async function setupCommand(params = {}) {
|
|
|
33892
33751
|
}
|
|
33893
33752
|
s.stop("Codex configured");
|
|
33894
33753
|
}
|
|
33895
|
-
if (options.openCodeSymlink && options.aiblueprintCommands) {
|
|
33896
|
-
s.start("Setting up OpenCode symlink");
|
|
33897
|
-
await setupOpenCodeSymlink(claudeDir, openCodeFolder, claudeCodeFolder);
|
|
33898
|
-
s.stop("OpenCode symlink configured");
|
|
33899
|
-
}
|
|
33900
33754
|
if (options.customStatusline) {
|
|
33901
33755
|
s.start("Checking dependencies");
|
|
33902
33756
|
await checkAndInstallDependencies();
|
|
@@ -33933,7 +33787,7 @@ async function setupCommand(params = {}) {
|
|
|
33933
33787
|
console.log(source_default.gray(`
|
|
33934
33788
|
Next steps:`));
|
|
33935
33789
|
if (options.shellShortcuts) {
|
|
33936
|
-
const platform =
|
|
33790
|
+
const platform = os11.platform();
|
|
33937
33791
|
if (platform === "win32") {
|
|
33938
33792
|
console.log(source_default.gray(" • Restart PowerShell to load the new functions"));
|
|
33939
33793
|
} else {
|
|
@@ -33959,9 +33813,9 @@ Next steps:`));
|
|
|
33959
33813
|
}
|
|
33960
33814
|
|
|
33961
33815
|
// src/commands/setup-terminal.ts
|
|
33962
|
-
var
|
|
33963
|
-
import
|
|
33964
|
-
import
|
|
33816
|
+
var import_fs_extra8 = __toESM(require_lib4(), 1);
|
|
33817
|
+
import path12 from "path";
|
|
33818
|
+
import os12 from "os";
|
|
33965
33819
|
import { execSync as execSync3, exec as exec2 } from "child_process";
|
|
33966
33820
|
var OHMYZSH_INSTALL_URL = "https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh";
|
|
33967
33821
|
var INSTALL_TIMEOUT = 120000;
|
|
@@ -33995,16 +33849,16 @@ function commandExists(cmd) {
|
|
|
33995
33849
|
}
|
|
33996
33850
|
}
|
|
33997
33851
|
function isOhMyZshInstalled(homeDir) {
|
|
33998
|
-
const ohMyZshDir =
|
|
33999
|
-
return
|
|
33852
|
+
const ohMyZshDir = path12.join(homeDir, ".oh-my-zsh");
|
|
33853
|
+
return import_fs_extra8.default.existsSync(ohMyZshDir);
|
|
34000
33854
|
}
|
|
34001
33855
|
function backupFile(filePath) {
|
|
34002
|
-
if (!
|
|
33856
|
+
if (!import_fs_extra8.default.existsSync(filePath))
|
|
34003
33857
|
return null;
|
|
34004
33858
|
const timestamp = new Date().toISOString().replace(/[:.]/g, "-");
|
|
34005
33859
|
const backupPath = `${filePath}.backup-${timestamp}`;
|
|
34006
33860
|
try {
|
|
34007
|
-
|
|
33861
|
+
import_fs_extra8.default.copyFileSync(filePath, backupPath);
|
|
34008
33862
|
return backupPath;
|
|
34009
33863
|
} catch (error) {
|
|
34010
33864
|
throw new Error(`Failed to create backup: ${error.message}`);
|
|
@@ -34043,7 +33897,7 @@ function installPrerequisiteSync(packageName, installCmd) {
|
|
|
34043
33897
|
async function installOhMyZsh(homeDir) {
|
|
34044
33898
|
return new Promise((resolve, reject) => {
|
|
34045
33899
|
const installCmd = `sh -c "$(curl -fsSL ${OHMYZSH_INSTALL_URL})" "" --unattended`;
|
|
34046
|
-
const env2 = { ...process.env, HOME: homeDir, ZSH:
|
|
33900
|
+
const env2 = { ...process.env, HOME: homeDir, ZSH: path12.join(homeDir, ".oh-my-zsh") };
|
|
34047
33901
|
exec2(installCmd, { timeout: INSTALL_TIMEOUT, env: env2 }, (error, stdout, stderr) => {
|
|
34048
33902
|
if (error) {
|
|
34049
33903
|
if ("killed" in error && error.killed) {
|
|
@@ -34064,8 +33918,8 @@ async function installPlugin(pluginName, repoUrl, homeDir) {
|
|
|
34064
33918
|
if (!/^https:\/\/github\.com\/[\w-]+\/[\w-]+$/.test(repoUrl)) {
|
|
34065
33919
|
throw new Error(`Invalid repository URL: ${repoUrl}`);
|
|
34066
33920
|
}
|
|
34067
|
-
const customPluginsDir =
|
|
34068
|
-
if (
|
|
33921
|
+
const customPluginsDir = path12.join(homeDir, ".oh-my-zsh/custom/plugins", pluginName);
|
|
33922
|
+
if (import_fs_extra8.default.existsSync(customPluginsDir)) {
|
|
34069
33923
|
return;
|
|
34070
33924
|
}
|
|
34071
33925
|
return new Promise((resolve, reject) => {
|
|
@@ -34083,20 +33937,20 @@ async function installPlugin(pluginName, repoUrl, homeDir) {
|
|
|
34083
33937
|
});
|
|
34084
33938
|
}
|
|
34085
33939
|
function updateZshrcTheme(theme, homeDir) {
|
|
34086
|
-
const zshrcPath =
|
|
33940
|
+
const zshrcPath = path12.join(homeDir, ".zshrc");
|
|
34087
33941
|
const sanitizedTheme = sanitizeThemeName(theme);
|
|
34088
|
-
if (!
|
|
33942
|
+
if (!import_fs_extra8.default.existsSync(zshrcPath)) {
|
|
34089
33943
|
throw new Error(".zshrc file not found. Please ensure Oh My ZSH is installed correctly.");
|
|
34090
33944
|
}
|
|
34091
33945
|
try {
|
|
34092
|
-
let content =
|
|
33946
|
+
let content = import_fs_extra8.default.readFileSync(zshrcPath, "utf-8");
|
|
34093
33947
|
if (content.match(/^ZSH_THEME=/m)) {
|
|
34094
33948
|
content = content.replace(/^ZSH_THEME=.*/m, `ZSH_THEME="${sanitizedTheme}"`);
|
|
34095
33949
|
} else {
|
|
34096
33950
|
content = `ZSH_THEME="${sanitizedTheme}"
|
|
34097
33951
|
${content}`;
|
|
34098
33952
|
}
|
|
34099
|
-
|
|
33953
|
+
import_fs_extra8.default.writeFileSync(zshrcPath, content);
|
|
34100
33954
|
} catch (error) {
|
|
34101
33955
|
if (error.message.includes(".zshrc file not found")) {
|
|
34102
33956
|
throw error;
|
|
@@ -34105,12 +33959,12 @@ ${content}`;
|
|
|
34105
33959
|
}
|
|
34106
33960
|
}
|
|
34107
33961
|
function updateZshrcPlugins(plugins, homeDir) {
|
|
34108
|
-
const zshrcPath =
|
|
34109
|
-
if (!
|
|
33962
|
+
const zshrcPath = path12.join(homeDir, ".zshrc");
|
|
33963
|
+
if (!import_fs_extra8.default.existsSync(zshrcPath)) {
|
|
34110
33964
|
throw new Error(".zshrc file not found. Please ensure Oh My ZSH is installed correctly.");
|
|
34111
33965
|
}
|
|
34112
33966
|
try {
|
|
34113
|
-
let content =
|
|
33967
|
+
let content = import_fs_extra8.default.readFileSync(zshrcPath, "utf-8");
|
|
34114
33968
|
const pluginsString = plugins.join(" ");
|
|
34115
33969
|
if (content.match(/^plugins=\(/m)) {
|
|
34116
33970
|
content = content.replace(/^plugins=\([^)]*\)/m, `plugins=(${pluginsString})`);
|
|
@@ -34118,7 +33972,7 @@ function updateZshrcPlugins(plugins, homeDir) {
|
|
|
34118
33972
|
content = `${content}
|
|
34119
33973
|
plugins=(${pluginsString})`;
|
|
34120
33974
|
}
|
|
34121
|
-
|
|
33975
|
+
import_fs_extra8.default.writeFileSync(zshrcPath, content);
|
|
34122
33976
|
} catch (error) {
|
|
34123
33977
|
if (error.message.includes(".zshrc file not found")) {
|
|
34124
33978
|
throw error;
|
|
@@ -34128,7 +33982,7 @@ plugins=(${pluginsString})`;
|
|
|
34128
33982
|
}
|
|
34129
33983
|
async function setupTerminalCommand(options = {}) {
|
|
34130
33984
|
const { skipInteractive, homeDir: customHomeDir } = options;
|
|
34131
|
-
const homeDir = customHomeDir ||
|
|
33985
|
+
const homeDir = customHomeDir || os12.homedir();
|
|
34132
33986
|
try {
|
|
34133
33987
|
console.log(source_default.blue.bold(`
|
|
34134
33988
|
\uD83D\uDDA5️ AIBlueprint Terminal Setup ${source_default.gray(`v${getVersion()}`)}
|
|
@@ -34225,8 +34079,8 @@ Installing missing prerequisites: ${missingPrereqs.join(", ")}`));
|
|
|
34225
34079
|
selectedTheme = themeAnswer.theme;
|
|
34226
34080
|
}
|
|
34227
34081
|
}
|
|
34228
|
-
const zshrcPath =
|
|
34229
|
-
if (
|
|
34082
|
+
const zshrcPath = path12.join(homeDir, ".zshrc");
|
|
34083
|
+
if (import_fs_extra8.default.existsSync(zshrcPath)) {
|
|
34230
34084
|
s.start("Backing up .zshrc");
|
|
34231
34085
|
const backupPath = backupFile(zshrcPath);
|
|
34232
34086
|
if (backupPath) {
|
|
@@ -34275,30 +34129,99 @@ Next steps:`));
|
|
|
34275
34129
|
}
|
|
34276
34130
|
}
|
|
34277
34131
|
|
|
34132
|
+
// src/commands/setup/symlinks.ts
|
|
34133
|
+
var import_fs_extra9 = __toESM(require_lib4(), 1);
|
|
34134
|
+
import path13 from "path";
|
|
34135
|
+
import os13 from "os";
|
|
34136
|
+
async function getToolPaths(tool, customFolder) {
|
|
34137
|
+
let baseDir;
|
|
34138
|
+
switch (tool) {
|
|
34139
|
+
case "claude-code":
|
|
34140
|
+
baseDir = customFolder ? path13.resolve(customFolder) : path13.join(os13.homedir(), ".claude");
|
|
34141
|
+
return {
|
|
34142
|
+
baseDir,
|
|
34143
|
+
commandsPath: path13.join(baseDir, "commands"),
|
|
34144
|
+
agentsPath: path13.join(baseDir, "agents")
|
|
34145
|
+
};
|
|
34146
|
+
case "codex":
|
|
34147
|
+
baseDir = customFolder ? path13.resolve(customFolder) : path13.join(os13.homedir(), ".codex");
|
|
34148
|
+
return {
|
|
34149
|
+
baseDir,
|
|
34150
|
+
agentsPath: path13.join(baseDir, "agents")
|
|
34151
|
+
};
|
|
34152
|
+
case "opencode":
|
|
34153
|
+
baseDir = customFolder ? path13.resolve(customFolder) : path13.join(os13.homedir(), ".config", "opencode");
|
|
34154
|
+
return {
|
|
34155
|
+
baseDir,
|
|
34156
|
+
commandsPath: path13.join(baseDir, "command")
|
|
34157
|
+
};
|
|
34158
|
+
case "factoryai":
|
|
34159
|
+
baseDir = customFolder ? path13.resolve(customFolder) : path13.join(os13.homedir(), ".factory");
|
|
34160
|
+
return {
|
|
34161
|
+
baseDir,
|
|
34162
|
+
commandsPath: path13.join(baseDir, "commands"),
|
|
34163
|
+
agentsPath: path13.join(baseDir, "droids")
|
|
34164
|
+
};
|
|
34165
|
+
default:
|
|
34166
|
+
throw new Error(`Unknown tool type: ${tool}`);
|
|
34167
|
+
}
|
|
34168
|
+
}
|
|
34169
|
+
async function createSymlink(sourcePath, targetPath, options = {}) {
|
|
34170
|
+
try {
|
|
34171
|
+
const sourceExists = await import_fs_extra9.default.pathExists(sourcePath);
|
|
34172
|
+
if (!sourceExists) {
|
|
34173
|
+
console.log(source_default.yellow(` Source path ${sourcePath} does not exist. Skipping symlink creation...`));
|
|
34174
|
+
return false;
|
|
34175
|
+
}
|
|
34176
|
+
const targetDir = path13.dirname(targetPath);
|
|
34177
|
+
await import_fs_extra9.default.ensureDir(targetDir);
|
|
34178
|
+
const targetExists = await import_fs_extra9.default.pathExists(targetPath);
|
|
34179
|
+
if (targetExists) {
|
|
34180
|
+
const stat = await import_fs_extra9.default.lstat(targetPath);
|
|
34181
|
+
if (stat.isSymbolicLink()) {
|
|
34182
|
+
await import_fs_extra9.default.remove(targetPath);
|
|
34183
|
+
} else {
|
|
34184
|
+
console.log(source_default.yellow(options.skipMessage || ` ${targetPath} already exists and is not a symlink. Skipping...`));
|
|
34185
|
+
return false;
|
|
34186
|
+
}
|
|
34187
|
+
}
|
|
34188
|
+
const isWindows2 = os13.platform() === "win32";
|
|
34189
|
+
if (isWindows2) {
|
|
34190
|
+
await import_fs_extra9.default.symlink(sourcePath, targetPath, "junction");
|
|
34191
|
+
} else {
|
|
34192
|
+
await import_fs_extra9.default.symlink(sourcePath, targetPath);
|
|
34193
|
+
}
|
|
34194
|
+
return true;
|
|
34195
|
+
} catch (error) {
|
|
34196
|
+
console.error(source_default.red(options.errorPrefix || "Error creating symlink:"), error);
|
|
34197
|
+
throw error;
|
|
34198
|
+
}
|
|
34199
|
+
}
|
|
34200
|
+
|
|
34278
34201
|
// src/commands/symlink.ts
|
|
34279
34202
|
var TOOLS = [
|
|
34280
34203
|
{
|
|
34281
34204
|
name: "Claude Code",
|
|
34282
34205
|
value: "claude-code",
|
|
34283
|
-
supportsCommands:
|
|
34206
|
+
supportsCommands: false,
|
|
34284
34207
|
supportsAgents: true
|
|
34285
34208
|
},
|
|
34286
34209
|
{
|
|
34287
34210
|
name: "Codex",
|
|
34288
34211
|
value: "codex",
|
|
34289
|
-
supportsCommands:
|
|
34290
|
-
supportsAgents:
|
|
34212
|
+
supportsCommands: false,
|
|
34213
|
+
supportsAgents: true
|
|
34291
34214
|
},
|
|
34292
34215
|
{
|
|
34293
34216
|
name: "OpenCode",
|
|
34294
34217
|
value: "opencode",
|
|
34295
|
-
supportsCommands:
|
|
34218
|
+
supportsCommands: false,
|
|
34296
34219
|
supportsAgents: false
|
|
34297
34220
|
},
|
|
34298
34221
|
{
|
|
34299
34222
|
name: "FactoryAI",
|
|
34300
34223
|
value: "factoryai",
|
|
34301
|
-
supportsCommands:
|
|
34224
|
+
supportsCommands: false,
|
|
34302
34225
|
supportsAgents: true
|
|
34303
34226
|
}
|
|
34304
34227
|
];
|
|
@@ -34400,8 +34323,8 @@ async function symlinkCommand(params = {}) {
|
|
|
34400
34323
|
const customFolders = {
|
|
34401
34324
|
"claude-code": claudeDir,
|
|
34402
34325
|
codex: codexDir,
|
|
34403
|
-
opencode:
|
|
34404
|
-
factoryai:
|
|
34326
|
+
opencode: undefined,
|
|
34327
|
+
factoryai: undefined
|
|
34405
34328
|
};
|
|
34406
34329
|
const sourcePaths = await getToolPaths(sourceTool, customFolders[sourceTool]);
|
|
34407
34330
|
console.log(source_default.blue(`
|
|
@@ -35280,7 +35203,7 @@ async function copyAgentCategory(sourceCategoryDir, category, agentsDir, claudeD
|
|
|
35280
35203
|
continue;
|
|
35281
35204
|
}
|
|
35282
35205
|
await import_fs_extra10.default.copy(src, dst, { overwrite: true });
|
|
35283
|
-
await
|
|
35206
|
+
await applyPathPlaceholders(dst, claudeDir);
|
|
35284
35207
|
onProgress?.(`${category}/${entry.name}`, entry.isDirectory() ? "directory" : "file");
|
|
35285
35208
|
}
|
|
35286
35209
|
}
|
|
@@ -35451,19 +35374,9 @@ var API_URL = "https://codeline.app/api/products";
|
|
|
35451
35374
|
var PRODUCT_IDS = ["prd_XJVgxVPbGG", "prd_NKabAkdOkw"];
|
|
35452
35375
|
async function countInstalledItems(claudeDir) {
|
|
35453
35376
|
const counts = {
|
|
35454
|
-
commands: 0,
|
|
35455
35377
|
agents: 0,
|
|
35456
35378
|
skills: 0
|
|
35457
35379
|
};
|
|
35458
|
-
try {
|
|
35459
|
-
const commandsDir = path16.join(claudeDir, "commands");
|
|
35460
|
-
if (await import_fs_extra12.default.pathExists(commandsDir)) {
|
|
35461
|
-
const files = await import_fs_extra12.default.readdir(commandsDir);
|
|
35462
|
-
counts.commands = files.filter((f) => f.endsWith(".md")).length;
|
|
35463
|
-
}
|
|
35464
|
-
} catch (error) {
|
|
35465
|
-
console.error("Failed to count commands:", error instanceof Error ? error.message : error);
|
|
35466
|
-
}
|
|
35467
35380
|
try {
|
|
35468
35381
|
const agentsDir = path16.join(claudeDir, "agents");
|
|
35469
35382
|
if (await import_fs_extra12.default.pathExists(agentsDir)) {
|
|
@@ -35622,24 +35535,20 @@ async function proSetupCommand(options = {}) {
|
|
|
35622
35535
|
await updateSettings({
|
|
35623
35536
|
shellShortcuts: false,
|
|
35624
35537
|
customStatusline: true,
|
|
35625
|
-
aiblueprintCommands: false,
|
|
35626
35538
|
aiblueprintAgents: false,
|
|
35627
35539
|
aiblueprintSkills: false,
|
|
35628
|
-
|
|
35629
|
-
openCodeSymlink: false
|
|
35540
|
+
installCodex: false
|
|
35630
35541
|
}, claudeDir);
|
|
35631
35542
|
spinner.stop("Settings.json updated");
|
|
35632
35543
|
spinner.start("Counting installed items...");
|
|
35633
35544
|
const counts = await countInstalledItems(claudeDir);
|
|
35634
35545
|
spinner.stop("Installation summary ready");
|
|
35635
35546
|
trackEvent("pro-setup", {
|
|
35636
|
-
commands: counts.commands,
|
|
35637
35547
|
agents: counts.agents,
|
|
35638
35548
|
skills: counts.skills
|
|
35639
35549
|
});
|
|
35640
35550
|
M2.success("✅ Setup complete!");
|
|
35641
35551
|
M2.info("Installed:");
|
|
35642
|
-
M2.info(` • Commands (${counts.commands})`);
|
|
35643
35552
|
M2.info(` • Agents (${counts.agents})`);
|
|
35644
35553
|
M2.info(` • Premium Skills (${counts.skills})`);
|
|
35645
35554
|
M2.info(" • Premium statusline (advanced)");
|
|
@@ -35908,7 +35817,6 @@ async function analyzeCategory(category, claudeDir, agentsDir, githubToken) {
|
|
|
35908
35817
|
async function analyzeSyncChanges(claudeDir, githubToken, agentsDir) {
|
|
35909
35818
|
const allItems = [];
|
|
35910
35819
|
const categories = [
|
|
35911
|
-
"commands",
|
|
35912
35820
|
"agents",
|
|
35913
35821
|
"skills",
|
|
35914
35822
|
"scripts"
|
|
@@ -36908,14 +36816,13 @@ var packageJson = JSON.parse(readFileSync3(join2(__dirname3, "../package.json"),
|
|
|
36908
36816
|
var program2 = new Command;
|
|
36909
36817
|
program2.name("aiblueprint").description("AIBlueprint CLI for setting up AI coding configurations").version(packageJson.version);
|
|
36910
36818
|
function registerAgentsCommands(cmd) {
|
|
36911
|
-
cmd.option("-f, --folder <path>", "Root folder that contains .claude/, .codex/, .agents/ (default: $HOME)").option("--claudeCodeFolder <path>", "Override Claude Code folder (default: {folder}/.claude)").option("--codexFolder <path>", "Override Codex folder (default: {folder}/.codex)").option("--
|
|
36819
|
+
cmd.option("-f, --folder <path>", "Root folder that contains .claude/, .codex/, .agents/ (default: $HOME)").option("--claudeCodeFolder <path>", "Override Claude Code folder (default: {folder}/.claude)").option("--codexFolder <path>", "Override Codex folder (default: {folder}/.codex)").option("--agentsFolder <path>", "Override shared agents folder (default: {folder}/.agents)").option("-s, --skip", "Skip interactive prompts and install all features");
|
|
36912
36820
|
cmd.command("setup").description("Setup AI coding configuration with AIBlueprint defaults").action((options, command) => {
|
|
36913
36821
|
const parentOptions = command.parent.opts();
|
|
36914
36822
|
setupCommand({
|
|
36915
36823
|
folder: parentOptions.folder,
|
|
36916
36824
|
claudeCodeFolder: parentOptions.claudeCodeFolder,
|
|
36917
36825
|
codexFolder: parentOptions.codexFolder,
|
|
36918
|
-
openCodeFolder: parentOptions.openCodeFolder,
|
|
36919
36826
|
agentsFolder: parentOptions.agentsFolder,
|
|
36920
36827
|
skipInteractive: parentOptions.skip
|
|
36921
36828
|
});
|
|
@@ -36932,9 +36839,7 @@ function registerAgentsCommands(cmd) {
|
|
|
36932
36839
|
symlinkCommand({
|
|
36933
36840
|
folder: parentOptions.folder,
|
|
36934
36841
|
claudeCodeFolder: parentOptions.claudeCodeFolder,
|
|
36935
|
-
codexFolder: parentOptions.codexFolder
|
|
36936
|
-
openCodeFolder: parentOptions.openCodeFolder,
|
|
36937
|
-
factoryAiFolder: parentOptions.factoryAiFolder
|
|
36842
|
+
codexFolder: parentOptions.codexFolder
|
|
36938
36843
|
});
|
|
36939
36844
|
});
|
|
36940
36845
|
const proCmd = cmd.command("pro").description("Manage AIBlueprint CLI Premium features");
|