cc-safe-setup 12.7.0 → 13.0.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
@@ -6,7 +6,7 @@
6
6
 
7
7
  **One command to make Claude Code safe for autonomous operation.** [日本語](docs/README.ja.md)
8
8
 
9
- 8 built-in + 124 examples = **135 hooks**. 42 CLI commands. 561 tests. 5 languages. [**Hub**](https://yurukusa.github.io/cc-safe-setup/hub.html) · [Wizard](https://yurukusa.github.io/cc-safe-setup/wizard.html) · [Cheat Sheet](https://yurukusa.github.io/cc-safe-setup/hooks-cheatsheet.html) · [Builder](https://yurukusa.github.io/cc-safe-setup/builder.html) · [FAQ](https://yurukusa.github.io/cc-safe-setup/faq.html) · [Examples](https://yurukusa.github.io/cc-safe-setup/by-example.html) · [Matrix](https://yurukusa.github.io/cc-safe-setup/matrix.html) · [Playground](https://yurukusa.github.io/cc-hook-registry/playground.html)
9
+ 8 built-in + 124 examples = **137 hooks**. 42 CLI commands. 561 tests. 5 languages. [**Hub**](https://yurukusa.github.io/cc-safe-setup/hub.html) · [Wizard](https://yurukusa.github.io/cc-safe-setup/wizard.html) · [Cheat Sheet](https://yurukusa.github.io/cc-safe-setup/hooks-cheatsheet.html) · [Builder](https://yurukusa.github.io/cc-safe-setup/builder.html) · [FAQ](https://yurukusa.github.io/cc-safe-setup/faq.html) · [Examples](https://yurukusa.github.io/cc-safe-setup/by-example.html) · [Matrix](https://yurukusa.github.io/cc-safe-setup/matrix.html) · [Playground](https://yurukusa.github.io/cc-hook-registry/playground.html)
10
10
 
11
11
  ```bash
12
12
  npx cc-safe-setup
@@ -0,0 +1,18 @@
1
+ #!/bin/bash
2
+ # dotenv-validate.sh — Validate .env syntax after edits
3
+ # TRIGGER: PostToolUse MATCHER: "Edit|Write"
4
+ FILE=$(cat | jq -r '.tool_input.file_path // empty' 2>/dev/null)
5
+ [ -z "$FILE" ] && exit 0
6
+ case "$FILE" in *.env|*.env.*) ;; *) exit 0 ;; esac
7
+ [ ! -f "$FILE" ] && exit 0
8
+ # Check for common .env syntax errors
9
+ ERRORS=0
10
+ while IFS= read -r line; do
11
+ [ -z "$line" ] || [[ "$line" =~ ^# ]] && continue
12
+ if ! echo "$line" | grep -qE '^[A-Z_][A-Z0-9_]*='; then
13
+ echo "WARNING: Invalid .env line: $line" >&2
14
+ ERRORS=$((ERRORS+1))
15
+ fi
16
+ done < "$FILE"
17
+ [ "$ERRORS" -gt 0 ] && echo "$ERRORS syntax error(s) in $FILE" >&2
18
+ exit 0
@@ -0,0 +1,14 @@
1
+ #!/bin/bash
2
+ # readme-update-reminder.sh — Remind to update README when APIs change
3
+ # TRIGGER: PreToolUse MATCHER: "Bash"
4
+ COMMAND=$(cat | jq -r '.tool_input.command // empty' 2>/dev/null)
5
+ [ -z "$COMMAND" ] && exit 0
6
+ echo "$COMMAND" | grep -qE '^\s*git\s+commit' || exit 0
7
+ # Check if API-related files changed but README didn't
8
+ API_FILES=$(git diff --cached --name-only 2>/dev/null | grep -cE '(routes|api|endpoint|handler|controller)' || echo 0)
9
+ README_CHANGED=$(git diff --cached --name-only 2>/dev/null | grep -c 'README' || echo 0)
10
+ if [ "$API_FILES" -gt 0 ] && [ "$README_CHANGED" -eq 0 ]; then
11
+ echo "NOTE: API files changed but README was not updated." >&2
12
+ echo "Consider updating API documentation." >&2
13
+ fi
14
+ exit 0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-safe-setup",
3
- "version": "12.7.0",
3
+ "version": "13.0.0",
4
4
  "description": "One command to make Claude Code safe. 59 hooks (8 built-in + 51 examples). 26 CLI commands: dashboard, create, audit, lint, diff, migrate, compare, generate-ci. 284 tests.",
5
5
  "main": "index.mjs",
6
6
  "bin": {