@wbern/claude-instructions 2.3.0 → 2.4.0

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/README.md CHANGED
@@ -82,6 +82,7 @@ This ensures commands are regenerated whenever anyone runs `npm install`, `pnpm
82
82
  | `--overwrite` | Overwrite conflicting files without prompting |
83
83
  | `--skip-on-conflict` | Skip conflicting files without prompting |
84
84
  | `--flags=beads,github` | Enable feature flags (beads, github, gitlab, etc.) |
85
+ | `--allowed-tools=Bash(git diff:*),Bash(git status:*)` | Pre-approve tools for commands (non-interactive mode) |
85
86
  | `--help, -h` | Show help message |
86
87
  | `--version, -v` | Show version number |
87
88
 
@@ -173,12 +174,6 @@ flowchart TB
173
174
  Ship --> Done([✅ Done])
174
175
  Show --> Done
175
176
  Ask --> Done
176
-
177
- style Start fill:#e1f5ff
178
- style Step1 fill:#fff4e6
179
- style Step2 fill:#e8f5e9
180
- style Step3 fill:#fce4ec
181
- style Done fill:#c8e6c9
182
177
  ```
183
178
 
184
179
  ## Available Commands
package/bin/cli.js CHANGED
@@ -523,6 +523,13 @@ var CLI_OPTIONS = [
523
523
  description: "Enable feature flags (beads, github, gitlab, etc.)",
524
524
  example: "--flags=beads,github"
525
525
  },
526
+ {
527
+ flag: "--allowed-tools",
528
+ key: "allowedTools",
529
+ type: "array",
530
+ description: "Pre-approve tools for commands (non-interactive mode)",
531
+ example: "--allowed-tools=Bash(git diff:*),Bash(git status:*)"
532
+ },
526
533
  {
527
534
  flag: "--include-contrib-commands",
528
535
  key: "includeContribCommands",
@@ -1140,6 +1147,7 @@ async function main(args) {
1140
1147
  commandPrefix = args.prefix ?? "";
1141
1148
  selectedCommands = args.commands;
1142
1149
  selectedFlags = args.flags ? v2.parse(FlagsSchema, args.flags) : void 0;
1150
+ selectedAllowedTools = args.allowedTools;
1143
1151
  if (args.updateExisting) {
1144
1152
  cachedExistingFiles = await checkExistingFiles(void 0, scope, {
1145
1153
  commandPrefix: commandPrefix || "",
@@ -1331,6 +1339,30 @@ async function main(args) {
1331
1339
  includeContribCommands: args?.includeContribCommands
1332
1340
  });
1333
1341
  const fullPath = scope === "project" ? `${process.cwd()}/.claude/commands` : `${os2.homedir()}/.claude/commands`;
1342
+ const isInteractiveMode = !args?.scope;
1343
+ let automationNote = "";
1344
+ if (isInteractiveMode) {
1345
+ const parts = ["npx @wbern/claude-instructions"];
1346
+ parts.push(`--scope=${scope}`);
1347
+ if (commandPrefix) {
1348
+ parts.push(`--prefix=${commandPrefix}`);
1349
+ }
1350
+ if (selectedFlags && selectedFlags.length > 0) {
1351
+ parts.push(`--flags=${selectedFlags.join(",")}`);
1352
+ }
1353
+ if (selectedCommands && selectedCommands.length > 0) {
1354
+ parts.push(`--commands=${selectedCommands.join(",")}`);
1355
+ }
1356
+ if (selectedAllowedTools && selectedAllowedTools.length > 0) {
1357
+ parts.push(
1358
+ `--allowed-tools=${selectedAllowedTools.join(",")}`
1359
+ );
1360
+ }
1361
+ automationNote = `
1362
+
1363
+ To automate this setup:
1364
+ ${parts.join(" ")}`;
1365
+ }
1334
1366
  outro(
1335
1367
  `Installed ${result.filesGenerated} commands to ${fullPath}
1336
1368
 
@@ -1342,7 +1374,7 @@ Try it out:
1342
1374
  /red 1 returns "1" \u2192 Write first failing test for your kata
1343
1375
  /green \u2192 Make it pass
1344
1376
 
1345
- See a full example: https://github.com/wbern/claude-instructions#example-conversations
1377
+ See a full example: https://github.com/wbern/claude-instructions#example-conversations${automationNote}
1346
1378
 
1347
1379
  Happy coding!`
1348
1380
  );
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@wbern/claude-instructions",
3
- "version": "2.3.0",
3
+ "version": "2.4.0",
4
4
  "description": "TDD workflow commands for Claude Code CLI",
5
5
  "type": "module",
6
6
  "bin": "./bin/cli.js",
package/src/README.md CHANGED
@@ -163,12 +163,6 @@ flowchart TB
163
163
  Ship --> Done([✅ Done])
164
164
  Show --> Done
165
165
  Ask --> Done
166
-
167
- style Start fill:#e1f5ff
168
- style Step1 fill:#fff4e6
169
- style Step2 fill:#e8f5e9
170
- style Step3 fill:#fce4ec
171
- style Done fill:#c8e6c9
172
166
  ```
173
167
 
174
168
  ## Available Commands