cc-safe-setup 1.0.9 → 1.0.10

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.
Files changed (3) hide show
  1. package/README.md +1 -1
  2. package/index.mjs +25 -0
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -9,7 +9,7 @@
9
9
  npx cc-safe-setup
10
10
  ```
11
11
 
12
- Installs 4 production-tested safety hooks in ~10 seconds. Zero dependencies. No manual configuration.
12
+ Installs 6 production-tested safety hooks in ~10 seconds. Zero dependencies. No manual configuration.
13
13
 
14
14
  ```
15
15
  cc-safe-setup
package/index.mjs CHANGED
@@ -52,6 +52,31 @@ const HOOKS = {
52
52
  },
53
53
  };
54
54
 
55
+ const HELP = process.argv.includes('--help') || process.argv.includes('-h');
56
+
57
+ if (HELP) {
58
+ console.log(`
59
+ cc-safe-setup — Make Claude Code safe for autonomous operation
60
+
61
+ Usage:
62
+ npx cc-safe-setup Install 6 safety hooks
63
+ npx cc-safe-setup --dry-run Preview without installing
64
+ npx cc-safe-setup --uninstall Remove all installed hooks
65
+ npx cc-safe-setup --help Show this help
66
+
67
+ Hooks installed:
68
+ destructive-guard Blocks rm -rf, git reset --hard, NFS mount detection
69
+ branch-guard Blocks pushes to main/master
70
+ syntax-check Validates Python/Shell/JSON/YAML/JS after edits
71
+ context-monitor Warns when context window is filling up
72
+ comment-strip Fixes bash comments breaking permissions
73
+ cd-git-allow Auto-approves read-only cd+git compounds
74
+
75
+ More: https://github.com/yurukusa/cc-safe-setup
76
+ `);
77
+ process.exit(0);
78
+ }
79
+
55
80
  function ask(question) {
56
81
  const rl = createInterface({ input: process.stdin, output: process.stdout });
57
82
  return new Promise(resolve => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-safe-setup",
3
- "version": "1.0.9",
3
+ "version": "1.0.10",
4
4
  "description": "One command to make Claude Code safe for autonomous operation. Installs destructive command blockers, branch guards, and syntax checks.",
5
5
  "main": "index.mjs",
6
6
  "bin": {