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