context-engineer 1.3.0 → 1.3.1

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/bin/cli.mjs CHANGED
@@ -27,6 +27,8 @@ function parseFlags(args) {
27
27
  flags.dryRun = true;
28
28
  } else if (arg === '--check') {
29
29
  flags.check = true;
30
+ } else if (arg === '--yes' || arg === '-y') {
31
+ flags.yes = true;
30
32
  }
31
33
  }
32
34
  return flags;
@@ -46,10 +48,12 @@ function printHelp() {
46
48
  --dir <path> Target directory (default: current directory)
47
49
  --force Overwrite existing files without asking
48
50
  --dry-run Show what would be installed without writing
51
+ --yes, -y Auto-confirm all prompts
49
52
 
50
53
  Update options:
51
54
  --check Only check for updates, don't apply
52
55
  --force Overwrite all files including customized ones
56
+ --yes, -y Auto-confirm all prompts
53
57
 
54
58
  Examples:
55
59
  npx context-engineer init
package/lib/prompts.mjs CHANGED
@@ -9,8 +9,17 @@ function createRL() {
9
9
 
10
10
  /**
11
11
  * Ask a yes/no question. Returns true for yes.
12
+ * In non-TTY environments (piped input, Claude Code Bash tool, CI),
13
+ * auto-resolves to the default without waiting for input.
12
14
  */
13
15
  export async function confirm(message, defaultYes = true) {
16
+ // Non-interactive environment: auto-confirm with default
17
+ if (!process.stdin.isTTY) {
18
+ const suffix = defaultYes ? '[Y/n]' : '[y/N]';
19
+ console.log(` ${message} ${suffix} ${defaultYes ? 'Y' : 'N'} (auto, non-interactive)`);
20
+ return defaultYes;
21
+ }
22
+
14
23
  const rl = createRL();
15
24
  const suffix = defaultYes ? '[Y/n]' : '[y/N]';
16
25
  return new Promise((resolve) => {
package/lib/update.mjs CHANGED
@@ -65,7 +65,7 @@ function saveInstalledChecksums(targetDir, checksums) {
65
65
 
66
66
  export async function runUpdate(flags) {
67
67
  const targetDir = flags.dir || process.cwd();
68
- const { force = false, check = false } = flags;
68
+ const { force = false, check = false, yes = false } = flags;
69
69
 
70
70
  console.log(`\n context-engineer v${PKG.version}`);
71
71
  console.log(' Checking for updates...\n');
@@ -171,7 +171,7 @@ export async function runUpdate(flags) {
171
171
  }
172
172
 
173
173
  // Confirm
174
- const proceed = force || (await confirm(`Apply ${totalUpdates} update(s)?`));
174
+ const proceed = force || yes || (await confirm(`Apply ${totalUpdates} update(s)?`));
175
175
  if (!proceed) {
176
176
  console.log(' Cancelled.\n');
177
177
  return;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "context-engineer",
3
- "version": "1.3.0",
3
+ "version": "1.3.1",
4
4
  "description": "Structured context management for AI coding agents. One command to install the .context/ system into any project.",
5
5
  "type": "module",
6
6
  "bin": {