ironweave 1.0.0 → 1.0.1
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/cli.js +125 -0
- package/package.json +5 -1
package/bin/cli.js
ADDED
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
|
|
3
|
+
const fs = require('fs');
|
|
4
|
+
const path = require('path');
|
|
5
|
+
|
|
6
|
+
const args = process.argv.slice(2);
|
|
7
|
+
const command = args[0] || 'init';
|
|
8
|
+
|
|
9
|
+
if (command === '--help' || command === '-h') {
|
|
10
|
+
console.log(`
|
|
11
|
+
ironweave - Agentic skills framework for AI coding agents
|
|
12
|
+
|
|
13
|
+
Usage:
|
|
14
|
+
npx ironweave init [options] Install skills into current project
|
|
15
|
+
npx ironweave list List all available skills
|
|
16
|
+
|
|
17
|
+
Options:
|
|
18
|
+
--agent <name> Only install config for specific agent
|
|
19
|
+
(claude, copilot, cursor, windsurf, cline, codex, gemini, all)
|
|
20
|
+
Default: all
|
|
21
|
+
--skills-only Only copy skills/, skip agent config files
|
|
22
|
+
--help Show this help message
|
|
23
|
+
`);
|
|
24
|
+
process.exit(0);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
if (command === 'list') {
|
|
28
|
+
const skillsDir = path.join(__dirname, '..', 'skills');
|
|
29
|
+
const skills = fs.readdirSync(skillsDir).filter(f => {
|
|
30
|
+
return fs.statSync(path.join(skillsDir, f)).isDirectory();
|
|
31
|
+
});
|
|
32
|
+
console.log(`\nIronweave Skills (${skills.length}):\n`);
|
|
33
|
+
skills.forEach(s => console.log(` - ${s}`));
|
|
34
|
+
console.log('');
|
|
35
|
+
process.exit(0);
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
if (command === 'init') {
|
|
39
|
+
const targetDir = process.cwd();
|
|
40
|
+
const pkgDir = path.join(__dirname, '..');
|
|
41
|
+
|
|
42
|
+
const agentFlag = args.indexOf('--agent');
|
|
43
|
+
const agent = agentFlag !== -1 ? args[agentFlag + 1] : 'all';
|
|
44
|
+
const skillsOnly = args.includes('--skills-only');
|
|
45
|
+
|
|
46
|
+
// Copy skills/
|
|
47
|
+
const srcSkills = path.join(pkgDir, 'skills');
|
|
48
|
+
const dstSkills = path.join(targetDir, 'skills');
|
|
49
|
+
copyDirRecursive(srcSkills, dstSkills);
|
|
50
|
+
console.log('✓ skills/ copied');
|
|
51
|
+
|
|
52
|
+
if (!skillsOnly) {
|
|
53
|
+
const agentFiles = {
|
|
54
|
+
claude: [
|
|
55
|
+
{ src: 'CLAUDE.md', dst: 'CLAUDE.md' },
|
|
56
|
+
{ src: '.claude-plugin', dst: '.claude-plugin', dir: true }
|
|
57
|
+
],
|
|
58
|
+
copilot: [
|
|
59
|
+
{ src: '.github/copilot-instructions.md', dst: '.github/copilot-instructions.md' }
|
|
60
|
+
],
|
|
61
|
+
cursor: [
|
|
62
|
+
{ src: '.cursorrules', dst: '.cursorrules' },
|
|
63
|
+
{ src: '.cursor-plugin', dst: '.cursor-plugin', dir: true }
|
|
64
|
+
],
|
|
65
|
+
windsurf: [
|
|
66
|
+
{ src: '.windsurfrules', dst: '.windsurfrules' }
|
|
67
|
+
],
|
|
68
|
+
cline: [
|
|
69
|
+
{ src: '.clinerules', dst: '.clinerules' }
|
|
70
|
+
],
|
|
71
|
+
codex: [
|
|
72
|
+
{ src: 'AGENTS.md', dst: 'AGENTS.md' },
|
|
73
|
+
{ src: '.codex', dst: '.codex', dir: true }
|
|
74
|
+
],
|
|
75
|
+
gemini: [
|
|
76
|
+
{ src: 'GEMINI.md', dst: 'GEMINI.md' }
|
|
77
|
+
]
|
|
78
|
+
};
|
|
79
|
+
|
|
80
|
+
const agents = agent === 'all' ? Object.keys(agentFiles) : [agent];
|
|
81
|
+
|
|
82
|
+
agents.forEach(a => {
|
|
83
|
+
const files = agentFiles[a];
|
|
84
|
+
if (!files) {
|
|
85
|
+
console.log(`✗ Unknown agent: ${a}`);
|
|
86
|
+
return;
|
|
87
|
+
}
|
|
88
|
+
files.forEach(f => {
|
|
89
|
+
const srcPath = path.join(pkgDir, f.src);
|
|
90
|
+
const dstPath = path.join(targetDir, f.dst);
|
|
91
|
+
if (f.dir) {
|
|
92
|
+
copyDirRecursive(srcPath, dstPath);
|
|
93
|
+
} else {
|
|
94
|
+
const dstDir = path.dirname(dstPath);
|
|
95
|
+
if (!fs.existsSync(dstDir)) fs.mkdirSync(dstDir, { recursive: true });
|
|
96
|
+
if (!fs.existsSync(dstPath)) {
|
|
97
|
+
fs.copyFileSync(srcPath, dstPath);
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
});
|
|
101
|
+
console.log(`✓ ${a} config installed`);
|
|
102
|
+
});
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
console.log('\n🎉 Ironweave installed! Your agent will auto-discover the skills.\n');
|
|
106
|
+
process.exit(0);
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
console.error(`Unknown command: ${command}. Run "npx ironweave --help" for usage.`);
|
|
110
|
+
process.exit(1);
|
|
111
|
+
|
|
112
|
+
function copyDirRecursive(src, dst) {
|
|
113
|
+
if (!fs.existsSync(src)) return;
|
|
114
|
+
if (!fs.existsSync(dst)) fs.mkdirSync(dst, { recursive: true });
|
|
115
|
+
const entries = fs.readdirSync(src, { withFileTypes: true });
|
|
116
|
+
for (const entry of entries) {
|
|
117
|
+
const srcPath = path.join(src, entry.name);
|
|
118
|
+
const dstPath = path.join(dst, entry.name);
|
|
119
|
+
if (entry.isDirectory()) {
|
|
120
|
+
copyDirRecursive(srcPath, dstPath);
|
|
121
|
+
} else if (!fs.existsSync(dstPath)) {
|
|
122
|
+
fs.copyFileSync(srcPath, dstPath);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ironweave",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.1",
|
|
4
4
|
"description": "Agentic skills framework for AI coding agents — orchestrated workflows with adaptive routing, quality gates, and 17 composable skills.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"agent-skills",
|
|
@@ -27,8 +27,12 @@
|
|
|
27
27
|
},
|
|
28
28
|
"license": "MIT",
|
|
29
29
|
"author": "YuluoY",
|
|
30
|
+
"bin": {
|
|
31
|
+
"ironweave": "./bin/cli.js"
|
|
32
|
+
},
|
|
30
33
|
"files": [
|
|
31
34
|
"skills/",
|
|
35
|
+
"bin/",
|
|
32
36
|
"CLAUDE.md",
|
|
33
37
|
"AGENTS.md",
|
|
34
38
|
"GEMINI.md",
|