taskmonkey-cli 0.8.0 → 0.8.1
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/package.json +1 -1
- package/src/commands/pull.js +42 -0
package/package.json
CHANGED
package/src/commands/pull.js
CHANGED
|
@@ -75,6 +75,48 @@ export async function pull() {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
|
|
78
|
+
// Create SessionStart hook for automatic greeting
|
|
79
|
+
const hooksDir = join(config._configDir, '.claude', 'hooks');
|
|
80
|
+
mkdirSync(hooksDir, { recursive: true });
|
|
81
|
+
|
|
82
|
+
const hookScript = join(hooksDir, 'session-start.sh');
|
|
83
|
+
if (!existsSync(hookScript)) {
|
|
84
|
+
writeFileSync(hookScript, `#!/bin/bash
|
|
85
|
+
cat <<'GREETING'
|
|
86
|
+
Willkommen im ${config.tenant} Tenant!
|
|
87
|
+
|
|
88
|
+
Quick Start:
|
|
89
|
+
- tm watch in separatem Terminal starten (Auto-Sync)
|
|
90
|
+
- Prompt bearbeiten → wird automatisch hochgeladen → im Chat testen
|
|
91
|
+
|
|
92
|
+
Befehle: /pull /sync /test-chat /test-conversations /optimize-prompt /chat /logs /monitor
|
|
93
|
+
|
|
94
|
+
Was möchtest du anpassen?
|
|
95
|
+
GREETING
|
|
96
|
+
`);
|
|
97
|
+
const { chmodSync } = await import('fs');
|
|
98
|
+
chmodSync(hookScript, '755');
|
|
99
|
+
console.log(chalk.cyan(` .claude/hooks/session-start.sh (created)`));
|
|
100
|
+
written++;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
const settingsPath = join(config._configDir, '.claude', 'settings.json');
|
|
104
|
+
if (!existsSync(settingsPath)) {
|
|
105
|
+
writeFileSync(settingsPath, JSON.stringify({
|
|
106
|
+
hooks: {
|
|
107
|
+
SessionStart: [{
|
|
108
|
+
matcher: "startup",
|
|
109
|
+
hooks: [{
|
|
110
|
+
type: "command",
|
|
111
|
+
command: '"$CLAUDE_PROJECT_DIR"/.claude/hooks/session-start.sh'
|
|
112
|
+
}]
|
|
113
|
+
}]
|
|
114
|
+
}
|
|
115
|
+
}, null, 2) + '\\n');
|
|
116
|
+
console.log(chalk.cyan(` .claude/settings.json (created)`));
|
|
117
|
+
written++;
|
|
118
|
+
}
|
|
119
|
+
|
|
78
120
|
// Install Claude Code skills to .claude/commands/
|
|
79
121
|
const skillsInstalled = installSkills(config._configDir);
|
|
80
122
|
written += skillsInstalled;
|