claude-code-templates 1.16.0 → 1.16.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/index.js +9 -22
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-templates",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.1",
|
|
4
4
|
"description": "CLI tool to setup Claude Code configurations with framework-specific commands, automation hooks and MCP Servers for your projects",
|
|
5
5
|
"main": "src/index.js",
|
|
6
6
|
"bin": {
|
package/src/index.js
CHANGED
|
@@ -321,35 +321,22 @@ async function installIndividualAgent(agentName, targetDir, options) {
|
|
|
321
321
|
|
|
322
322
|
const agentContent = await response.text();
|
|
323
323
|
|
|
324
|
-
//
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
const framework = extractFrameworkFromAgent(agentContent, agentName);
|
|
324
|
+
// Create .claude/agents directory if it doesn't exist
|
|
325
|
+
const agentsDir = path.join(targetDir, '.claude', 'agents');
|
|
326
|
+
await fs.ensureDir(agentsDir);
|
|
328
327
|
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
// Install the template that contains this agent (avoid recursion)
|
|
333
|
-
const setupOptions = {
|
|
334
|
-
...options,
|
|
335
|
-
language,
|
|
336
|
-
framework,
|
|
337
|
-
yes: true,
|
|
338
|
-
targetDirectory: targetDir,
|
|
339
|
-
agent: null // Remove agent to avoid recursion
|
|
340
|
-
};
|
|
341
|
-
delete setupOptions.agent;
|
|
342
|
-
await createClaudeConfig(setupOptions);
|
|
328
|
+
// Write the agent file
|
|
329
|
+
const targetFile = path.join(agentsDir, `${agentName}.md`);
|
|
330
|
+
await fs.writeFile(targetFile, agentContent, 'utf8');
|
|
343
331
|
|
|
344
332
|
console.log(chalk.green(`✅ Agent "${agentName}" installed successfully!`));
|
|
333
|
+
console.log(chalk.cyan(`📁 Installed to: ${path.relative(targetDir, targetFile)}`));
|
|
345
334
|
console.log(chalk.cyan(`📦 Downloaded from: ${githubUrl}`));
|
|
346
335
|
|
|
347
336
|
// Track successful agent installation
|
|
348
337
|
trackingService.trackDownload('agent', agentName, {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
installation_type: 'individual_agent',
|
|
352
|
-
template_installed: true,
|
|
338
|
+
installation_type: 'individual_component',
|
|
339
|
+
target_directory: path.relative(process.cwd(), targetDir),
|
|
353
340
|
source: 'github_main'
|
|
354
341
|
});
|
|
355
342
|
|