claude-code-autoconfig 1.0.86 → 1.0.88
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/.claude/commands/autoconfig.md +7 -4
- package/bin/cli.js +30 -5
- package/package.json +2 -1
- package/.claude/commands/gls.md +0 -21
|
@@ -309,14 +309,17 @@ NEVER guess the root cause and jump to coding a fix. Ask yourself: is the cause
|
|
|
309
309
|
|
|
310
310
|
## Step 8: Update the Docs
|
|
311
311
|
|
|
312
|
-
After populating CLAUDE.md, update the docs file
|
|
312
|
+
After populating CLAUDE.md, update the docs file previews to show actual project content:
|
|
313
313
|
|
|
314
314
|
1. Open `.claude/docs/autoconfig.docs.html`
|
|
315
|
-
2. Find the `fileContents` JavaScript object
|
|
316
|
-
3.
|
|
315
|
+
2. Find the `fileContents` JavaScript object
|
|
316
|
+
3. Update these entries with the real content just generated:
|
|
317
|
+
- `'claude-md'` → the CLAUDE.md content from Step 3
|
|
318
|
+
- `'memory-md'` → the MEMORY.md content from Step 7
|
|
319
|
+
- `'settings'` → the settings.json content from Step 6
|
|
317
320
|
4. Use template literal syntax and escape any backticks in the content
|
|
318
321
|
|
|
319
|
-
This ensures double-clicking
|
|
322
|
+
This ensures double-clicking these files in the docs shows real project content, not stale placeholders.
|
|
320
323
|
|
|
321
324
|
## After Completion
|
|
322
325
|
|
package/bin/cli.js
CHANGED
|
@@ -152,6 +152,8 @@ if (process.argv.includes('--pull-updates')) {
|
|
|
152
152
|
process.exit(0);
|
|
153
153
|
}
|
|
154
154
|
|
|
155
|
+
const forceMode = process.argv.includes('--force');
|
|
156
|
+
|
|
155
157
|
console.log('\x1b[36m%s\x1b[0m', '🚀 Claude Code Autoconfig');
|
|
156
158
|
console.log();
|
|
157
159
|
|
|
@@ -317,6 +319,21 @@ function copyDir(src, dest) {
|
|
|
317
319
|
}
|
|
318
320
|
}
|
|
319
321
|
|
|
322
|
+
function copyDirIfMissing(src, dest) {
|
|
323
|
+
fs.mkdirSync(dest, { recursive: true });
|
|
324
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
325
|
+
for (const entry of entries) {
|
|
326
|
+
if (isReservedName(entry.name)) continue;
|
|
327
|
+
const srcPath = path.join(src, entry.name);
|
|
328
|
+
const destPath = path.join(dest, entry.name);
|
|
329
|
+
if (entry.isDirectory()) {
|
|
330
|
+
copyDirIfMissing(srcPath, destPath);
|
|
331
|
+
} else if (!fs.existsSync(destPath)) {
|
|
332
|
+
fs.copyFileSync(srcPath, destPath);
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
|
|
320
337
|
// Copy commands (required for /autoconfig to work)
|
|
321
338
|
if (fs.existsSync(commandsSrc)) {
|
|
322
339
|
copyDir(commandsSrc, path.join(claudeDest, 'commands'));
|
|
@@ -335,20 +352,28 @@ if (fs.existsSync(agentsSrc)) {
|
|
|
335
352
|
copyDir(agentsSrc, path.join(claudeDest, 'agents'));
|
|
336
353
|
}
|
|
337
354
|
|
|
338
|
-
// Copy feedback template
|
|
355
|
+
// Copy feedback template (preserve user customizations unless --force)
|
|
339
356
|
if (fs.existsSync(feedbackSrc)) {
|
|
340
|
-
copyDir
|
|
357
|
+
const copyFn = forceMode ? copyDir : copyDirIfMissing;
|
|
358
|
+
copyFn(feedbackSrc, path.join(claudeDest, 'feedback'));
|
|
341
359
|
}
|
|
342
360
|
|
|
343
|
-
// Copy hooks directory (
|
|
361
|
+
// Copy hooks directory (preserve user customizations unless --force)
|
|
344
362
|
if (fs.existsSync(hooksSrc)) {
|
|
345
|
-
copyDir
|
|
363
|
+
const copyFn = forceMode ? copyDir : copyDirIfMissing;
|
|
364
|
+
copyFn(hooksSrc, path.join(claudeDest, 'hooks'));
|
|
365
|
+
}
|
|
366
|
+
|
|
367
|
+
// Copy updates directory (new update files only, never overwrite existing)
|
|
368
|
+
const updatesSrc = path.join(packageDir, '.claude', 'updates');
|
|
369
|
+
if (fs.existsSync(updatesSrc)) {
|
|
370
|
+
copyDirIfMissing(updatesSrc, path.join(claudeDest, 'updates'));
|
|
346
371
|
}
|
|
347
372
|
|
|
348
373
|
// Copy settings.json (only if user doesn't have one - preserves existing config)
|
|
349
374
|
const settingsSrc = path.join(packageDir, '.claude', 'settings.json');
|
|
350
375
|
const settingsDest = path.join(claudeDest, 'settings.json');
|
|
351
|
-
if (fs.existsSync(settingsSrc) && !fs.existsSync(settingsDest)) {
|
|
376
|
+
if (fs.existsSync(settingsSrc) && (forceMode || !fs.existsSync(settingsDest))) {
|
|
352
377
|
fs.copyFileSync(settingsSrc, settingsDest);
|
|
353
378
|
}
|
|
354
379
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-autoconfig",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.88",
|
|
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",
|
|
@@ -35,6 +35,7 @@
|
|
|
35
35
|
".claude",
|
|
36
36
|
"!.claude/settings.local.json",
|
|
37
37
|
"!.claude/commands/publish.md",
|
|
38
|
+
"!.claude/commands/gls.md",
|
|
38
39
|
"CLAUDE.md"
|
|
39
40
|
],
|
|
40
41
|
"engines": {
|
package/.claude/commands/gls.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
Get the latest screenshot(s) from the Screenshots folder and display them.
|
|
2
|
-
|
|
3
|
-
Usage:
|
|
4
|
-
- `/gls` - Get and display the most recent screenshot
|
|
5
|
-
- `/gls-2` - Get and display the 2 most recent screenshots
|
|
6
|
-
- `/gls-3` - Get and display the 3 most recent screenshots
|
|
7
|
-
- `/gls-N` - Get and display the N most recent screenshots
|
|
8
|
-
|
|
9
|
-
Screenshot directory: `C:\Users\andre\OneDrive\Pictures\Screenshots 1`
|
|
10
|
-
|
|
11
|
-
Workflow:
|
|
12
|
-
1. List all files in the screenshots directory sorted by modification time (newest first)
|
|
13
|
-
2. If command is `/gls`, get the most recent screenshot (1 file)
|
|
14
|
-
3. If command is `/gls-N` (e.g., `/gls-2`), get the N most recent screenshots
|
|
15
|
-
4. Use the Read tool to display each screenshot
|
|
16
|
-
5. Wait for the user to tell you what to do with the screenshot(s)
|
|
17
|
-
|
|
18
|
-
Important:
|
|
19
|
-
- Always use the Read tool to display screenshots (not Bash cat/echo)
|
|
20
|
-
- Display screenshots in order from newest to oldest
|
|
21
|
-
- After displaying, wait for user instructions - don't make assumptions about what they want done with the screenshots
|