aiblueprint-cli 1.4.77 → 1.4.78

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 (3) hide show
  1. package/README.md +2 -0
  2. package/dist/cli.js +81 -20
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -132,6 +132,8 @@ npx aiblueprint-cli@latest agents config unify sessions
132
132
 
133
133
  - `cc` - Claude Code with permissions skipped
134
134
  - `ccc` - Claude Code with continue mode
135
+ - `cx` - Codex
136
+ - `cxc` - Codex continue mode for the current directory
135
137
 
136
138
  ### Skills
137
139
 
package/dist/cli.js CHANGED
@@ -32764,18 +32764,84 @@ import { dirname as dirname2 } from "path";
32764
32764
  var import_fs_extra = __toESM(require_lib4(), 1);
32765
32765
  import path2 from "path";
32766
32766
  import os3 from "os";
32767
+ var BEGIN_MARKER = "# BEGIN AIBlueprint shell shortcuts";
32768
+ var END_MARKER = "# END AIBlueprint shell shortcuts";
32769
+ var POSIX_COMMAND_LINES = [
32770
+ 'alias cc="claude --dangerously-skip-permissions"',
32771
+ 'alias ccc="claude --dangerously-skip-permissions -c"',
32772
+ 'alias cx="codex"',
32773
+ 'alias cxc="codex resume --last"'
32774
+ ];
32775
+ var POWERSHELL_COMMAND_LINES = [
32776
+ "function cc { claude --dangerously-skip-permissions $args }",
32777
+ "function ccc { claude --dangerously-skip-permissions -c $args }",
32778
+ "function cx { codex $args }",
32779
+ "function cxc { codex resume --last $args }"
32780
+ ];
32781
+ var POSIX_SHORTCUT_BLOCK = {
32782
+ legacyHeaders: [
32783
+ "# AIBlueprint Claude Code aliases",
32784
+ "# AIBlueprint Codex aliases"
32785
+ ],
32786
+ commandLines: POSIX_COMMAND_LINES,
32787
+ lines: [
32788
+ BEGIN_MARKER,
32789
+ "# Claude Code",
32790
+ POSIX_COMMAND_LINES[0],
32791
+ POSIX_COMMAND_LINES[1],
32792
+ "# Codex",
32793
+ POSIX_COMMAND_LINES[2],
32794
+ POSIX_COMMAND_LINES[3],
32795
+ END_MARKER
32796
+ ]
32797
+ };
32798
+ var POWERSHELL_SHORTCUT_BLOCK = {
32799
+ legacyHeaders: [
32800
+ "# AIBlueprint Claude Code shortcuts",
32801
+ "# AIBlueprint Codex shortcuts"
32802
+ ],
32803
+ commandLines: POWERSHELL_COMMAND_LINES,
32804
+ lines: [
32805
+ BEGIN_MARKER,
32806
+ "# Claude Code",
32807
+ POWERSHELL_COMMAND_LINES[0],
32808
+ POWERSHELL_COMMAND_LINES[1],
32809
+ "# Codex",
32810
+ POWERSHELL_COMMAND_LINES[2],
32811
+ POWERSHELL_COMMAND_LINES[3],
32812
+ END_MARKER
32813
+ ]
32814
+ };
32815
+ function escapeRegExp(value) {
32816
+ return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
32817
+ }
32818
+ function detectEol(content) {
32819
+ return content.includes(`\r
32820
+ `) ? `\r
32821
+ ` : `
32822
+ `;
32823
+ }
32824
+ function upsertShortcutBlock(existingContent, shortcutBlock) {
32825
+ const eol = detectEol(existingContent);
32826
+ const managedBlockPattern = new RegExp(`${escapeRegExp(BEGIN_MARKER)}[\\s\\S]*?${escapeRegExp(END_MARKER)}\\r?\\n?`, "g");
32827
+ const removableLegacyLines = new Set([
32828
+ ...shortcutBlock.legacyHeaders,
32829
+ ...shortcutBlock.commandLines
32830
+ ]);
32831
+ const existingWithoutManagedBlock = existingContent.replace(managedBlockPattern, "");
32832
+ const existingLines = existingWithoutManagedBlock.split(/\r?\n/).filter((line) => !removableLegacyLines.has(line.trim()));
32833
+ const baseContent = existingLines.join(eol).trimEnd();
32834
+ const blockContent = shortcutBlock.lines.join(eol);
32835
+ return `${baseContent}${baseContent ? `${eol}${eol}` : ""}${blockContent}${eol}`;
32836
+ }
32767
32837
  async function setupShellShortcuts() {
32768
32838
  try {
32769
32839
  const platform = os3.platform();
32770
32840
  let shellConfigFile;
32771
- let aliases;
32841
+ let shortcutBlock;
32772
32842
  if (platform === "darwin") {
32773
32843
  shellConfigFile = path2.join(os3.homedir(), ".zshenv");
32774
- aliases = `
32775
- # AIBlueprint Claude Code aliases
32776
- alias cc="claude --dangerously-skip-permissions"
32777
- alias ccc="claude --dangerously-skip-permissions -c"
32778
- `;
32844
+ shortcutBlock = POSIX_SHORTCUT_BLOCK;
32779
32845
  } else if (platform === "linux") {
32780
32846
  const shell = process.env.SHELL || "";
32781
32847
  if (shell.includes("zsh")) {
@@ -32783,11 +32849,7 @@ alias ccc="claude --dangerously-skip-permissions -c"
32783
32849
  } else {
32784
32850
  shellConfigFile = path2.join(os3.homedir(), ".bashrc");
32785
32851
  }
32786
- aliases = `
32787
- # AIBlueprint Claude Code aliases
32788
- alias cc="claude --dangerously-skip-permissions"
32789
- alias ccc="claude --dangerously-skip-permissions -c"
32790
- `;
32852
+ shortcutBlock = POSIX_SHORTCUT_BLOCK;
32791
32853
  } else if (platform === "win32") {
32792
32854
  const pwshProfileDir = path2.join(os3.homedir(), "Documents", "PowerShell");
32793
32855
  const windowsPwshProfileDir = path2.join(os3.homedir(), "Documents", "WindowsPowerShell");
@@ -32801,18 +32863,15 @@ alias ccc="claude --dangerously-skip-permissions -c"
32801
32863
  await import_fs_extra.default.ensureDir(profileDir);
32802
32864
  }
32803
32865
  shellConfigFile = path2.join(profileDir, "Profile.ps1");
32804
- aliases = `
32805
- # AIBlueprint Claude Code shortcuts
32806
- function cc { claude --dangerously-skip-permissions $args }
32807
- function ccc { claude --dangerously-skip-permissions -c $args }
32808
- `;
32866
+ shortcutBlock = POWERSHELL_SHORTCUT_BLOCK;
32809
32867
  } else {
32810
32868
  console.log(source_default.yellow(`Shell shortcuts are not supported on platform: ${platform}`));
32811
32869
  return;
32812
32870
  }
32813
32871
  const existingContent = await import_fs_extra.default.readFile(shellConfigFile, "utf-8").catch(() => "");
32814
- if (!existingContent.includes("AIBlueprint Claude Code")) {
32815
- await import_fs_extra.default.appendFile(shellConfigFile, aliases);
32872
+ const nextContent = upsertShortcutBlock(existingContent, shortcutBlock);
32873
+ if (nextContent !== existingContent) {
32874
+ await import_fs_extra.default.writeFile(shellConfigFile, nextContent);
32816
32875
  }
32817
32876
  } catch (error) {
32818
32877
  console.error(source_default.red("Error setting up shell shortcuts:"), error);
@@ -34240,7 +34299,7 @@ async function setupCommand(params = {}) {
34240
34299
  choices: [
34241
34300
  {
34242
34301
  value: "shellShortcuts",
34243
- name: "Shell shortcuts (cc, ccc aliases) - Quick access to Claude Code",
34302
+ name: "Shell shortcuts (cc, ccc, cx, cxc aliases) - Quick access to Claude Code and Codex",
34244
34303
  checked: true
34245
34304
  },
34246
34305
  {
@@ -34440,6 +34499,8 @@ Next steps:`));
34440
34499
  }
34441
34500
  console.log(source_default.gray(' • Use "cc" for Claude Code with permissions skipped'));
34442
34501
  console.log(source_default.gray(' • Use "ccc" for Claude Code with permissions skipped and continue mode'));
34502
+ console.log(source_default.gray(' • Use "cx" to launch Codex'));
34503
+ console.log(source_default.gray(' • Use "cxc" to continue the latest Codex session for this directory'));
34443
34504
  }
34444
34505
  console.log(source_default.gray(' • Run "claude" to start using Claude Code with your new configuration'));
34445
34506
  console.log(source_default.blue(`
@@ -38011,7 +38072,7 @@ async function proSetupCommand(options = {}) {
38011
38072
  M2.info(` • Agents (${counts.agents})`);
38012
38073
  M2.info(` • Premium Skills (${counts.skills})`);
38013
38074
  M2.info(" • Premium statusline (advanced)");
38014
- M2.info(" • Shell shortcuts (cc, ccc)");
38075
+ M2.info(" • Shell shortcuts (cc, ccc, cx, cxc)");
38015
38076
  M2.info(" • Settings.json with statusline");
38016
38077
  Se(source_default.green("\uD83D\uDE80 Ready to use!"));
38017
38078
  } catch (error) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aiblueprint-cli",
3
- "version": "1.4.77",
3
+ "version": "1.4.78",
4
4
  "description": "AIBlueprint CLI for setting up AI coding configurations",
5
5
  "author": "AIBlueprint",
6
6
  "license": "MIT",