claude-code-templates 1.21.2 → 1.21.3
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 +19 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "claude-code-templates",
|
|
3
|
-
"version": "1.21.
|
|
3
|
+
"version": "1.21.3",
|
|
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
|
@@ -1247,9 +1247,26 @@ async function getAvailableAgentsFromGitHub() {
|
|
|
1247
1247
|
}
|
|
1248
1248
|
}
|
|
1249
1249
|
|
|
1250
|
-
// Fallback to
|
|
1251
|
-
console.log(chalk.yellow('⚠️ Local components.json not found,
|
|
1250
|
+
// Fallback to aitmpl.com API if local file not found
|
|
1251
|
+
console.log(chalk.yellow('⚠️ Local components.json not found, fetching from aitmpl.com...'));
|
|
1252
1252
|
|
|
1253
|
+
try {
|
|
1254
|
+
// Try aitmpl.com API first
|
|
1255
|
+
const apiResponse = await fetch('https://aitmpl.com/api/agents.json');
|
|
1256
|
+
if (apiResponse.ok) {
|
|
1257
|
+
const apiData = await apiResponse.json();
|
|
1258
|
+
|
|
1259
|
+
if (apiData.agents && Array.isArray(apiData.agents)) {
|
|
1260
|
+
console.log(chalk.green(`✅ Loaded ${apiData.agents.length} agents from aitmpl.com API`));
|
|
1261
|
+
return apiData.agents;
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
} catch (apiError) {
|
|
1265
|
+
console.warn('Could not fetch from aitmpl.com, trying GitHub API...');
|
|
1266
|
+
}
|
|
1267
|
+
|
|
1268
|
+
// If aitmpl.com API fails, try GitHub API as secondary fallback
|
|
1269
|
+
console.log(chalk.yellow('⚠️ Falling back to GitHub API...'));
|
|
1253
1270
|
const response = await fetch('https://api.github.com/repos/davila7/claude-code-templates/contents/cli-tool/components/agents');
|
|
1254
1271
|
if (!response.ok) {
|
|
1255
1272
|
// Check for rate limit error
|