@silverassist/agents-toolkit 2.0.0 → 2.1.0
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/README.md +37 -2
- package/bin/cli.js +81 -29
- package/package.json +1 -1
- package/src/index.js +1 -1
package/README.md
CHANGED
|
@@ -11,18 +11,25 @@ Reusable AI agent prompts for development workflows — supports **GitHub Copilo
|
|
|
11
11
|
- ✅ **Multi-Agent Support**: Works with GitHub Copilot, Claude Code, and Codex
|
|
12
12
|
- ✅ **Multi-Stack Filtering**: Install only React or WordPress content with `--stack`
|
|
13
13
|
- ✅ **Multi-Tracker Support**: Choose GitHub Issues or Jira workflows with `--tracker`
|
|
14
|
+
- ✅ **Global Install**: Install once for all projects with `--global`
|
|
14
15
|
- ✅ **Modular Partials**: Reusable prompt fragments
|
|
15
16
|
- ✅ **Customizable**: Easy to extend and modify
|
|
16
17
|
- ✅ **CLI Tool**: Quick installation in any project
|
|
17
18
|
|
|
18
19
|
## Installation
|
|
19
20
|
|
|
20
|
-
**For GitHub Copilot:**
|
|
21
|
+
**For GitHub Copilot (project):**
|
|
21
22
|
|
|
22
23
|
```bash
|
|
23
24
|
npx @silverassist/agents-toolkit@latest install
|
|
24
25
|
```
|
|
25
26
|
|
|
27
|
+
**For GitHub Copilot (global — all projects):**
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx @silverassist/agents-toolkit@latest install --global
|
|
31
|
+
```
|
|
32
|
+
|
|
26
33
|
**For Claude Code:**
|
|
27
34
|
|
|
28
35
|
```bash
|
|
@@ -141,6 +148,26 @@ AGENTS.md # Project instructions for Codex (project
|
|
|
141
148
|
└── testing-patterns/
|
|
142
149
|
```
|
|
143
150
|
|
|
151
|
+
### Global Install (Optional)
|
|
152
|
+
|
|
153
|
+
Install once and have instructions, prompts, and skills available across **all your projects** without running `install` in each one:
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
# Install everything to ~/.copilot/
|
|
157
|
+
npx @silverassist/agents-toolkit@latest install --global
|
|
158
|
+
|
|
159
|
+
# Filter by stack/tracker
|
|
160
|
+
npx @silverassist/agents-toolkit@latest install --global --stack wordpress
|
|
161
|
+
npx @silverassist/agents-toolkit@latest install --global --stack react --tracker github
|
|
162
|
+
|
|
163
|
+
# Update global install
|
|
164
|
+
npx @silverassist/agents-toolkit@latest update --global
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
This installs to `~/.copilot/` (instructions, prompts, skills) and creates `~/.agents-toolkit.json` as the global config. Project-level files (AGENTS.md, copilot-instructions.md) are skipped since they are project-specific.
|
|
168
|
+
|
|
169
|
+
> **Config resolution order:** CLI flags → project `.agents-toolkit.json` → global `~/.agents-toolkit.json` → defaults.
|
|
170
|
+
|
|
144
171
|
### Configure Project (Optional)
|
|
145
172
|
|
|
146
173
|
Update `.agents-toolkit.json` in your project root (created automatically):
|
|
@@ -218,6 +245,7 @@ npx @silverassist/agents-toolkit@latest install [options]
|
|
|
218
245
|
|
|
219
246
|
| Option | Description |
|
|
220
247
|
|--------|-------------|
|
|
248
|
+
| `--global`, `-g` | Install to `~/.copilot/` for all projects (user-level) |
|
|
221
249
|
| `--target <name>` | Target installer: `copilot`, `claude`, or `codex` |
|
|
222
250
|
| `--stack <name>` | Filter by tech stack: `react`, `wordpress`, or `all` (default) |
|
|
223
251
|
| `--tracker <name>` | Filter by issue tracker: `github`, `jira`, or `all` (default) |
|
|
@@ -269,6 +297,11 @@ npx @silverassist/agents-toolkit@latest install --tracker jira
|
|
|
269
297
|
# Combine stack + tracker
|
|
270
298
|
npx @silverassist/agents-toolkit@latest install --stack react --tracker github
|
|
271
299
|
npx @silverassist/agents-toolkit@latest install --stack wordpress --tracker jira --claude
|
|
300
|
+
|
|
301
|
+
# Global install (all projects, no per-project setup needed)
|
|
302
|
+
npx @silverassist/agents-toolkit@latest install --global
|
|
303
|
+
npx @silverassist/agents-toolkit@latest install --global --stack wordpress
|
|
304
|
+
npx @silverassist/agents-toolkit@latest update --global
|
|
272
305
|
```
|
|
273
306
|
|
|
274
307
|
### update
|
|
@@ -296,9 +329,11 @@ npx @silverassist/agents-toolkit@latest list
|
|
|
296
329
|
| Scenario | Command |
|
|
297
330
|
|----------|---------|
|
|
298
331
|
| First time installation (Copilot) | `install` |
|
|
299
|
-
| First time installation (Any target) | `install --target <copilot
|
|
332
|
+
| First time installation (Any target) | `install --target <copilot\|claude\|codex>` |
|
|
300
333
|
| First time installation (Claude) | `install --claude` |
|
|
301
334
|
| First time installation (Codex) | `install --codex` |
|
|
335
|
+
| Install once for all projects | `install --global` |
|
|
336
|
+
| Update global install | `update --global` |
|
|
302
337
|
| Add only new files (keep customizations) | `install` |
|
|
303
338
|
| Get latest version (discard customizations) | `update` |
|
|
304
339
|
| Update specific category only | `update --prompts-only` |
|
package/bin/cli.js
CHANGED
|
@@ -147,19 +147,35 @@ function info(message) {
|
|
|
147
147
|
log(`ℹ️ ${message}`, 'blue');
|
|
148
148
|
}
|
|
149
149
|
|
|
150
|
+
/**
|
|
151
|
+
* Get the user home directory
|
|
152
|
+
* @returns {string} Path to home directory
|
|
153
|
+
*/
|
|
154
|
+
function getHomeDir() {
|
|
155
|
+
return process.env.HOME || process.env.USERPROFILE || '';
|
|
156
|
+
}
|
|
157
|
+
|
|
150
158
|
/**
|
|
151
159
|
* Get the target directory for Copilot installation
|
|
152
|
-
* @
|
|
160
|
+
* @param {boolean} global - Install to user-level ~/.copilot/
|
|
161
|
+
* @returns {string} Path to .github or ~/.copilot directory
|
|
153
162
|
*/
|
|
154
|
-
function getTargetDir() {
|
|
163
|
+
function getTargetDir(global = false) {
|
|
164
|
+
if (global) {
|
|
165
|
+
return path.join(getHomeDir(), '.copilot');
|
|
166
|
+
}
|
|
155
167
|
return path.join(process.cwd(), '.github');
|
|
156
168
|
}
|
|
157
169
|
|
|
158
170
|
/**
|
|
159
171
|
* Get the target directory for Claude Code installation
|
|
172
|
+
* @param {boolean} global - Install to user-level ~/.claude/
|
|
160
173
|
* @returns {string} Path to .claude directory
|
|
161
174
|
*/
|
|
162
|
-
function getClaudeTargetDir() {
|
|
175
|
+
function getClaudeTargetDir(global = false) {
|
|
176
|
+
if (global) {
|
|
177
|
+
return path.join(getHomeDir(), '.claude');
|
|
178
|
+
}
|
|
163
179
|
return path.join(process.cwd(), '.claude');
|
|
164
180
|
}
|
|
165
181
|
|
|
@@ -285,20 +301,21 @@ function getChangeCount(result, dryRun) {
|
|
|
285
301
|
return dryRun ? result.planned : result.written;
|
|
286
302
|
}
|
|
287
303
|
|
|
288
|
-
function ensureConfigFile({ dryRun = false } = {}) {
|
|
289
|
-
const
|
|
304
|
+
function ensureConfigFile({ dryRun = false, global = false } = {}) {
|
|
305
|
+
const configDir = global ? getHomeDir() : process.cwd();
|
|
306
|
+
const configPath = path.join(configDir, '.agents-toolkit.json');
|
|
290
307
|
|
|
291
308
|
if (fs.existsSync(configPath)) {
|
|
292
309
|
return { written: 0, planned: 0 };
|
|
293
310
|
}
|
|
294
311
|
|
|
295
312
|
if (dryRun) {
|
|
296
|
-
info(
|
|
313
|
+
info(`Would create ${global ? '~' : '.'}/.agents-toolkit.json`);
|
|
297
314
|
return { written: 0, planned: 1 };
|
|
298
315
|
}
|
|
299
316
|
|
|
300
317
|
fs.writeFileSync(configPath, JSON.stringify(DEFAULT_CONFIG, null, 2));
|
|
301
|
-
success(
|
|
318
|
+
success(`Created ${global ? '~' : '.'}/.agents-toolkit.json config file`);
|
|
302
319
|
return { written: 1, planned: 1 };
|
|
303
320
|
}
|
|
304
321
|
|
|
@@ -422,10 +439,11 @@ function installGitBasedTarget(options = {}, target = 'copilot') {
|
|
|
422
439
|
force = false,
|
|
423
440
|
append = false,
|
|
424
441
|
dryRun = false,
|
|
442
|
+
global: isGlobal = false,
|
|
425
443
|
filters = { stack: 'all', tracker: 'all' },
|
|
426
444
|
} = options;
|
|
427
445
|
const isCodex = target === 'codex';
|
|
428
|
-
const targetDir = getTargetDir();
|
|
446
|
+
const targetDir = getTargetDir(isGlobal);
|
|
429
447
|
const scope = getInstallScope(options);
|
|
430
448
|
let totalChanges = 0;
|
|
431
449
|
|
|
@@ -437,7 +455,11 @@ function installGitBasedTarget(options = {}, target = 'copilot') {
|
|
|
437
455
|
const promptsFilter = makeFilter('prompts');
|
|
438
456
|
const partialsFilter = makeFilter('partials');
|
|
439
457
|
|
|
440
|
-
log(isCodex ? '\n⚡ Codex Installer\n' : '\n📦 Agents Toolkit Installer\n', 'bright');
|
|
458
|
+
log(isCodex ? '\n⚡ Codex Installer\n' : isGlobal ? '\n🌐 Agents Toolkit Global Installer\n' : '\n📦 Agents Toolkit Installer\n', 'bright');
|
|
459
|
+
|
|
460
|
+
if (isGlobal) {
|
|
461
|
+
info(`Target: ${targetDir}\n`);
|
|
462
|
+
}
|
|
441
463
|
|
|
442
464
|
if (dryRun) {
|
|
443
465
|
info('Dry run mode - no files will be copied\n');
|
|
@@ -473,15 +495,15 @@ function installGitBasedTarget(options = {}, target = 'copilot') {
|
|
|
473
495
|
}
|
|
474
496
|
}
|
|
475
497
|
|
|
476
|
-
const configResult = ensureConfigFile({ dryRun });
|
|
498
|
+
const configResult = ensureConfigFile({ dryRun, global: isGlobal });
|
|
477
499
|
totalChanges += getChangeCount(configResult, dryRun);
|
|
478
500
|
|
|
479
|
-
if (scope.shouldInstallInstructions && !isCodex) {
|
|
501
|
+
if (!isGlobal && scope.shouldInstallInstructions && !isCodex) {
|
|
480
502
|
const copilotInstructionsResult = installCopilotInstructions({ targetDir, dryRun });
|
|
481
503
|
totalChanges += getChangeCount(copilotInstructionsResult, dryRun);
|
|
482
504
|
}
|
|
483
505
|
|
|
484
|
-
if (scope.shouldInstallInstructions) {
|
|
506
|
+
if (!isGlobal && scope.shouldInstallInstructions) {
|
|
485
507
|
const agentsTemplatePath = isCodex
|
|
486
508
|
? path.join(TEMPLATES_DIR, 'agents', 'AGENTS.codex.md')
|
|
487
509
|
: path.join(TEMPLATES_DIR, 'agents', 'AGENTS.md');
|
|
@@ -495,14 +517,20 @@ function installGitBasedTarget(options = {}, target = 'copilot') {
|
|
|
495
517
|
} else if (totalChanges > 0) {
|
|
496
518
|
success(`Installation complete! ${totalChanges} files installed.`);
|
|
497
519
|
console.log('');
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
console.log(' 2.
|
|
502
|
-
console.log(' 3. Run Codex from this project root');
|
|
520
|
+
if (isGlobal) {
|
|
521
|
+
info('Next steps:');
|
|
522
|
+
console.log(` 1. Update ~/.agents-toolkit.json with your defaults`);
|
|
523
|
+
console.log(' 2. Instructions/prompts/skills are now available globally in VS Code');
|
|
503
524
|
} else {
|
|
504
|
-
|
|
505
|
-
console.log('
|
|
525
|
+
info('Next steps:');
|
|
526
|
+
console.log(' 1. Update .agents-toolkit.json with your Jira project key');
|
|
527
|
+
if (isCodex) {
|
|
528
|
+
console.log(' 2. Review AGENTS.md in the project root');
|
|
529
|
+
console.log(' 3. Run Codex from this project root');
|
|
530
|
+
} else {
|
|
531
|
+
console.log(' 2. Configure Atlassian MCP in VS Code');
|
|
532
|
+
console.log(' 3. Run prompts via Command Palette > "GitHub Copilot: Run Prompt"');
|
|
533
|
+
}
|
|
506
534
|
}
|
|
507
535
|
} else {
|
|
508
536
|
warn('No new files installed. Use --force to overwrite existing files.');
|
|
@@ -531,10 +559,10 @@ function installCodex(options = {}) {
|
|
|
531
559
|
* @param {Object} options - Install options
|
|
532
560
|
*/
|
|
533
561
|
function installClaude(options = {}) {
|
|
534
|
-
const { force = false, dryRun = false, filters = { stack: 'all', tracker: 'all' } } = options;
|
|
562
|
+
const { force = false, dryRun = false, global: isGlobal = false, filters = { stack: 'all', tracker: 'all' } } = options;
|
|
535
563
|
const scope = getInstallScope(options);
|
|
536
|
-
const claudeDir = getClaudeTargetDir();
|
|
537
|
-
const githubDir = getTargetDir();
|
|
564
|
+
const claudeDir = getClaudeTargetDir(isGlobal);
|
|
565
|
+
const githubDir = getTargetDir(isGlobal);
|
|
538
566
|
let totalChanges = 0;
|
|
539
567
|
|
|
540
568
|
const makeFilter = (category) => (name) => {
|
|
@@ -588,7 +616,7 @@ function installClaude(options = {}) {
|
|
|
588
616
|
}
|
|
589
617
|
}
|
|
590
618
|
|
|
591
|
-
if (scope.shouldInstallInstructions) {
|
|
619
|
+
if (!isGlobal && scope.shouldInstallInstructions) {
|
|
592
620
|
const claudeMdPath = path.join(process.cwd(), 'CLAUDE.md');
|
|
593
621
|
const claudeMdTemplate = path.join(TEMPLATES_DIR, 'agents', 'CLAUDE.md');
|
|
594
622
|
|
|
@@ -608,7 +636,7 @@ function installClaude(options = {}) {
|
|
|
608
636
|
}
|
|
609
637
|
}
|
|
610
638
|
|
|
611
|
-
const configResult = ensureConfigFile({ dryRun });
|
|
639
|
+
const configResult = ensureConfigFile({ dryRun, global: isGlobal });
|
|
612
640
|
totalChanges += getChangeCount(configResult, dryRun);
|
|
613
641
|
|
|
614
642
|
console.log('');
|
|
@@ -617,10 +645,16 @@ function installClaude(options = {}) {
|
|
|
617
645
|
} else if (totalChanges > 0) {
|
|
618
646
|
success(`Installation complete! ${totalChanges} files installed.`);
|
|
619
647
|
console.log('');
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
648
|
+
if (isGlobal) {
|
|
649
|
+
info('Next steps:');
|
|
650
|
+
console.log(' 1. Update ~/.agents-toolkit.json with your defaults');
|
|
651
|
+
console.log(' 2. Claude commands are now available globally');
|
|
652
|
+
} else {
|
|
653
|
+
info('Next steps:');
|
|
654
|
+
console.log(' 1. Update .agents-toolkit.json with your Jira project key');
|
|
655
|
+
console.log(' 2. Configure Atlassian MCP in Claude Code settings');
|
|
656
|
+
console.log(' 3. Run slash commands with /analyze-ticket, /work-ticket, etc.');
|
|
657
|
+
}
|
|
624
658
|
} else {
|
|
625
659
|
warn('No new files installed. Use --force to overwrite existing files.');
|
|
626
660
|
}
|
|
@@ -700,6 +734,7 @@ function showHelp() {
|
|
|
700
734
|
console.log('');
|
|
701
735
|
log('Options:', 'cyan');
|
|
702
736
|
console.log(' --force, -f Overwrite existing files');
|
|
737
|
+
console.log(' --global, -g Install to ~/.copilot/ (user-level, all projects)');
|
|
703
738
|
console.log(' --target <name> Target installer: copilot | claude | codex');
|
|
704
739
|
console.log(' --stack <name> Filter by stack: react | wordpress | all (default: all)');
|
|
705
740
|
console.log(' --tracker <name> Filter by tracker: jira | github | all (default: all)');
|
|
@@ -714,7 +749,9 @@ function showHelp() {
|
|
|
714
749
|
|
|
715
750
|
console.log('');
|
|
716
751
|
log('Examples:', 'cyan');
|
|
717
|
-
console.log(' npx agents-toolkit install # All content');
|
|
752
|
+
console.log(' npx agents-toolkit install # All content to .github/');
|
|
753
|
+
console.log(' npx agents-toolkit install --global # All content to ~/.copilot/');
|
|
754
|
+
console.log(' npx agents-toolkit install --global --stack react # React only to ~/.copilot/');
|
|
718
755
|
console.log(' npx agents-toolkit install --stack react # React/TS only');
|
|
719
756
|
console.log(' npx agents-toolkit install --stack wordpress # PHP/WordPress only');
|
|
720
757
|
console.log(' npx agents-toolkit install --tracker github # GitHub Issues workflow');
|
|
@@ -779,6 +816,7 @@ function parseArgs() {
|
|
|
779
816
|
|
|
780
817
|
const options = {
|
|
781
818
|
force: flags.includes('--force') || flags.includes('-f'),
|
|
819
|
+
global: flags.includes('--global') || flags.includes('-g'),
|
|
782
820
|
promptsOnly: flags.includes('--prompts-only'),
|
|
783
821
|
partialsOnly: flags.includes('--partials-only'),
|
|
784
822
|
skillsOnly: flags.includes('--skills-only'),
|
|
@@ -841,6 +879,7 @@ function resolveInstallTarget(options = {}) {
|
|
|
841
879
|
|
|
842
880
|
/**
|
|
843
881
|
* Resolve stack and tracker filters from flags or config file
|
|
882
|
+
* Resolution order: CLI flags > project config > global config > defaults
|
|
844
883
|
* @param {Object} options - Parsed CLI options
|
|
845
884
|
* @returns {{ stack: string, tracker: string }} Resolved filters
|
|
846
885
|
*/
|
|
@@ -851,6 +890,19 @@ function resolveFilters(options = {}) {
|
|
|
851
890
|
let stack = 'all';
|
|
852
891
|
let tracker = 'all';
|
|
853
892
|
|
|
893
|
+
// Check global config first (~/.agents-toolkit.json)
|
|
894
|
+
const globalConfigPath = path.join(getHomeDir(), '.agents-toolkit.json');
|
|
895
|
+
if (fs.existsSync(globalConfigPath)) {
|
|
896
|
+
try {
|
|
897
|
+
const config = JSON.parse(fs.readFileSync(globalConfigPath, 'utf-8'));
|
|
898
|
+
if (config.stack) stack = config.stack;
|
|
899
|
+
if (config.tracker) tracker = config.tracker;
|
|
900
|
+
} catch {
|
|
901
|
+
// Ignore invalid config
|
|
902
|
+
}
|
|
903
|
+
}
|
|
904
|
+
|
|
905
|
+
// Project config overrides global
|
|
854
906
|
const configPath = path.join(process.cwd(), '.agents-toolkit.json');
|
|
855
907
|
if (fs.existsSync(configPath)) {
|
|
856
908
|
try {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silverassist/agents-toolkit",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Reusable AI agent prompts for development workflows with Jira integration — supports GitHub Copilot, Claude Code, and Codex",
|
|
5
5
|
"author": "Santiago Ramirez",
|
|
6
6
|
"license": "PolyForm-Noncommercial-1.0.0",
|