cc-safe-setup 11.6.0 → 11.8.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
@@ -87,12 +87,26 @@ Each hook exists because a real incident happened without it.
87
87
  | `--scan [--apply]` | Tech stack detection |
88
88
  | `--export / --import` | Team config sharing |
89
89
  | `--verify` | Test each hook |
90
- | `--install-example <name>` | Install from 75 examples |
90
+ | `--install-example <name>` | Install from 118 examples |
91
91
  | `--examples [filter]` | Browse examples by keyword |
92
92
  | `--full` | All-in-one setup |
93
93
  | `--status` | Check installed hooks |
94
94
  | `--dry-run` | Preview changes |
95
95
  | `--uninstall` | Remove all hooks |
96
+ | `--shield` | Maximum safety in one command |
97
+ | `--guard "rule"` | Instantly enforce a rule from English |
98
+ | `--suggest` | Predict risks from project analysis |
99
+ | `--from-claudemd` | Convert CLAUDE.md rules to hooks |
100
+ | `--team` | Project-level hooks for git sharing |
101
+ | `--profile [level]` | Switch safety profiles |
102
+ | `--save-profile <name>` | Save current hooks as profile |
103
+ | `--analyze` | Session analysis dashboard |
104
+ | `--health` | Hook health table |
105
+ | `--quickfix` | Auto-fix common problems |
106
+ | `--replay` | Visual blocked commands timeline |
107
+ | `--why <hook>` | Show real incident behind hook |
108
+ | `--migrate-from <tool>` | Migrate from other hook tools |
109
+ | `--diff-hooks [path]` | Compare hook configurations |
96
110
  | `--help` | Show help |
97
111
 
98
112
  ## How It Works
package/index.mjs CHANGED
@@ -1881,6 +1881,16 @@ async function profile(level) {
1881
1881
  },
1882
1882
  };
1883
1883
 
1884
+ // Check for saved custom profiles
1885
+ const profilesDir = join(HOME, '.claude', 'profiles');
1886
+ if (level && !PROFILES[level]) {
1887
+ const customPath = join(profilesDir, `${level}.json`);
1888
+ if (existsSync(customPath)) {
1889
+ const custom = JSON.parse(readFileSync(customPath, 'utf-8'));
1890
+ PROFILES[level] = { desc: `Custom profile (saved ${custom.savedAt?.split('T')[0] || '?'})`, hooks: custom.hooks || [] };
1891
+ }
1892
+ }
1893
+
1884
1894
  if (!level || !PROFILES[level]) {
1885
1895
  console.log(c.bold + ' Safety Profiles' + c.reset);
1886
1896
  console.log();
@@ -1890,6 +1900,25 @@ async function profile(level) {
1890
1900
  console.log(` ${c.dim}npx cc-safe-setup --profile ${name}${c.reset}`);
1891
1901
  console.log();
1892
1902
  }
1903
+
1904
+ // Show saved profiles too
1905
+ if (existsSync(profilesDir)) {
1906
+ const saved = readdirSync(profilesDir).filter(f => f.endsWith('.json'));
1907
+ if (saved.length > 0) {
1908
+ console.log(c.bold + ' Saved Profiles' + c.reset);
1909
+ console.log();
1910
+ for (const f of saved) {
1911
+ const sName = f.replace('.json', '');
1912
+ try {
1913
+ const data = JSON.parse(readFileSync(join(profilesDir, f), 'utf-8'));
1914
+ console.log(` ${c.bold}${sName}${c.reset} (${data.hooks?.length || 0} hooks)`);
1915
+ console.log(` ${c.dim}Saved ${data.savedAt?.split('T')[0] || '?'}${c.reset}`);
1916
+ console.log(` ${c.dim}npx cc-safe-setup --profile ${sName}${c.reset}`);
1917
+ console.log();
1918
+ } catch {}
1919
+ }
1920
+ }
1921
+ }
1893
1922
  return;
1894
1923
  }
1895
1924
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cc-safe-setup",
3
- "version": "11.6.0",
3
+ "version": "11.8.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": {
@@ -1,25 +0,0 @@
1
- # Session Snapshot (auto-generated)
2
- Updated: 2026-03-24T22:17:08+09:00
3
-
4
- ## Git
5
- - Branch: `main`
6
- - Uncommitted changes: 1 file(s)
7
- ```
8
- M .claude/session-snapshot.md
9
- ```
10
- - Last commit: 98ecdeb checkpoint: auto-save 22:17:06
11
-
12
- ## Recent Files
13
- ```
14
- ./.claude/session-snapshot.md
15
- ./test.sh
16
- ./README.md
17
- ./examples/crontab-guard.sh
18
- ./examples/api-endpoint-guard.sh
19
- ./examples/dependency-version-pin.sh
20
- ./examples/auto-approve-readonly.sh
21
- ./examples/max-session-duration.sh
22
- ./CHANGELOG.md
23
- ./examples/typosquat-guard.sh
24
- ```
25
-