antikit 1.12.2 → 1.12.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/package.json +2 -1
- package/src/commands/local.js +37 -9
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "antikit",
|
|
3
|
-
"version": "1.12.
|
|
3
|
+
"version": "1.12.4",
|
|
4
4
|
"description": "CLI tool to manage AI agent skills from Anti Gravity skills repository",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "src/index.js",
|
|
@@ -46,6 +46,7 @@
|
|
|
46
46
|
"dependencies": {
|
|
47
47
|
"@inquirer/prompts": "^8.2.0",
|
|
48
48
|
"chalk": "^5.3.0",
|
|
49
|
+
"cli-table3": "^0.6.5",
|
|
49
50
|
"commander": "^12.1.0",
|
|
50
51
|
"marked": "^15.0.12",
|
|
51
52
|
"marked-terminal": "^7.3.0",
|
package/src/commands/local.js
CHANGED
|
@@ -1,5 +1,8 @@
|
|
|
1
1
|
import chalk from 'chalk';
|
|
2
|
+
import Table from 'cli-table3';
|
|
2
3
|
import { getLocalSkills, findLocalSkillsDir } from '../utils/local.js';
|
|
4
|
+
import fs from 'fs';
|
|
5
|
+
import path from 'path';
|
|
3
6
|
|
|
4
7
|
export async function listLocalSkills() {
|
|
5
8
|
const skillsDir = findLocalSkillsDir();
|
|
@@ -18,16 +21,41 @@ export async function listLocalSkills() {
|
|
|
18
21
|
return;
|
|
19
22
|
}
|
|
20
23
|
|
|
21
|
-
|
|
22
|
-
|
|
24
|
+
const table = new Table({
|
|
25
|
+
head: [chalk.cyan('Skill Name'), chalk.cyan('Version'), chalk.cyan('Description')],
|
|
26
|
+
colWidths: [30, 15, Math.max(20, (process.stdout.columns || 80) - 55)],
|
|
27
|
+
wordWrap: true,
|
|
28
|
+
style: { head: [], border: [] }
|
|
29
|
+
});
|
|
23
30
|
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
31
|
+
skills.forEach(skill => {
|
|
32
|
+
let version = 'local';
|
|
33
|
+
|
|
34
|
+
// Try read .antikit-skill.json (installed metadata)
|
|
35
|
+
try {
|
|
36
|
+
const metaPath = path.join(skill.path, '.antikit-skill.json');
|
|
37
|
+
if (fs.existsSync(metaPath)) {
|
|
38
|
+
const meta = JSON.parse(fs.readFileSync(metaPath, 'utf8'));
|
|
39
|
+
if (meta.version) version = meta.version;
|
|
40
|
+
} else {
|
|
41
|
+
// Try read SKILL.md frontmatter
|
|
42
|
+
const skillRef = path.join(skill.path, 'SKILL.md');
|
|
43
|
+
if (fs.existsSync(skillRef)) {
|
|
44
|
+
const content = fs.readFileSync(skillRef, 'utf8');
|
|
45
|
+
const match = content.match(/version:\s*(.+)/);
|
|
46
|
+
if (match) version = match[1].trim();
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
} catch {}
|
|
50
|
+
|
|
51
|
+
table.push([
|
|
52
|
+
chalk.bold.green(skill.name),
|
|
53
|
+
version === 'local' ? chalk.dim(version) : chalk.yellow(version),
|
|
54
|
+
skill.description || chalk.dim('No description')
|
|
55
|
+
]);
|
|
56
|
+
});
|
|
30
57
|
|
|
58
|
+
console.log(chalk.bold(`\nInstalled Skills (${skills.length}) at ${chalk.gray(skillsDir)}`));
|
|
59
|
+
console.log(table.toString());
|
|
31
60
|
console.log();
|
|
32
|
-
console.log(chalk.dim(`Skills directory: ${skillsDir}`));
|
|
33
61
|
}
|