agents-templated 1.0.0 ā 1.0.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/bin/cli.js +14 -14
- package/package.json +1 -1
package/bin/cli.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
1
|
+
#!/usr/bin/env node
|
|
2
2
|
|
|
3
3
|
const { Command } = require('commander');
|
|
4
4
|
const inquirer = require('inquirer');
|
|
@@ -27,7 +27,7 @@ program
|
|
|
27
27
|
const targetDir = process.cwd();
|
|
28
28
|
const templateDir = path.join(__dirname, '..', 'templates');
|
|
29
29
|
|
|
30
|
-
console.log(chalk.blue.bold('\
|
|
30
|
+
console.log(chalk.blue.bold('\nAgents Templated - AI-Powered Development Setup\n'));
|
|
31
31
|
|
|
32
32
|
let choices = [];
|
|
33
33
|
|
|
@@ -71,7 +71,7 @@ program
|
|
|
71
71
|
|
|
72
72
|
// Install documentation files
|
|
73
73
|
if (installAll || choices.includes('docs')) {
|
|
74
|
-
console.log(chalk.yellow('
|
|
74
|
+
console.log(chalk.yellow('Installing documentation files...'));
|
|
75
75
|
await copyFiles(templateDir, targetDir, [
|
|
76
76
|
'AGENTS.MD',
|
|
77
77
|
'CLAUDE.md',
|
|
@@ -82,7 +82,7 @@ program
|
|
|
82
82
|
|
|
83
83
|
// Install agent rules
|
|
84
84
|
if (installAll || choices.includes('rules')) {
|
|
85
|
-
console.log(chalk.yellow('
|
|
85
|
+
console.log(chalk.yellow('Installing agent rules...'));
|
|
86
86
|
await fs.ensureDir(path.join(targetDir, 'agents', 'rules'));
|
|
87
87
|
await copyDirectory(
|
|
88
88
|
path.join(templateDir, 'agents', 'rules'),
|
|
@@ -93,7 +93,7 @@ program
|
|
|
93
93
|
|
|
94
94
|
// Install skills
|
|
95
95
|
if (installAll || choices.includes('skills')) {
|
|
96
|
-
console.log(chalk.yellow('
|
|
96
|
+
console.log(chalk.yellow('Installing skills...'));
|
|
97
97
|
await fs.ensureDir(path.join(targetDir, 'agents', 'skills'));
|
|
98
98
|
await copyDirectory(
|
|
99
99
|
path.join(templateDir, 'agents', 'skills'),
|
|
@@ -104,14 +104,14 @@ program
|
|
|
104
104
|
|
|
105
105
|
// Install GitHub Copilot instructions
|
|
106
106
|
if (installAll || choices.includes('github')) {
|
|
107
|
-
console.log(chalk.yellow('
|
|
107
|
+
console.log(chalk.yellow('Installing GitHub Copilot instructions...'));
|
|
108
108
|
await fs.ensureDir(path.join(targetDir, '.github'));
|
|
109
109
|
await copyFiles(templateDir, targetDir, [
|
|
110
110
|
'.github/copilot-instructions.md'
|
|
111
111
|
], options.force);
|
|
112
112
|
}
|
|
113
113
|
|
|
114
|
-
console.log(chalk.green.bold('\
|
|
114
|
+
console.log(chalk.green.bold('\nInstallation complete!\n'));
|
|
115
115
|
console.log(chalk.cyan('Next steps:'));
|
|
116
116
|
console.log(chalk.white(' 1. Review CLAUDE.md for project guidelines'));
|
|
117
117
|
console.log(chalk.white(' 2. Review AGENTS.MD for agent patterns'));
|
|
@@ -119,7 +119,7 @@ program
|
|
|
119
119
|
console.log(chalk.white(' 4. Adapt the rules to your technology stack\n'));
|
|
120
120
|
|
|
121
121
|
} catch (error) {
|
|
122
|
-
console.error(chalk.red('
|
|
122
|
+
console.error(chalk.red('Error:'), error.message);
|
|
123
123
|
process.exit(1);
|
|
124
124
|
}
|
|
125
125
|
});
|
|
@@ -128,7 +128,7 @@ program
|
|
|
128
128
|
.command('list')
|
|
129
129
|
.description('List available components')
|
|
130
130
|
.action(() => {
|
|
131
|
-
console.log(chalk.blue.bold('\
|
|
131
|
+
console.log(chalk.blue.bold('\nAvailable Components:\n'));
|
|
132
132
|
console.log(chalk.yellow('docs') + ' - Documentation files (AGENTS.MD, CLAUDE.md, AI_INSTRUCTIONS.md, README.md)');
|
|
133
133
|
console.log(chalk.yellow('rules') + ' - Agent rules (core, database, frontend, security, testing, style)');
|
|
134
134
|
console.log(chalk.yellow('skills') + ' - Agent skills (find-skills, web-design-guidelines)');
|
|
@@ -143,20 +143,20 @@ async function copyFiles(sourceDir, targetDir, files, force = false) {
|
|
|
143
143
|
|
|
144
144
|
if (await fs.pathExists(sourcePath)) {
|
|
145
145
|
if (await fs.pathExists(targetPath) && !force) {
|
|
146
|
-
console.log(chalk.gray(`
|
|
146
|
+
console.log(chalk.gray(` Skipping ${file} (already exists)`));
|
|
147
147
|
continue;
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
await fs.ensureDir(path.dirname(targetPath));
|
|
151
151
|
await fs.copy(sourcePath, targetPath, { overwrite: force });
|
|
152
|
-
console.log(chalk.green(`
|
|
152
|
+
console.log(chalk.green(` + ${file}`));
|
|
153
153
|
}
|
|
154
154
|
}
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
async function copyDirectory(sourceDir, targetDir, force = false) {
|
|
158
158
|
if (!(await fs.pathExists(sourceDir))) {
|
|
159
|
-
console.log(chalk.gray(`
|
|
159
|
+
console.log(chalk.gray(` Directory not found: ${sourceDir}`));
|
|
160
160
|
return;
|
|
161
161
|
}
|
|
162
162
|
|
|
@@ -171,12 +171,12 @@ async function copyDirectory(sourceDir, targetDir, force = false) {
|
|
|
171
171
|
await copyDirectory(sourcePath, targetPath, force);
|
|
172
172
|
} else {
|
|
173
173
|
if (await fs.pathExists(targetPath) && !force) {
|
|
174
|
-
console.log(chalk.gray(`
|
|
174
|
+
console.log(chalk.gray(` Skipping ${path.relative(process.cwd(), targetPath)} (already exists)`));
|
|
175
175
|
continue;
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
await fs.copy(sourcePath, targetPath, { overwrite: force });
|
|
179
|
-
console.log(chalk.green(`
|
|
179
|
+
console.log(chalk.green(` + ${path.relative(process.cwd(), targetPath)}`));
|
|
180
180
|
}
|
|
181
181
|
}
|
|
182
182
|
}
|
package/package.json
CHANGED