ctx7 0.4.3 → 0.4.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/dist/index.js +29 -6
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1942,7 +1942,7 @@ function registerSkillCommands(program2) {
|
|
|
1942
1942
|
skill.command("search").alias("s").argument("<keywords...>", "Search keywords").description("Search for skills across all indexed repositories").action(async (keywords) => {
|
|
1943
1943
|
await searchCommand(keywords.join(" "));
|
|
1944
1944
|
});
|
|
1945
|
-
skill.command("list").alias("ls").option("--global", "List global skills").option("--claude", "Claude Code (.claude/skills/)").option("--cursor", "Cursor (.cursor/skills/)").option("--universal", "Universal (.agents/skills/)").option("--antigravity", "Antigravity (.agent/skills/)").description("List installed skills").action(async (options) => {
|
|
1945
|
+
skill.command("list").alias("ls").option("--json", "Output as JSON").option("--global", "List global skills").option("--claude", "Claude Code (.claude/skills/)").option("--cursor", "Cursor (.cursor/skills/)").option("--universal", "Universal (.agents/skills/)").option("--antigravity", "Antigravity (.agent/skills/)").description("List installed skills").action(async (options) => {
|
|
1946
1946
|
await listCommand(options);
|
|
1947
1947
|
});
|
|
1948
1948
|
skill.command("remove").alias("rm").alias("delete").argument("<name>", "Skill name to remove").option("--global", "Remove from global skills").option("--claude", "Claude Code (.claude/skills/)").option("--cursor", "Cursor (.cursor/skills/)").option("--universal", "Universal (.agents/skills/)").option("--antigravity", "Antigravity (.agent/skills/)").description("Remove an installed skill").action(async (name, options) => {
|
|
@@ -2344,7 +2344,7 @@ async function listCommand(options) {
|
|
|
2344
2344
|
const label = ide === "universal" ? UNIVERSAL_AGENTS_LABEL : IDE_NAMES[ide];
|
|
2345
2345
|
const skills = await scanDir(dir);
|
|
2346
2346
|
if (skills.length > 0) {
|
|
2347
|
-
results.push({ label,
|
|
2347
|
+
results.push({ label, displayPath: dir, dir, source: ide, skills });
|
|
2348
2348
|
}
|
|
2349
2349
|
}
|
|
2350
2350
|
} else {
|
|
@@ -2352,24 +2352,47 @@ async function listCommand(options) {
|
|
|
2352
2352
|
const universalDir = join6(baseDir, universalPath);
|
|
2353
2353
|
const universalSkills = await scanDir(universalDir);
|
|
2354
2354
|
if (universalSkills.length > 0) {
|
|
2355
|
-
results.push({
|
|
2355
|
+
results.push({
|
|
2356
|
+
label: UNIVERSAL_AGENTS_LABEL,
|
|
2357
|
+
displayPath: universalPath,
|
|
2358
|
+
dir: universalDir,
|
|
2359
|
+
source: "universal",
|
|
2360
|
+
skills: universalSkills
|
|
2361
|
+
});
|
|
2356
2362
|
}
|
|
2357
2363
|
for (const ide of VENDOR_SPECIFIC_AGENTS) {
|
|
2358
2364
|
const pathMap = scope === "global" ? IDE_GLOBAL_PATHS : IDE_PATHS;
|
|
2359
2365
|
const dir = join6(baseDir, pathMap[ide]);
|
|
2360
2366
|
const skills = await scanDir(dir);
|
|
2361
2367
|
if (skills.length > 0) {
|
|
2362
|
-
results.push({
|
|
2368
|
+
results.push({
|
|
2369
|
+
label: IDE_NAMES[ide],
|
|
2370
|
+
displayPath: pathMap[ide],
|
|
2371
|
+
dir,
|
|
2372
|
+
source: ide,
|
|
2373
|
+
skills
|
|
2374
|
+
});
|
|
2363
2375
|
}
|
|
2364
2376
|
}
|
|
2365
2377
|
}
|
|
2378
|
+
if (options.json) {
|
|
2379
|
+
const skills = results.flatMap(
|
|
2380
|
+
(result) => result.skills.map((name) => ({
|
|
2381
|
+
name,
|
|
2382
|
+
path: join6(result.dir, name),
|
|
2383
|
+
source: result.source
|
|
2384
|
+
}))
|
|
2385
|
+
);
|
|
2386
|
+
console.log(JSON.stringify({ skills }, null, 2));
|
|
2387
|
+
return;
|
|
2388
|
+
}
|
|
2366
2389
|
if (results.length === 0) {
|
|
2367
2390
|
log.warn("No skills installed");
|
|
2368
2391
|
return;
|
|
2369
2392
|
}
|
|
2370
2393
|
log.blank();
|
|
2371
|
-
for (const { label,
|
|
2372
|
-
log.plain(`${pc7.bold(label)} ${pc7.dim(
|
|
2394
|
+
for (const { label, displayPath, skills } of results) {
|
|
2395
|
+
log.plain(`${pc7.bold(label)} ${pc7.dim(displayPath)}`);
|
|
2373
2396
|
for (const skill of skills) {
|
|
2374
2397
|
log.plain(` ${pc7.green(skill)}`);
|
|
2375
2398
|
}
|