claude-code-autoconfig 1.0.88 → 1.0.89
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.js +44 -15
- package/package.json +1 -1
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
|
-
//
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
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
|
-
|
|
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',
|
|
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
|
|
413
|
-
const claude = spawn('claude', [
|
|
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(
|
|
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.
|
|
3
|
+
"version": "1.0.89",
|
|
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",
|