@petersobhy/ai-toolkit 1.0.0 → 1.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/index.js +13 -4
- package/package.json +2 -2
package/index.js
CHANGED
|
@@ -5,7 +5,7 @@ const fs = require('fs');
|
|
|
5
5
|
const path = require('path');
|
|
6
6
|
const os = require('os');
|
|
7
7
|
|
|
8
|
-
const REPO = '
|
|
8
|
+
const REPO = 'Petersobhy/ai-toolkit';
|
|
9
9
|
const BRANCH = 'main';
|
|
10
10
|
const SKILLS_PATH = 'skills';
|
|
11
11
|
const INSTALL_DIR = path.join(os.homedir(), '.claude', 'agents');
|
|
@@ -29,6 +29,11 @@ function get(url) {
|
|
|
29
29
|
});
|
|
30
30
|
}
|
|
31
31
|
|
|
32
|
+
function parseVersion(content) {
|
|
33
|
+
const match = content.match(/^---[\s\S]*?^version:\s*(.+?)$/m);
|
|
34
|
+
return match ? match[1].trim() : null;
|
|
35
|
+
}
|
|
36
|
+
|
|
32
37
|
async function listAvailable() {
|
|
33
38
|
const data = JSON.parse(await get(`${API_BASE}/${SKILLS_PATH}`));
|
|
34
39
|
return data
|
|
@@ -85,11 +90,15 @@ async function cmdUpdate() {
|
|
|
85
90
|
}
|
|
86
91
|
|
|
87
92
|
async function cmdList() {
|
|
88
|
-
const
|
|
93
|
+
const available = await listAvailable();
|
|
94
|
+
const installed = listInstalled();
|
|
89
95
|
console.log('Available skills:\n');
|
|
90
96
|
for (const name of available) {
|
|
91
|
-
const
|
|
92
|
-
|
|
97
|
+
const content = await get(`${RAW_BASE}/${SKILLS_PATH}/${name}.md`);
|
|
98
|
+
const version = parseVersion(content);
|
|
99
|
+
const versionTag = version ? ` v${version}` : '';
|
|
100
|
+
const installedTag = installed.includes(name) ? ' (installed)' : '';
|
|
101
|
+
console.log(` ${name}${versionTag}${installedTag}`);
|
|
93
102
|
}
|
|
94
103
|
}
|
|
95
104
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@petersobhy/ai-toolkit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.1.0",
|
|
4
4
|
"description": "Install and manage Integrant squad AI skills for Claude Code",
|
|
5
5
|
"bin": {
|
|
6
6
|
"ai-toolkit": "./index.js"
|
|
@@ -14,6 +14,6 @@
|
|
|
14
14
|
"license": "UNLICENSED",
|
|
15
15
|
"repository": {
|
|
16
16
|
"type": "git",
|
|
17
|
-
"url": "https://github.com/
|
|
17
|
+
"url": "https://github.com/Petersobhy/ai-toolkit.git"
|
|
18
18
|
}
|
|
19
19
|
}
|