add-skill-kit 3.2.7 → 3.2.8
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/kit.js +89 -89
- package/bin/lib/agents.js +208 -208
- package/bin/lib/commands/analyze.js +70 -70
- package/bin/lib/commands/cache.js +65 -65
- package/bin/lib/commands/doctor.js +75 -75
- package/bin/lib/commands/help.js +155 -155
- package/bin/lib/commands/info.js +38 -38
- package/bin/lib/commands/init.js +39 -39
- package/bin/lib/commands/install.js +803 -803
- package/bin/lib/commands/list.js +43 -43
- package/bin/lib/commands/lock.js +57 -57
- package/bin/lib/commands/uninstall.js +307 -307
- package/bin/lib/commands/update.js +55 -55
- package/bin/lib/commands/validate.js +69 -69
- package/bin/lib/commands/verify.js +56 -56
- package/bin/lib/config.js +81 -81
- package/bin/lib/helpers.js +196 -196
- package/bin/lib/helpers.test.js +60 -60
- package/bin/lib/installer.js +164 -164
- package/bin/lib/skills.js +119 -119
- package/bin/lib/skills.test.js +109 -109
- package/bin/lib/types.js +82 -82
- package/bin/lib/ui.js +329 -329
- package/package.json +1 -1
package/bin/kit.js
CHANGED
|
@@ -1,89 +1,89 @@
|
|
|
1
|
-
#!/usr/bin/env node
|
|
2
|
-
/**
|
|
3
|
-
* Install Agent Skill CLI
|
|
4
|
-
* @description Package manager for AI Agent Skills
|
|
5
|
-
*/
|
|
6
|
-
import { c, brandedIntro } from "./lib/ui.js";
|
|
7
|
-
import { command, params, VERSION } from "./lib/config.js";
|
|
8
|
-
|
|
9
|
-
// --- Command Registry ---
|
|
10
|
-
const COMMANDS = {
|
|
11
|
-
// Installation
|
|
12
|
-
install: { module: "./lib/commands/install.js", hasParam: true, aliases: ["add", "i"] },
|
|
13
|
-
uninstall: { module: "./lib/commands/uninstall.js", hasParam: true, aliases: ["remove", "rm"] },
|
|
14
|
-
update: { module: "./lib/commands/update.js", hasParam: true },
|
|
15
|
-
|
|
16
|
-
// Workspace
|
|
17
|
-
init: { module: "./lib/commands/init.js", aliases: ["list", "ls"] },
|
|
18
|
-
lock: { module: "./lib/commands/lock.js" },
|
|
19
|
-
cache: { module: "./lib/commands/cache.js", hasParam: true },
|
|
20
|
-
|
|
21
|
-
// Validation
|
|
22
|
-
verify: { module: "./lib/commands/verify.js" },
|
|
23
|
-
doctor: { module: "./lib/commands/doctor.js" },
|
|
24
|
-
validate: { module: "./lib/commands/validate.js", hasParam: true, aliases: ["check"] },
|
|
25
|
-
analyze: { module: "./lib/commands/analyze.js", hasParam: true },
|
|
26
|
-
|
|
27
|
-
// Info
|
|
28
|
-
info: { module: "./lib/commands/info.js", hasParam: true, aliases: ["show"] },
|
|
29
|
-
help: { module: "./lib/commands/help.js", aliases: ["--help", "-h"] }
|
|
30
|
-
};
|
|
31
|
-
|
|
32
|
-
/**
|
|
33
|
-
* Find command config by name or alias
|
|
34
|
-
* @param {string} cmd - Command name or alias
|
|
35
|
-
* @returns {{ name: string, config: object } | null}
|
|
36
|
-
*/
|
|
37
|
-
function findCommand(cmd) {
|
|
38
|
-
// Direct match
|
|
39
|
-
if (COMMANDS[cmd]) {
|
|
40
|
-
return { name: cmd, config: COMMANDS[cmd] };
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
// Alias match
|
|
44
|
-
for (const [name, config] of Object.entries(COMMANDS)) {
|
|
45
|
-
if (config.aliases?.includes(cmd)) {
|
|
46
|
-
return { name, config };
|
|
47
|
-
}
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
return null;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
// --- MAIN ---
|
|
54
|
-
async function main() {
|
|
55
|
-
brandedIntro(VERSION);
|
|
56
|
-
|
|
57
|
-
try {
|
|
58
|
-
// Handle version flag
|
|
59
|
-
if (command === "--version" || command === "-V") {
|
|
60
|
-
console.log(VERSION);
|
|
61
|
-
return;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
// Find command
|
|
65
|
-
const found = findCommand(command);
|
|
66
|
-
|
|
67
|
-
if (found) {
|
|
68
|
-
const cmdModule = await import(found.config.module);
|
|
69
|
-
await cmdModule.run(found.config.hasParam ? params[0] : undefined);
|
|
70
|
-
} else if (command.includes("/")) {
|
|
71
|
-
// Direct install via org/repo syntax
|
|
72
|
-
const cmdModule = await import("./lib/commands/install.js");
|
|
73
|
-
await cmdModule.run(command);
|
|
74
|
-
} else {
|
|
75
|
-
console.log(`Unknown command: ${command}`);
|
|
76
|
-
const cmdModule = await import("./lib/commands/help.js");
|
|
77
|
-
await cmdModule.run();
|
|
78
|
-
}
|
|
79
|
-
} catch (err) {
|
|
80
|
-
console.error(c.red("\nError: " + err.message));
|
|
81
|
-
if (process.env.DEBUG) console.error(err.stack);
|
|
82
|
-
process.exit(1);
|
|
83
|
-
}
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
main().catch(err => {
|
|
87
|
-
console.error(c.red("\nFatal Error: " + err.message));
|
|
88
|
-
process.exit(1);
|
|
89
|
-
});
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/**
|
|
3
|
+
* Install Agent Skill CLI
|
|
4
|
+
* @description Package manager for AI Agent Skills
|
|
5
|
+
*/
|
|
6
|
+
import { c, brandedIntro } from "./lib/ui.js";
|
|
7
|
+
import { command, params, VERSION } from "./lib/config.js";
|
|
8
|
+
|
|
9
|
+
// --- Command Registry ---
|
|
10
|
+
const COMMANDS = {
|
|
11
|
+
// Installation
|
|
12
|
+
install: { module: "./lib/commands/install.js", hasParam: true, aliases: ["add", "i"] },
|
|
13
|
+
uninstall: { module: "./lib/commands/uninstall.js", hasParam: true, aliases: ["remove", "rm"] },
|
|
14
|
+
update: { module: "./lib/commands/update.js", hasParam: true },
|
|
15
|
+
|
|
16
|
+
// Workspace
|
|
17
|
+
init: { module: "./lib/commands/init.js", aliases: ["list", "ls"] },
|
|
18
|
+
lock: { module: "./lib/commands/lock.js" },
|
|
19
|
+
cache: { module: "./lib/commands/cache.js", hasParam: true },
|
|
20
|
+
|
|
21
|
+
// Validation
|
|
22
|
+
verify: { module: "./lib/commands/verify.js" },
|
|
23
|
+
doctor: { module: "./lib/commands/doctor.js" },
|
|
24
|
+
validate: { module: "./lib/commands/validate.js", hasParam: true, aliases: ["check"] },
|
|
25
|
+
analyze: { module: "./lib/commands/analyze.js", hasParam: true },
|
|
26
|
+
|
|
27
|
+
// Info
|
|
28
|
+
info: { module: "./lib/commands/info.js", hasParam: true, aliases: ["show"] },
|
|
29
|
+
help: { module: "./lib/commands/help.js", aliases: ["--help", "-h"] }
|
|
30
|
+
};
|
|
31
|
+
|
|
32
|
+
/**
|
|
33
|
+
* Find command config by name or alias
|
|
34
|
+
* @param {string} cmd - Command name or alias
|
|
35
|
+
* @returns {{ name: string, config: object } | null}
|
|
36
|
+
*/
|
|
37
|
+
function findCommand(cmd) {
|
|
38
|
+
// Direct match
|
|
39
|
+
if (COMMANDS[cmd]) {
|
|
40
|
+
return { name: cmd, config: COMMANDS[cmd] };
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
// Alias match
|
|
44
|
+
for (const [name, config] of Object.entries(COMMANDS)) {
|
|
45
|
+
if (config.aliases?.includes(cmd)) {
|
|
46
|
+
return { name, config };
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return null;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
// --- MAIN ---
|
|
54
|
+
async function main() {
|
|
55
|
+
brandedIntro(VERSION);
|
|
56
|
+
|
|
57
|
+
try {
|
|
58
|
+
// Handle version flag
|
|
59
|
+
if (command === "--version" || command === "-V") {
|
|
60
|
+
console.log(VERSION);
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
// Find command
|
|
65
|
+
const found = findCommand(command);
|
|
66
|
+
|
|
67
|
+
if (found) {
|
|
68
|
+
const cmdModule = await import(found.config.module);
|
|
69
|
+
await cmdModule.run(found.config.hasParam ? params[0] : undefined);
|
|
70
|
+
} else if (command.includes("/")) {
|
|
71
|
+
// Direct install via org/repo syntax
|
|
72
|
+
const cmdModule = await import("./lib/commands/install.js");
|
|
73
|
+
await cmdModule.run(command);
|
|
74
|
+
} else {
|
|
75
|
+
console.log(`Unknown command: ${command}`);
|
|
76
|
+
const cmdModule = await import("./lib/commands/help.js");
|
|
77
|
+
await cmdModule.run();
|
|
78
|
+
}
|
|
79
|
+
} catch (err) {
|
|
80
|
+
console.error(c.red("\nError: " + err.message));
|
|
81
|
+
if (process.env.DEBUG) console.error(err.stack);
|
|
82
|
+
process.exit(1);
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
main().catch(err => {
|
|
87
|
+
console.error(c.red("\nFatal Error: " + err.message));
|
|
88
|
+
process.exit(1);
|
|
89
|
+
});
|
package/bin/lib/agents.js
CHANGED
|
@@ -1,208 +1,208 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* @fileoverview Agent definitions and detection
|
|
3
|
-
* Based on Vercel's agent-skills CLI structure
|
|
4
|
-
*/
|
|
5
|
-
|
|
6
|
-
import { existsSync } from "fs";
|
|
7
|
-
import { homedir } from "os";
|
|
8
|
-
import { join } from "path";
|
|
9
|
-
|
|
10
|
-
const home = homedir();
|
|
11
|
-
|
|
12
|
-
// Environment-based paths
|
|
13
|
-
const codexHome = process.env.CODEX_HOME?.trim() || join(home, ".codex");
|
|
14
|
-
const claudeHome = process.env.CLAUDE_CONFIG_DIR?.trim() || join(home, ".claude");
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* @typedef {Object} AgentConfig
|
|
18
|
-
* @property {string} name - Internal agent ID
|
|
19
|
-
* @property {string} displayName - Display name for UI
|
|
20
|
-
* @property {string} skillsDir - Project-level skills directory
|
|
21
|
-
* @property {string} globalSkillsDir - Global skills directory
|
|
22
|
-
* @property {() => boolean} detect - Detection function
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
/**
|
|
26
|
-
* All supported agents with detection logic
|
|
27
|
-
* @type {Record<string, AgentConfig>}
|
|
28
|
-
*/
|
|
29
|
-
export const AGENTS = {
|
|
30
|
-
antigravity: {
|
|
31
|
-
name: "antigravity",
|
|
32
|
-
displayName: "Antigravity",
|
|
33
|
-
skillsDir: ".agent/skills",
|
|
34
|
-
globalSkillsDir: join(home, ".gemini/antigravity/global_skills"),
|
|
35
|
-
detect: () => existsSync(join(process.cwd(), ".agent")) || existsSync(join(home, ".gemini/antigravity"))
|
|
36
|
-
},
|
|
37
|
-
"claude-code": {
|
|
38
|
-
name: "claude-code",
|
|
39
|
-
displayName: "Claude Code",
|
|
40
|
-
skillsDir: ".claude/skills",
|
|
41
|
-
globalSkillsDir: join(claudeHome, "skills"),
|
|
42
|
-
detect: () => existsSync(claudeHome)
|
|
43
|
-
},
|
|
44
|
-
codex: {
|
|
45
|
-
name: "codex",
|
|
46
|
-
displayName: "Codex",
|
|
47
|
-
skillsDir: ".codex/skills",
|
|
48
|
-
globalSkillsDir: join(codexHome, "skills"),
|
|
49
|
-
detect: () => existsSync(codexHome) || existsSync("/etc/codex")
|
|
50
|
-
},
|
|
51
|
-
"gemini-cli": {
|
|
52
|
-
name: "gemini-cli",
|
|
53
|
-
displayName: "Gemini CLI",
|
|
54
|
-
skillsDir: ".gemini/skills",
|
|
55
|
-
globalSkillsDir: join(home, ".gemini/skills"),
|
|
56
|
-
detect: () => existsSync(join(home, ".gemini"))
|
|
57
|
-
},
|
|
58
|
-
"github-copilot": {
|
|
59
|
-
name: "github-copilot",
|
|
60
|
-
displayName: "GitHub Copilot",
|
|
61
|
-
skillsDir: ".github/skills",
|
|
62
|
-
globalSkillsDir: join(home, ".copilot/skills"),
|
|
63
|
-
detect: () => existsSync(join(process.cwd(), ".github")) || existsSync(join(home, ".copilot"))
|
|
64
|
-
},
|
|
65
|
-
windsurf: {
|
|
66
|
-
name: "windsurf",
|
|
67
|
-
displayName: "Windsurf",
|
|
68
|
-
skillsDir: ".windsurf/skills",
|
|
69
|
-
globalSkillsDir: join(home, ".codeium/windsurf/skills"),
|
|
70
|
-
detect: () => existsSync(join(home, ".codeium/windsurf"))
|
|
71
|
-
},
|
|
72
|
-
cursor: {
|
|
73
|
-
name: "cursor",
|
|
74
|
-
displayName: "Cursor",
|
|
75
|
-
skillsDir: ".cursor/skills",
|
|
76
|
-
globalSkillsDir: join(home, ".cursor/skills"),
|
|
77
|
-
detect: () => existsSync(join(home, ".cursor"))
|
|
78
|
-
},
|
|
79
|
-
cline: {
|
|
80
|
-
name: "cline",
|
|
81
|
-
displayName: "Cline",
|
|
82
|
-
skillsDir: ".cline/skills",
|
|
83
|
-
globalSkillsDir: join(home, ".cline/skills"),
|
|
84
|
-
detect: () => existsSync(join(home, ".cline"))
|
|
85
|
-
},
|
|
86
|
-
roo: {
|
|
87
|
-
name: "roo",
|
|
88
|
-
displayName: "Roo Code",
|
|
89
|
-
skillsDir: ".roo/skills",
|
|
90
|
-
globalSkillsDir: join(home, ".roo/skills"),
|
|
91
|
-
detect: () => existsSync(join(home, ".roo"))
|
|
92
|
-
},
|
|
93
|
-
continue: {
|
|
94
|
-
name: "continue",
|
|
95
|
-
displayName: "Continue",
|
|
96
|
-
skillsDir: ".continue/skills",
|
|
97
|
-
globalSkillsDir: join(home, ".continue/skills"),
|
|
98
|
-
detect: () => existsSync(join(process.cwd(), ".continue")) || existsSync(join(home, ".continue"))
|
|
99
|
-
},
|
|
100
|
-
goose: {
|
|
101
|
-
name: "goose",
|
|
102
|
-
displayName: "Goose",
|
|
103
|
-
skillsDir: ".goose/skills",
|
|
104
|
-
globalSkillsDir: join(home, ".config/goose/skills"),
|
|
105
|
-
detect: () => existsSync(join(home, ".config/goose"))
|
|
106
|
-
},
|
|
107
|
-
trae: {
|
|
108
|
-
name: "trae",
|
|
109
|
-
displayName: "Trae",
|
|
110
|
-
skillsDir: ".trae/skills",
|
|
111
|
-
globalSkillsDir: join(home, ".trae/skills"),
|
|
112
|
-
detect: () => existsSync(join(home, ".trae"))
|
|
113
|
-
},
|
|
114
|
-
kilo: {
|
|
115
|
-
name: "kilo",
|
|
116
|
-
displayName: "Kilo Code",
|
|
117
|
-
skillsDir: ".kilocode/skills",
|
|
118
|
-
globalSkillsDir: join(home, ".kilocode/skills"),
|
|
119
|
-
detect: () => existsSync(join(home, ".kilocode"))
|
|
120
|
-
},
|
|
121
|
-
opencode: {
|
|
122
|
-
name: "opencode",
|
|
123
|
-
displayName: "OpenCode",
|
|
124
|
-
skillsDir: ".opencode/skills",
|
|
125
|
-
globalSkillsDir: join(home, ".config/opencode/skills"),
|
|
126
|
-
detect: () => existsSync(join(home, ".config/opencode"))
|
|
127
|
-
},
|
|
128
|
-
amp: {
|
|
129
|
-
name: "amp",
|
|
130
|
-
displayName: "Amp",
|
|
131
|
-
skillsDir: ".agents/skills",
|
|
132
|
-
globalSkillsDir: join(home, ".config/agents/skills"),
|
|
133
|
-
detect: () => existsSync(join(home, ".config/amp"))
|
|
134
|
-
},
|
|
135
|
-
junie: {
|
|
136
|
-
name: "junie",
|
|
137
|
-
displayName: "Junie",
|
|
138
|
-
skillsDir: ".junie/skills",
|
|
139
|
-
globalSkillsDir: join(home, ".junie/skills"),
|
|
140
|
-
detect: () => existsSync(join(home, ".junie"))
|
|
141
|
-
},
|
|
142
|
-
"kiro-cli": {
|
|
143
|
-
name: "kiro-cli",
|
|
144
|
-
displayName: "Kiro CLI",
|
|
145
|
-
skillsDir: ".kiro/skills",
|
|
146
|
-
globalSkillsDir: join(home, ".kiro/skills"),
|
|
147
|
-
detect: () => existsSync(join(home, ".kiro"))
|
|
148
|
-
},
|
|
149
|
-
zencoder: {
|
|
150
|
-
name: "zencoder",
|
|
151
|
-
displayName: "Zencoder",
|
|
152
|
-
skillsDir: ".zencoder/skills",
|
|
153
|
-
globalSkillsDir: join(home, ".zencoder/skills"),
|
|
154
|
-
detect: () => existsSync(join(home, ".zencoder"))
|
|
155
|
-
},
|
|
156
|
-
openhands: {
|
|
157
|
-
name: "openhands",
|
|
158
|
-
displayName: "OpenHands",
|
|
159
|
-
skillsDir: ".openhands/skills",
|
|
160
|
-
globalSkillsDir: join(home, ".openhands/skills"),
|
|
161
|
-
detect: () => existsSync(join(home, ".openhands"))
|
|
162
|
-
},
|
|
163
|
-
"qwen-code": {
|
|
164
|
-
name: "qwen-code",
|
|
165
|
-
displayName: "Qwen Code",
|
|
166
|
-
skillsDir: ".qwen/skills",
|
|
167
|
-
globalSkillsDir: join(home, ".qwen/skills"),
|
|
168
|
-
detect: () => existsSync(join(home, ".qwen"))
|
|
169
|
-
}
|
|
170
|
-
};
|
|
171
|
-
|
|
172
|
-
/**
|
|
173
|
-
* Detect all installed agents on the system
|
|
174
|
-
* @returns {Array<{name: string, displayName: string, skillsDir: string, globalSkillsDir: string}>}
|
|
175
|
-
*/
|
|
176
|
-
export function detectInstalledAgents() {
|
|
177
|
-
const detected = [];
|
|
178
|
-
|
|
179
|
-
for (const [key, config] of Object.entries(AGENTS)) {
|
|
180
|
-
if (config.detect()) {
|
|
181
|
-
detected.push({
|
|
182
|
-
name: config.name,
|
|
183
|
-
displayName: config.displayName,
|
|
184
|
-
skillsDir: config.skillsDir,
|
|
185
|
-
globalSkillsDir: config.globalSkillsDir
|
|
186
|
-
});
|
|
187
|
-
}
|
|
188
|
-
}
|
|
189
|
-
|
|
190
|
-
return detected;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
/**
|
|
194
|
-
* Get agent config by name
|
|
195
|
-
* @param {string} name - Agent name
|
|
196
|
-
* @returns {AgentConfig | undefined}
|
|
197
|
-
*/
|
|
198
|
-
export function getAgentConfig(name) {
|
|
199
|
-
return AGENTS[name];
|
|
200
|
-
}
|
|
201
|
-
|
|
202
|
-
/**
|
|
203
|
-
* Get all agent names
|
|
204
|
-
* @returns {string[]}
|
|
205
|
-
*/
|
|
206
|
-
export function getAllAgentNames() {
|
|
207
|
-
return Object.keys(AGENTS);
|
|
208
|
-
}
|
|
1
|
+
/**
|
|
2
|
+
* @fileoverview Agent definitions and detection
|
|
3
|
+
* Based on Vercel's agent-skills CLI structure
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import { existsSync } from "fs";
|
|
7
|
+
import { homedir } from "os";
|
|
8
|
+
import { join } from "path";
|
|
9
|
+
|
|
10
|
+
const home = homedir();
|
|
11
|
+
|
|
12
|
+
// Environment-based paths
|
|
13
|
+
const codexHome = process.env.CODEX_HOME?.trim() || join(home, ".codex");
|
|
14
|
+
const claudeHome = process.env.CLAUDE_CONFIG_DIR?.trim() || join(home, ".claude");
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* @typedef {Object} AgentConfig
|
|
18
|
+
* @property {string} name - Internal agent ID
|
|
19
|
+
* @property {string} displayName - Display name for UI
|
|
20
|
+
* @property {string} skillsDir - Project-level skills directory
|
|
21
|
+
* @property {string} globalSkillsDir - Global skills directory
|
|
22
|
+
* @property {() => boolean} detect - Detection function
|
|
23
|
+
*/
|
|
24
|
+
|
|
25
|
+
/**
|
|
26
|
+
* All supported agents with detection logic
|
|
27
|
+
* @type {Record<string, AgentConfig>}
|
|
28
|
+
*/
|
|
29
|
+
export const AGENTS = {
|
|
30
|
+
antigravity: {
|
|
31
|
+
name: "antigravity",
|
|
32
|
+
displayName: "Antigravity",
|
|
33
|
+
skillsDir: ".agent/skills",
|
|
34
|
+
globalSkillsDir: join(home, ".gemini/antigravity/global_skills"),
|
|
35
|
+
detect: () => existsSync(join(process.cwd(), ".agent")) || existsSync(join(home, ".gemini/antigravity"))
|
|
36
|
+
},
|
|
37
|
+
"claude-code": {
|
|
38
|
+
name: "claude-code",
|
|
39
|
+
displayName: "Claude Code",
|
|
40
|
+
skillsDir: ".claude/skills",
|
|
41
|
+
globalSkillsDir: join(claudeHome, "skills"),
|
|
42
|
+
detect: () => existsSync(claudeHome)
|
|
43
|
+
},
|
|
44
|
+
codex: {
|
|
45
|
+
name: "codex",
|
|
46
|
+
displayName: "Codex",
|
|
47
|
+
skillsDir: ".codex/skills",
|
|
48
|
+
globalSkillsDir: join(codexHome, "skills"),
|
|
49
|
+
detect: () => existsSync(codexHome) || existsSync("/etc/codex")
|
|
50
|
+
},
|
|
51
|
+
"gemini-cli": {
|
|
52
|
+
name: "gemini-cli",
|
|
53
|
+
displayName: "Gemini CLI",
|
|
54
|
+
skillsDir: ".gemini/skills",
|
|
55
|
+
globalSkillsDir: join(home, ".gemini/skills"),
|
|
56
|
+
detect: () => existsSync(join(home, ".gemini"))
|
|
57
|
+
},
|
|
58
|
+
"github-copilot": {
|
|
59
|
+
name: "github-copilot",
|
|
60
|
+
displayName: "GitHub Copilot",
|
|
61
|
+
skillsDir: ".github/skills",
|
|
62
|
+
globalSkillsDir: join(home, ".copilot/skills"),
|
|
63
|
+
detect: () => existsSync(join(process.cwd(), ".github")) || existsSync(join(home, ".copilot"))
|
|
64
|
+
},
|
|
65
|
+
windsurf: {
|
|
66
|
+
name: "windsurf",
|
|
67
|
+
displayName: "Windsurf",
|
|
68
|
+
skillsDir: ".windsurf/skills",
|
|
69
|
+
globalSkillsDir: join(home, ".codeium/windsurf/skills"),
|
|
70
|
+
detect: () => existsSync(join(home, ".codeium/windsurf"))
|
|
71
|
+
},
|
|
72
|
+
cursor: {
|
|
73
|
+
name: "cursor",
|
|
74
|
+
displayName: "Cursor",
|
|
75
|
+
skillsDir: ".cursor/skills",
|
|
76
|
+
globalSkillsDir: join(home, ".cursor/skills"),
|
|
77
|
+
detect: () => existsSync(join(home, ".cursor"))
|
|
78
|
+
},
|
|
79
|
+
cline: {
|
|
80
|
+
name: "cline",
|
|
81
|
+
displayName: "Cline",
|
|
82
|
+
skillsDir: ".cline/skills",
|
|
83
|
+
globalSkillsDir: join(home, ".cline/skills"),
|
|
84
|
+
detect: () => existsSync(join(home, ".cline"))
|
|
85
|
+
},
|
|
86
|
+
roo: {
|
|
87
|
+
name: "roo",
|
|
88
|
+
displayName: "Roo Code",
|
|
89
|
+
skillsDir: ".roo/skills",
|
|
90
|
+
globalSkillsDir: join(home, ".roo/skills"),
|
|
91
|
+
detect: () => existsSync(join(home, ".roo"))
|
|
92
|
+
},
|
|
93
|
+
continue: {
|
|
94
|
+
name: "continue",
|
|
95
|
+
displayName: "Continue",
|
|
96
|
+
skillsDir: ".continue/skills",
|
|
97
|
+
globalSkillsDir: join(home, ".continue/skills"),
|
|
98
|
+
detect: () => existsSync(join(process.cwd(), ".continue")) || existsSync(join(home, ".continue"))
|
|
99
|
+
},
|
|
100
|
+
goose: {
|
|
101
|
+
name: "goose",
|
|
102
|
+
displayName: "Goose",
|
|
103
|
+
skillsDir: ".goose/skills",
|
|
104
|
+
globalSkillsDir: join(home, ".config/goose/skills"),
|
|
105
|
+
detect: () => existsSync(join(home, ".config/goose"))
|
|
106
|
+
},
|
|
107
|
+
trae: {
|
|
108
|
+
name: "trae",
|
|
109
|
+
displayName: "Trae",
|
|
110
|
+
skillsDir: ".trae/skills",
|
|
111
|
+
globalSkillsDir: join(home, ".trae/skills"),
|
|
112
|
+
detect: () => existsSync(join(home, ".trae"))
|
|
113
|
+
},
|
|
114
|
+
kilo: {
|
|
115
|
+
name: "kilo",
|
|
116
|
+
displayName: "Kilo Code",
|
|
117
|
+
skillsDir: ".kilocode/skills",
|
|
118
|
+
globalSkillsDir: join(home, ".kilocode/skills"),
|
|
119
|
+
detect: () => existsSync(join(home, ".kilocode"))
|
|
120
|
+
},
|
|
121
|
+
opencode: {
|
|
122
|
+
name: "opencode",
|
|
123
|
+
displayName: "OpenCode",
|
|
124
|
+
skillsDir: ".opencode/skills",
|
|
125
|
+
globalSkillsDir: join(home, ".config/opencode/skills"),
|
|
126
|
+
detect: () => existsSync(join(home, ".config/opencode"))
|
|
127
|
+
},
|
|
128
|
+
amp: {
|
|
129
|
+
name: "amp",
|
|
130
|
+
displayName: "Amp",
|
|
131
|
+
skillsDir: ".agents/skills",
|
|
132
|
+
globalSkillsDir: join(home, ".config/agents/skills"),
|
|
133
|
+
detect: () => existsSync(join(home, ".config/amp"))
|
|
134
|
+
},
|
|
135
|
+
junie: {
|
|
136
|
+
name: "junie",
|
|
137
|
+
displayName: "Junie",
|
|
138
|
+
skillsDir: ".junie/skills",
|
|
139
|
+
globalSkillsDir: join(home, ".junie/skills"),
|
|
140
|
+
detect: () => existsSync(join(home, ".junie"))
|
|
141
|
+
},
|
|
142
|
+
"kiro-cli": {
|
|
143
|
+
name: "kiro-cli",
|
|
144
|
+
displayName: "Kiro CLI",
|
|
145
|
+
skillsDir: ".kiro/skills",
|
|
146
|
+
globalSkillsDir: join(home, ".kiro/skills"),
|
|
147
|
+
detect: () => existsSync(join(home, ".kiro"))
|
|
148
|
+
},
|
|
149
|
+
zencoder: {
|
|
150
|
+
name: "zencoder",
|
|
151
|
+
displayName: "Zencoder",
|
|
152
|
+
skillsDir: ".zencoder/skills",
|
|
153
|
+
globalSkillsDir: join(home, ".zencoder/skills"),
|
|
154
|
+
detect: () => existsSync(join(home, ".zencoder"))
|
|
155
|
+
},
|
|
156
|
+
openhands: {
|
|
157
|
+
name: "openhands",
|
|
158
|
+
displayName: "OpenHands",
|
|
159
|
+
skillsDir: ".openhands/skills",
|
|
160
|
+
globalSkillsDir: join(home, ".openhands/skills"),
|
|
161
|
+
detect: () => existsSync(join(home, ".openhands"))
|
|
162
|
+
},
|
|
163
|
+
"qwen-code": {
|
|
164
|
+
name: "qwen-code",
|
|
165
|
+
displayName: "Qwen Code",
|
|
166
|
+
skillsDir: ".qwen/skills",
|
|
167
|
+
globalSkillsDir: join(home, ".qwen/skills"),
|
|
168
|
+
detect: () => existsSync(join(home, ".qwen"))
|
|
169
|
+
}
|
|
170
|
+
};
|
|
171
|
+
|
|
172
|
+
/**
|
|
173
|
+
* Detect all installed agents on the system
|
|
174
|
+
* @returns {Array<{name: string, displayName: string, skillsDir: string, globalSkillsDir: string}>}
|
|
175
|
+
*/
|
|
176
|
+
export function detectInstalledAgents() {
|
|
177
|
+
const detected = [];
|
|
178
|
+
|
|
179
|
+
for (const [key, config] of Object.entries(AGENTS)) {
|
|
180
|
+
if (config.detect()) {
|
|
181
|
+
detected.push({
|
|
182
|
+
name: config.name,
|
|
183
|
+
displayName: config.displayName,
|
|
184
|
+
skillsDir: config.skillsDir,
|
|
185
|
+
globalSkillsDir: config.globalSkillsDir
|
|
186
|
+
});
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
|
|
190
|
+
return detected;
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
/**
|
|
194
|
+
* Get agent config by name
|
|
195
|
+
* @param {string} name - Agent name
|
|
196
|
+
* @returns {AgentConfig | undefined}
|
|
197
|
+
*/
|
|
198
|
+
export function getAgentConfig(name) {
|
|
199
|
+
return AGENTS[name];
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
/**
|
|
203
|
+
* Get all agent names
|
|
204
|
+
* @returns {string[]}
|
|
205
|
+
*/
|
|
206
|
+
export function getAllAgentNames() {
|
|
207
|
+
return Object.keys(AGENTS);
|
|
208
|
+
}
|