claude-code-autoconfig 1.0.88 → 1.0.90

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.
@@ -7,6 +7,12 @@
7
7
 
8
8
  Add the following to the user's `MEMORY.md` file (Claude's persistent auto memory). This ensures the debugging methodology is always loaded into Claude's system prompt for every session.
9
9
 
10
+ ## Locate MEMORY.md
11
+
12
+ The file lives at `~/.claude/projects/{encoded-project-path}/memory/MEMORY.md` where the project path is encoded by replacing path separators with dashes and removing colons (e.g., `C:\CODE\my-project` becomes `C--CODE-my-project`).
13
+
14
+ **Important**: Do NOT write MEMORY.md to the project root. It must go in the Claude Code user directory above. Create the directory if it doesn't exist. Append if the file already exists.
15
+
10
16
  ## Content to Add
11
17
 
12
18
  ```markdown
package/bin/cli.js CHANGED
@@ -379,19 +379,48 @@ if (fs.existsSync(settingsSrc) && (forceMode || !fs.existsSync(settingsDest))) {
379
379
 
380
380
  console.log('\x1b[32m%s\x1b[0m', '✅ Prepared /autoconfig command');
381
381
 
382
- // Step 4: Show "READY TO CONFIGURE" message
383
- console.log();
384
- console.log('\x1b[33m╔════════════════════════════════════════════╗\x1b[0m');
385
- console.log('\x1b[33m║ ║\x1b[0m');
386
- console.log('\x1b[33m║\x1b[0m \x1b[33;1mREADY TO CONFIGURE\x1b[0m \x1b[33m║\x1b[0m');
387
- console.log('\x1b[33m║ ║\x1b[0m');
388
- console.log('\x1b[33m║\x1b[0m \x1b[36mPress ENTER to launch Claude and\x1b[0m \x1b[33m║\x1b[0m');
389
- console.log('\x1b[33m║\x1b[0m \x1b[36mauto-run /autoconfig\x1b[0m \x1b[33m║\x1b[0m');
390
- console.log('\x1b[33m║ ║\x1b[0m');
391
- console.log('\x1b[33m╚════════════════════════════════════════════╝\x1b[0m');
382
+ // Detect upgrade vs fresh install
383
+ const isUpgrade = (() => {
384
+ // Indicator 1: CLAUDE.md has autoconfig marker
385
+ const claudeMdPath = path.join(cwd, 'CLAUDE.md');
386
+ if (fs.existsSync(claudeMdPath)) {
387
+ const content = fs.readFileSync(claudeMdPath, 'utf8');
388
+ if (content.includes('AUTO-GENERATED BY /autoconfig')) return true;
389
+ }
390
+ // Indicator 2: docs HTML exists (unique autoconfig artifact)
391
+ const docsPath = path.join(claudeDest, 'docs', 'autoconfig.docs.html');
392
+ if (fs.existsSync(docsPath)) return true;
393
+ return false;
394
+ })();
395
+
396
+ const launchCommand = isUpgrade ? '/autoconfig-update' : '/autoconfig';
397
+
398
+ // Step 4: Show "READY" message
392
399
  console.log();
393
- console.log('\x1b[90m%s\x1b[0m', "You'll need to approve a few file prompts to complete the installation.");
400
+ if (isUpgrade) {
401
+ console.log('\x1b[33m╔════════════════════════════════════════════╗\x1b[0m');
402
+ console.log('\x1b[33m║ ║\x1b[0m');
403
+ console.log('\x1b[33m║\x1b[0m \x1b[33;1mREADY TO UPDATE\x1b[0m \x1b[33m║\x1b[0m');
404
+ console.log('\x1b[33m║ ║\x1b[0m');
405
+ console.log('\x1b[33m║\x1b[0m \x1b[36mPress ENTER to launch Claude and\x1b[0m \x1b[33m║\x1b[0m');
406
+ console.log('\x1b[33m║\x1b[0m \x1b[36mauto-run /autoconfig-update\x1b[0m \x1b[33m║\x1b[0m');
407
+ console.log('\x1b[33m║ ║\x1b[0m');
408
+ console.log('\x1b[33m╚════════════════════════════════════════════╝\x1b[0m');
409
+ } else {
410
+ console.log('\x1b[33m╔════════════════════════════════════════════╗\x1b[0m');
411
+ console.log('\x1b[33m║ ║\x1b[0m');
412
+ console.log('\x1b[33m║\x1b[0m \x1b[33;1mREADY TO CONFIGURE\x1b[0m \x1b[33m║\x1b[0m');
413
+ console.log('\x1b[33m║ ║\x1b[0m');
414
+ console.log('\x1b[33m║\x1b[0m \x1b[36mPress ENTER to launch Claude and\x1b[0m \x1b[33m║\x1b[0m');
415
+ console.log('\x1b[33m║\x1b[0m \x1b[36mauto-run /autoconfig\x1b[0m \x1b[33m║\x1b[0m');
416
+ console.log('\x1b[33m║ ║\x1b[0m');
417
+ console.log('\x1b[33m╚════════════════════════════════════════════╝\x1b[0m');
418
+ }
394
419
  console.log();
420
+ if (!isUpgrade) {
421
+ console.log('\x1b[90m%s\x1b[0m', "You'll need to approve a few file prompts to complete the installation.");
422
+ console.log();
423
+ }
395
424
 
396
425
  // Step 5: Wait for Enter, then launch Claude Code
397
426
  const rl = readline.createInterface({
@@ -403,14 +432,14 @@ rl.question('\x1b[90mPress ENTER to continue...\x1b[0m', () => {
403
432
  rl.close();
404
433
 
405
434
  console.log();
406
- console.log('\x1b[36m%s\x1b[0m', '🚀 Launching Claude Code with /autoconfig...');
435
+ console.log('\x1b[36m%s\x1b[0m', `🚀 Launching Claude Code with ${launchCommand}...`);
407
436
  console.log();
408
437
  console.log('\x1b[90m%s\x1b[0m', ' Heads up: Claude Code can take 30+ seconds to initialize.');
409
438
  console.log('\x1b[90m%s\x1b[0m', ' Please be patient while it loads.');
410
439
  console.log();
411
440
 
412
- // Spawn claude with /autoconfig - settings.json has pre-approved permissions
413
- const claude = spawn('claude', ['/autoconfig'], {
441
+ // Spawn claude with the appropriate command
442
+ const claude = spawn('claude', [launchCommand], {
414
443
  cwd: cwd,
415
444
  stdio: 'inherit',
416
445
  shell: true
@@ -418,7 +447,7 @@ rl.question('\x1b[90mPress ENTER to continue...\x1b[0m', () => {
418
447
 
419
448
  claude.on('error', (err) => {
420
449
  console.log('\x1b[31m%s\x1b[0m', '❌ Failed to launch Claude Code');
421
- console.log(' Run "claude" manually, then run /autoconfig');
450
+ console.log(` Run "claude" manually, then run ${launchCommand}`);
422
451
  });
423
452
 
424
453
  // Cleanup when Claude exits
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-autoconfig",
3
- "version": "1.0.88",
3
+ "version": "1.0.90",
4
4
  "description": "Intelligent, self-configuring setup for Claude Code. One command analyzes your project, configures Claude, and shows you what it did.",
5
5
  "author": "ADAC 1001 <info@adac1001.com>",
6
6
  "license": "MIT",