claude-code-autoconfig 1.0.137 → 1.0.139

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.
@@ -1263,7 +1263,7 @@
1263
1263
  title: '.claude/ Directory',
1264
1264
  desc: 'Commands, rules, settings, and these docs. Keeps configuration organized as your project grows.'
1265
1265
  },
1266
- 'rules': {
1266
+ 'rules': {
1267
1267
  title: 'rules/',
1268
1268
  desc: 'Path-scoped context that loads when Claude works on matching files.'
1269
1269
  },
@@ -1305,7 +1305,7 @@
1305
1305
  },
1306
1306
  'gls': {
1307
1307
  title: 'gls.md',
1308
- desc: 'gls.md in commands/',
1308
+ desc: 'gls.md in commands/<div style="margin-top: 10px;"><strong>Usage:</strong><ul style="margin: 6px 0 0 0; padding-left: 20px; list-style: disc;"><li><code>/gls</code> - Get and display the most recent screenshot</li><li><code>/gls-2</code> - Get and display the 2 most recent screenshots</li><li><code>/gls-3</code> - Get and display the 3 most recent screenshots</li><li><code>/gls-N</code> - Get and display the N most recent screenshots</li><li><code>/gls /path/to/dir</code> - Use a specific directory and save it</li></ul></div>',
1309
1309
  trigger: '/gls'
1310
1310
  },
1311
1311
  'publish': {
@@ -1315,7 +1315,7 @@
1315
1315
  },
1316
1316
  'recover-context': {
1317
1317
  title: 'recover-context.md',
1318
- desc: 'Recovers conversation context from the session transcript after compaction.\n\nUsage: /recover-context -60 (last 60 min), -30 (last 30 min), -120 (last 2 hrs).\nAdd --show to open the transcript in your editor.\nThe number works with or without the leading dash.',
1318
+ desc: 'Recovers conversation context from the session transcript after compaction.<div style="margin-top: 10px;"><strong>Usage:</strong><ul style="margin: 6px 0 0 0; padding-left: 20px; list-style: disc;"><li><code>/recover-context -60</code> last 60 minutes of conversation</li><li><code>/recover-context 60</code> — same thing (dash is optional)</li><li><code>/recover-context -30</code> last 30 minutes</li><li><code>/recover-context -120</code> last 2 hours</li><li><code>/recover-context -60 --show</code> same as above, but also opens the filtered transcript in default editor</li></ul></div>',
1319
1319
  trigger: '/recover-context'
1320
1320
  },
1321
1321
  'show-docs': {
@@ -1569,7 +1569,7 @@ CRITICAL: A plausible-looking cause from code reading is NOT confirmed evidence.
1569
1569
 
1570
1570
  > Run \`/autoconfig\` to populate this based on your project.`
1571
1571
  },
1572
- 'autoconfig-update': {
1572
+ 'autoconfig-update': {
1573
1573
  filename: 'autoconfig-update.md',
1574
1574
  content: `<!-- @applied
1575
1575
  -->
@@ -1760,11 +1760,12 @@ Run tests, bump the patch version, commit, push, and publish to npm.
1760
1760
 
1761
1761
  Usage:
1762
1762
  - \`/recover-context -60\` — last 60 minutes of conversation
1763
+ - \`/recover-context 60\` — same thing (dash is optional)
1763
1764
  - \`/recover-context -30\` — last 30 minutes
1764
1765
  - \`/recover-context -120\` — last 2 hours
1765
1766
  - \`/recover-context -60 --show\` — same as above, but also opens the filtered transcript in default editor
1766
1767
 
1767
- The negative number means "go back N minutes from now." The minutes argument is **required**.
1768
+ The number means "go back N minutes from now." The leading dash is optional. The minutes argument is **required**.
1768
1769
 
1769
1770
  ## Step 1: Parse the arguments
1770
1771
 
@@ -2084,6 +2085,8 @@ Claude reads this file but must never write to it. When Claude discovers project
2084
2085
  "Grep",
2085
2086
  "WebSearch",
2086
2087
  "WebFetch",
2088
+ "Bash(npm test)",
2089
+ "Bash(npm test *)",
2087
2090
  "Bash(npm run dev)",
2088
2091
  "Bash(npm run build)",
2089
2092
  "Bash(npm run lint)",
@@ -2093,23 +2096,25 @@ Claude reads this file but must never write to it. When Claude discovers project
2093
2096
  "Bash(npm run test:*)",
2094
2097
  "Bash(npm run validate)",
2095
2098
  "Bash(git status)",
2096
- "Bash(git diff:*)",
2097
- "Bash(git add:*)",
2098
- "Bash(git commit:*)",
2099
- "Bash(git push:*)",
2099
+ "Bash(git status *)",
2100
+ "Bash(git diff *)",
2101
+ "Bash(git add *)",
2102
+ "Bash(git commit *)",
2103
+ "Bash(git push *)",
2100
2104
  "Bash(git pull)",
2101
- "Bash(git checkout:*)",
2102
- "Bash(git branch:*)",
2103
- "Bash(ls:*)",
2104
- "Bash(dir:*)",
2105
- "Bash(mkdir:*)",
2106
- "Bash(mkdir -p:*)",
2107
- "Bash(start:*)",
2108
- "Bash(start .claude:*)",
2109
- "Bash(open:*)",
2110
- "Bash(open .claude:*)",
2111
- "Bash(xdg-open:*)",
2112
- "Bash(xdg-open .claude:*)"
2105
+ "Bash(git pull *)",
2106
+ "Bash(git checkout *)",
2107
+ "Bash(git branch *)",
2108
+ "Bash(ls *)",
2109
+ "Bash(dir *)",
2110
+ "Bash(mkdir *)",
2111
+ "Bash(mkdir -p *)",
2112
+ "Bash(start *)",
2113
+ "Bash(start .claude *)",
2114
+ "Bash(open *)",
2115
+ "Bash(open .claude *)",
2116
+ "Bash(xdg-open *)",
2117
+ "Bash(xdg-open .claude *)"
2113
2118
  ],
2114
2119
  "deny": [
2115
2120
  "Read(./.env)",
@@ -2118,9 +2123,9 @@ Claude reads this file but must never write to it. When Claude discovers project
2118
2123
  "Read(./**/credentials.*)",
2119
2124
  "Read(./**/*.pem)",
2120
2125
  "Read(./**/*.key)",
2121
- "Bash(rm -rf:*)",
2122
- "Bash(curl:*)",
2123
- "Bash(wget:*)"
2126
+ "Bash(rm -rf *)",
2127
+ "Bash(curl *)",
2128
+ "Bash(wget *)"
2124
2129
  ]
2125
2130
  }
2126
2131
  }`
@@ -81,6 +81,36 @@ function extractDescription(content, ext) {
81
81
  return null;
82
82
  }
83
83
 
84
+ /**
85
+ * Extract usage lines from a command file's content.
86
+ * Looks for a "Usage:" section and returns HTML-formatted usage list.
87
+ */
88
+ function extractUsage(content) {
89
+ const lines = content.split(/\r?\n/);
90
+ const usageIdx = lines.findIndex(l => /^Usage:$/i.test(l.trim()));
91
+ if (usageIdx === -1) return null;
92
+
93
+ const usageLines = [];
94
+ for (let i = usageIdx + 1; i < lines.length; i++) {
95
+ const line = lines[i].trim();
96
+ if (line.startsWith('- ')) {
97
+ // Convert markdown backticks to <code> tags and strip leading "- "
98
+ const item = line.slice(2)
99
+ .replace(/`([^`]+)`/g, '<code>$1</code>');
100
+ usageLines.push(item);
101
+ } else if (line === '') {
102
+ continue; // skip blank lines within usage block
103
+ } else {
104
+ break; // end of usage block
105
+ }
106
+ }
107
+ if (usageLines.length === 0) return null;
108
+
109
+ // Build an HTML list
110
+ const listItems = usageLines.map(l => `<li>${l}</li>`).join('');
111
+ return `<div style="margin-top: 10px;"><strong>Usage:</strong><ul style="margin: 6px 0 0 0; padding-left: 20px; list-style: disc;">${listItems}</ul></div>`;
112
+ }
113
+
84
114
  /**
85
115
  * Extract @trigger from a JS file's JSDoc.
86
116
  */
@@ -170,8 +200,9 @@ function scanFiles() {
170
200
  const desc = extractDescription(content, ext) || `${file} in ${folder}/`;
171
201
  const trigger = deriveTrigger(folder, file, content);
172
202
  const preview = generatePreview(content, ext);
203
+ const usage = (folder === 'commands') ? extractUsage(content) : null;
173
204
 
174
- entries.push({ key, folder, file, desc, trigger, preview });
205
+ entries.push({ key, folder, file, desc, trigger, preview, usage });
175
206
  }
176
207
  }
177
208
 
@@ -317,7 +348,11 @@ function generateTreeInfo(entries) {
317
348
  for (const entry of entries) {
318
349
  if (entry.isEmptyFolder) continue;
319
350
 
320
- const escapedDesc = entry.desc.replace(/'/g, "\\'");
351
+ let fullDesc = entry.desc;
352
+ if (entry.usage) {
353
+ fullDesc += entry.usage;
354
+ }
355
+ const escapedDesc = fullDesc.replace(/'/g, "\\'");
321
356
  lines.push(` '${entry.key}': {`);
322
357
  lines.push(` title: '${entry.file}',`);
323
358
  lines.push(` desc: '${escapedDesc}'${entry.trigger ? ',' : ''}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "claude-code-autoconfig",
3
- "version": "1.0.137",
3
+ "version": "1.0.139",
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",