agents-templated 1.2.6 → 1.2.7

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.
Files changed (2) hide show
  1. package/bin/cli.js +64 -1
  2. package/package.json +1 -1
package/bin/cli.js CHANGED
@@ -5,6 +5,7 @@ const inquirer = require('inquirer');
5
5
  const fs = require('fs-extra');
6
6
  const path = require('path');
7
7
  const chalk = require('chalk');
8
+ const { version } = require('../package.json');
8
9
 
9
10
  // Resolve the templates directory - works in both dev and installed contexts
10
11
  const getTemplatesDir = () => {
@@ -26,7 +27,7 @@ const program = new Command();
26
27
  program
27
28
  .name('agents-templated')
28
29
  .description('Technology-agnostic development template with multi-AI agent support')
29
- .version('1.2.1');
30
+ .version(version);
30
31
 
31
32
  program
32
33
  .command('init')
@@ -641,6 +642,11 @@ async function copyDirectory(sourceDir, targetDir, force = false) {
641
642
  program
642
643
  .command('update')
643
644
  .description('Check for and apply template updates')
645
+ .option('-a, --all', 'Update all components (docs, rules, skills, github)')
646
+ .option('-d, --docs', 'Update documentation files only')
647
+ .option('-r, --rules', 'Update agent rules only')
648
+ .option('-s, --skills', 'Update skills only')
649
+ .option('-g, --github', 'Update AI agent instruction files only')
644
650
  .option('-c, --check-only', 'Only check for updates, don\'t install')
645
651
  .option('-f, --force', 'Force overwrite files during update')
646
652
  .action(async (options) => {
@@ -660,6 +666,63 @@ program
660
666
  process.exit(0);
661
667
  }
662
668
 
669
+ const hasComponentSelection = options.all || options.docs || options.rules || options.skills || options.github;
670
+
671
+ // Component refresh mode: update selected parts directly without stack/wizard prompts
672
+ if (hasComponentSelection) {
673
+ const selectedComponents = [];
674
+ if (options.all || options.docs) selectedComponents.push('docs');
675
+ if (options.all || options.rules) selectedComponents.push('rules');
676
+ if (options.all || options.skills) selectedComponents.push('skills');
677
+ if (options.all || options.github) selectedComponents.push('github');
678
+
679
+ console.log(chalk.blue('šŸ“¦ Updating selected components...\n'));
680
+
681
+ if (selectedComponents.includes('docs')) {
682
+ console.log(chalk.yellow('Updating documentation files...'));
683
+ await fs.ensureDir(path.join(targetDir, 'agent-docs'));
684
+ await copyDirectory(
685
+ path.join(templateDir, 'agent-docs'),
686
+ path.join(targetDir, 'agent-docs'),
687
+ true
688
+ );
689
+ }
690
+
691
+ if (selectedComponents.includes('rules')) {
692
+ console.log(chalk.yellow('Updating agent rules...'));
693
+ await fs.ensureDir(path.join(targetDir, 'agents', 'rules'));
694
+ await copyDirectory(
695
+ path.join(templateDir, 'agents', 'rules'),
696
+ path.join(targetDir, 'agents', 'rules'),
697
+ true
698
+ );
699
+ }
700
+
701
+ if (selectedComponents.includes('skills')) {
702
+ console.log(chalk.yellow('Updating skills...'));
703
+ await fs.ensureDir(path.join(targetDir, 'agents', 'skills'));
704
+ await copyDirectory(
705
+ path.join(templateDir, 'agents', 'skills'),
706
+ path.join(targetDir, 'agents', 'skills'),
707
+ true
708
+ );
709
+ }
710
+
711
+ if (selectedComponents.includes('github')) {
712
+ console.log(chalk.yellow('Updating AI agent instructions...'));
713
+ await fs.ensureDir(path.join(targetDir, '.github'));
714
+ await copyFiles(templateDir, targetDir, [
715
+ '.cursorrules',
716
+ '.github/copilot-instructions.md',
717
+ 'CLAUDE.md',
718
+ 'GEMINI.md'
719
+ ], true);
720
+ }
721
+
722
+ console.log(chalk.green.bold('\nāœ… Selected component updates applied successfully!\n'));
723
+ process.exit(0);
724
+ }
725
+
663
726
  // List potential updates
664
727
  const updates = [];
665
728
  const checkFiles = [
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "agents-templated",
3
- "version": "1.2.6",
3
+ "version": "1.2.7",
4
4
  "description": "Technology-agnostic development template with multi-AI agent support (Cursor, Copilot, VSCode, Gemini), security-first patterns, and comprehensive testing guidelines",
5
5
  "main": "index.js",
6
6
  "bin": {