ai-agent-config 2.6.3 → 2.6.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/bin/cli.js +7 -82
- package/index.js +1 -0
- package/package.json +3 -2
- package/scripts/secret-manager.js +1 -0
package/bin/cli.js
CHANGED
|
@@ -12,54 +12,6 @@ const secretManager = require("../scripts/secret-manager");
|
|
|
12
12
|
|
|
13
13
|
const VERSION = require("../package.json").version;
|
|
14
14
|
|
|
15
|
-
// Get package root (one level up from bin/)
|
|
16
|
-
const PACKAGE_ROOT = path.join(__dirname, "..");
|
|
17
|
-
|
|
18
|
-
// Commands with descriptions
|
|
19
|
-
const COMMANDS = {
|
|
20
|
-
// v2.3 New Commands
|
|
21
|
-
init: "Initialize or migrate config",
|
|
22
|
-
migrate: "Migrate from v1.x to v2.0",
|
|
23
|
-
push: "Push skills to GitHub repository",
|
|
24
|
-
pull: "Pull skills from GitHub repository",
|
|
25
|
-
|
|
26
|
-
// Source Management
|
|
27
|
-
"source add": "Add a custom skill source",
|
|
28
|
-
"source remove": "Remove a custom source",
|
|
29
|
-
"source list": "List all sources",
|
|
30
|
-
"source enable": "Enable a source",
|
|
31
|
-
"source disable": "Disable a source",
|
|
32
|
-
"source info": "Show source details",
|
|
33
|
-
|
|
34
|
-
// Config Management
|
|
35
|
-
"config get": "Get config value",
|
|
36
|
-
"config set": "Set config value",
|
|
37
|
-
"config edit": "Open config in editor",
|
|
38
|
-
"config validate": "Validate config",
|
|
39
|
-
"config export": "Export config",
|
|
40
|
-
"config import": "Import config",
|
|
41
|
-
"config reset": "Reset to defaults",
|
|
42
|
-
|
|
43
|
-
// Secret Management
|
|
44
|
-
"secrets sync": "Sync MCP secrets from Bitwarden",
|
|
45
|
-
|
|
46
|
-
// Original Commands (updated)
|
|
47
|
-
install: "Install skills to detected platforms",
|
|
48
|
-
update: "Update skills from all sources",
|
|
49
|
-
|
|
50
|
-
list: "List installed skills",
|
|
51
|
-
platforms: "Show detected platforms",
|
|
52
|
-
uninstall: "Remove installed skills",
|
|
53
|
-
|
|
54
|
-
// Backward compatibility
|
|
55
|
-
"sync-external": "Alias for 'update'",
|
|
56
|
-
"list-external": "List available sources",
|
|
57
|
-
|
|
58
|
-
// Utility
|
|
59
|
-
version: "Show version number",
|
|
60
|
-
help: "Show this help message",
|
|
61
|
-
};
|
|
62
|
-
|
|
63
15
|
function showHelp() {
|
|
64
16
|
console.log(`
|
|
65
17
|
╔═══════════════════════════════════════════════════════════════╗
|
|
@@ -104,7 +56,6 @@ Usage: ai-agent <command> [options]
|
|
|
104
56
|
sync-external [opts] Sync skills from external sources
|
|
105
57
|
list-external List available external skills
|
|
106
58
|
|
|
107
|
-
🌐 Examples:
|
|
108
59
|
🌐 Examples:
|
|
109
60
|
|
|
110
61
|
# Initialize with GitHub repository
|
|
@@ -553,7 +504,7 @@ function configSet(args) {
|
|
|
553
504
|
if (value === "true") value = true;
|
|
554
505
|
else if (value === "false") value = false;
|
|
555
506
|
else if (value === "null") value = null;
|
|
556
|
-
else if (!isNaN(value)) value = Number(value);
|
|
507
|
+
else if (value !== "" && !isNaN(value)) value = Number(value);
|
|
557
508
|
|
|
558
509
|
console.log(`\n⚙️ Setting ${key} = ${JSON.stringify(value)}\n`);
|
|
559
510
|
|
|
@@ -797,13 +748,13 @@ function update(args) {
|
|
|
797
748
|
* Push skills to GitHub repository
|
|
798
749
|
*/
|
|
799
750
|
function push(args) {
|
|
800
|
-
console.log("
|
|
751
|
+
console.log("\n⬆️ Pushing to GitHub...\n");
|
|
801
752
|
|
|
802
753
|
const config = configManager.loadConfig();
|
|
803
754
|
|
|
804
755
|
if (!config.repository.url) {
|
|
805
756
|
console.error("❌ No repository configured");
|
|
806
|
-
console.log("
|
|
757
|
+
console.log("\n Run: ai-agent init --repo <url>\n");
|
|
807
758
|
process.exit(1);
|
|
808
759
|
}
|
|
809
760
|
|
|
@@ -819,19 +770,19 @@ function push(args) {
|
|
|
819
770
|
|
|
820
771
|
if (result.pushed) {
|
|
821
772
|
console.log("✅ Pushed successfully!");
|
|
822
|
-
console.log(` Repository: ${config.repository.url}
|
|
773
|
+
console.log(` Repository: ${config.repository.url}\n`);
|
|
823
774
|
} else {
|
|
824
775
|
console.log(`⚠️ ${result.reason}`);
|
|
825
776
|
|
|
826
777
|
if (result.conflicts && result.conflicts.length > 0) {
|
|
827
|
-
console.log("
|
|
778
|
+
console.log("\n Conflicting files:");
|
|
828
779
|
result.conflicts.forEach((f) => console.log(` - ${f}`));
|
|
829
|
-
console.log("
|
|
780
|
+
console.log("\n Resolve conflicts manually and try again.\n");
|
|
830
781
|
process.exit(1);
|
|
831
782
|
}
|
|
832
783
|
}
|
|
833
784
|
} catch (error) {
|
|
834
|
-
console.error(`❌ Push failed: ${error.message}
|
|
785
|
+
console.error(`❌ Push failed: ${error.message}\n`);
|
|
835
786
|
process.exit(1);
|
|
836
787
|
}
|
|
837
788
|
}
|
|
@@ -883,32 +834,6 @@ function pull(args) {
|
|
|
883
834
|
}
|
|
884
835
|
|
|
885
836
|
|
|
886
|
-
/**
|
|
887
|
-
* Old sync function (backward compatibility)
|
|
888
|
-
*/
|
|
889
|
-
function oldSync(args) {
|
|
890
|
-
console.log("\\n🔄 Syncing from GitHub repository...\\n");
|
|
891
|
-
console.log(` Repository: ${installer.REPO_URL}`);
|
|
892
|
-
console.log(` Cache: ${installer.CACHE_DIR}\\n`);
|
|
893
|
-
|
|
894
|
-
try {
|
|
895
|
-
const success = installer.syncRepo();
|
|
896
|
-
|
|
897
|
-
if (success) {
|
|
898
|
-
console.log("\\n✓ Sync complete!\\n");
|
|
899
|
-
|
|
900
|
-
const skills = installer.getAvailableSkills();
|
|
901
|
-
const workflows = installer.getAvailableWorkflows();
|
|
902
|
-
|
|
903
|
-
console.log(` Found ${skills.length} skill(s), ${workflows.length} workflow(s)`);
|
|
904
|
-
console.log("\\n Run 'ai-agent install' to install to your platforms.\\n");
|
|
905
|
-
}
|
|
906
|
-
} catch (error) {
|
|
907
|
-
console.error(`\\n❌ Sync failed: ${error.message}`);
|
|
908
|
-
process.exit(1);
|
|
909
|
-
}
|
|
910
|
-
}
|
|
911
|
-
|
|
912
837
|
function uninstall(args) {
|
|
913
838
|
console.log("\n🗑️ Uninstalling skills...\n");
|
|
914
839
|
|
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ai-agent-config",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.4",
|
|
4
4
|
"description": "Universal skill & workflow manager for AI coding assistants with bi-directional GitHub sync",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"bin": {
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
},
|
|
9
9
|
"scripts": {
|
|
10
10
|
"postinstall": "node scripts/postinstall.js",
|
|
11
|
-
"test": "node --test"
|
|
11
|
+
"test": "node --test",
|
|
12
|
+
"test:coverage": "npx c8 --all --include='scripts/**/*.js' --check-coverage --lines 90 --functions 90 --branches 80 node --test"
|
|
12
13
|
},
|
|
13
14
|
"keywords": [
|
|
14
15
|
"ai",
|