cc-dev-template 0.1.20 → 0.1.21
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/bin/install.js +34 -2
- package/package.json +1 -1
package/bin/install.js
CHANGED
|
@@ -20,7 +20,7 @@ console.log('='.repeat(50));
|
|
|
20
20
|
console.log(`Installing to ${CLAUDE_DIR}...`);
|
|
21
21
|
|
|
22
22
|
// Create directories
|
|
23
|
-
const dirs = ['agents', 'commands', 'scripts', 'skills', 'mcp-servers'];
|
|
23
|
+
const dirs = ['agents', 'commands', 'scripts', 'skills', 'hooks', 'mcp-servers'];
|
|
24
24
|
dirs.forEach(dir => {
|
|
25
25
|
fs.mkdirSync(path.join(CLAUDE_DIR, dir), { recursive: true });
|
|
26
26
|
});
|
|
@@ -92,6 +92,34 @@ if (fs.existsSync(skillsDir)) {
|
|
|
92
92
|
console.log(' No skills to install');
|
|
93
93
|
}
|
|
94
94
|
|
|
95
|
+
// Copy hooks
|
|
96
|
+
console.log('\nHooks:');
|
|
97
|
+
const hooksDir = path.join(SRC_DIR, 'hooks');
|
|
98
|
+
if (fs.existsSync(hooksDir)) {
|
|
99
|
+
const hookScripts = fs.readdirSync(hooksDir).filter(f => f.endsWith('.sh'));
|
|
100
|
+
const hookConfigs = fs.readdirSync(hooksDir).filter(f => f.endsWith('.json'));
|
|
101
|
+
|
|
102
|
+
// Copy shell scripts and make executable
|
|
103
|
+
hookScripts.forEach(file => {
|
|
104
|
+
const src = path.join(hooksDir, file);
|
|
105
|
+
const dest = path.join(CLAUDE_DIR, 'hooks', file);
|
|
106
|
+
fs.copyFileSync(src, dest);
|
|
107
|
+
fs.chmodSync(dest, 0o755); // Make executable
|
|
108
|
+
console.log(` ${file}`);
|
|
109
|
+
});
|
|
110
|
+
|
|
111
|
+
// Copy JSON configs to scripts dir for merging later
|
|
112
|
+
hookConfigs.forEach(file => {
|
|
113
|
+
const src = path.join(hooksDir, file);
|
|
114
|
+
const dest = path.join(CLAUDE_DIR, 'scripts', file);
|
|
115
|
+
fs.copyFileSync(src, dest);
|
|
116
|
+
});
|
|
117
|
+
|
|
118
|
+
console.log(`✓ ${hookScripts.length} hooks installed`);
|
|
119
|
+
} else {
|
|
120
|
+
console.log(' No hooks to install');
|
|
121
|
+
}
|
|
122
|
+
|
|
95
123
|
// Install MCP servers
|
|
96
124
|
console.log('\nMCP Servers:');
|
|
97
125
|
const mcpServersDir = path.join(SRC_DIR, 'mcp-servers');
|
|
@@ -198,7 +226,10 @@ if (fs.existsSync(mergeSettingsPath)) {
|
|
|
198
226
|
const configs = [
|
|
199
227
|
{ file: 'yaml-validation-hook.json', name: 'YAML validation hook' },
|
|
200
228
|
{ file: 'read-guard-hook.json', name: 'Context guard for large reads' },
|
|
201
|
-
{ file: 'statusline-config.json', name: 'Custom status line' }
|
|
229
|
+
{ file: 'statusline-config.json', name: 'Custom status line' },
|
|
230
|
+
{ file: 'orchestration-hook.json', name: 'Orchestration guidance hook' },
|
|
231
|
+
{ file: 'bash-overflow-hook.json', name: 'Bash overflow guard hook' },
|
|
232
|
+
{ file: 'bash-precheck-hook.json', name: 'Bash precheck hook' }
|
|
202
233
|
];
|
|
203
234
|
|
|
204
235
|
configs.forEach(({ file, name }) => {
|
|
@@ -225,6 +256,7 @@ Installed to:
|
|
|
225
256
|
Commands: ${CLAUDE_DIR}/commands/
|
|
226
257
|
Scripts: ${CLAUDE_DIR}/scripts/
|
|
227
258
|
Skills: ${CLAUDE_DIR}/skills/
|
|
259
|
+
Hooks: ${CLAUDE_DIR}/hooks/
|
|
228
260
|
MCP Servers: ${CLAUDE_DIR}/mcp-servers/
|
|
229
261
|
Settings: ${CLAUDE_DIR}/settings.json
|
|
230
262
|
`);
|