@riligar/agents-kit 1.3.0 → 1.4.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/README.md +3 -3
- package/bin/cli.js +19 -18
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -31,9 +31,9 @@ bunx @riligar/agents-kit init
|
|
|
31
31
|
|
|
32
32
|
### What happens behind the scenes?
|
|
33
33
|
|
|
34
|
-
1.
|
|
35
|
-
2. Automatically updates your `.gitignore` to
|
|
36
|
-
3. Sets up your environment for AI Agent interaction without
|
|
34
|
+
1. Syncs the `.agent` directory (containing all rules and skills) to your project root, adding new resources without overwriting your existing ones.
|
|
35
|
+
2. Automatically updates your `.gitignore` to ensure `.agent` is ignored.
|
|
36
|
+
3. Sets up your environment for AI Agent interaction without polluting your `node_modules`.
|
|
37
37
|
|
|
38
38
|
## Development & Releases
|
|
39
39
|
|
package/bin/cli.js
CHANGED
|
@@ -13,24 +13,25 @@ async function init() {
|
|
|
13
13
|
process.exit(1)
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
if (
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
16
|
+
console.log('Syncing .agent directory to your project...')
|
|
17
|
+
|
|
18
|
+
const merge = (src, dest) => {
|
|
19
|
+
if (!fs.existsSync(dest)) fs.mkdirSync(dest, { recursive: true })
|
|
20
|
+
fs.readdirSync(src).forEach(item => {
|
|
21
|
+
if (item === '.DS_Store') return
|
|
22
|
+
const s = path.join(src, item),
|
|
23
|
+
d = path.join(dest, item)
|
|
24
|
+
if (fs.statSync(s).isDirectory()) merge(s, d)
|
|
25
|
+
else if (!fs.existsSync(d)) fs.copyFileSync(s, d)
|
|
26
|
+
})
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
try {
|
|
30
|
+
merge(source, target)
|
|
31
|
+
console.log('Successfully installed/updated .agent directory!')
|
|
32
|
+
} catch (error) {
|
|
33
|
+
console.error('Failed to copy .agent directory:', error.message)
|
|
34
|
+
process.exit(1)
|
|
34
35
|
}
|
|
35
36
|
|
|
36
37
|
// Manage .gitignore
|