ironweave 1.1.6 → 1.1.7
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 +42 -15
- package/README_CN.md +42 -15
- package/bin/cli.js +43 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -98,33 +98,60 @@ User Request
|
|
|
98
98
|
|
|
99
99
|
## Installation
|
|
100
100
|
|
|
101
|
-
### Via
|
|
101
|
+
### Via npm
|
|
102
102
|
|
|
103
103
|
```bash
|
|
104
|
-
# Install all skills
|
|
105
|
-
npx
|
|
104
|
+
# Install all skills + all agent configs (Chinese, default)
|
|
105
|
+
npx ironweave@latest init
|
|
106
106
|
|
|
107
|
-
#
|
|
108
|
-
npx
|
|
107
|
+
# Install English skills
|
|
108
|
+
npx ironweave@latest init --lang en
|
|
109
109
|
|
|
110
|
-
# Install specific
|
|
111
|
-
npx
|
|
110
|
+
# Install for a specific editor only
|
|
111
|
+
npx ironweave@latest init --agent cursor
|
|
112
|
+
npx ironweave@latest init --agent trae
|
|
113
|
+
npx ironweave@latest init --agent windsurf
|
|
112
114
|
|
|
113
|
-
#
|
|
114
|
-
npx
|
|
115
|
+
# Only copy skills, skip agent config files
|
|
116
|
+
npx ironweave@latest init --skills-only
|
|
117
|
+
|
|
118
|
+
# Overwrite existing files
|
|
119
|
+
npx ironweave@latest init --force
|
|
120
|
+
|
|
121
|
+
# List all available skills
|
|
122
|
+
npx ironweave@latest list
|
|
115
123
|
```
|
|
116
124
|
|
|
117
|
-
|
|
125
|
+
Available agents: `claude`, `copilot`, `cursor`, `windsurf`, `cline`, `trae`, `codebuddy`, `codex`, `gemini`, `all` (default).
|
|
126
|
+
|
|
127
|
+
> **Conflict handling**: Existing files are preserved by default. Ironweave adds its config alongside your existing rules. Use `--force` to overwrite.
|
|
128
|
+
|
|
129
|
+
> **Skills location**: When targeting a single directory-based editor (e.g., `--agent trae`), skills are installed inside the editor directory (e.g., `.trae/skills/`). With `--agent all` (default), skills go to the project root `skills/`.
|
|
130
|
+
|
|
131
|
+
### Via skills.sh
|
|
118
132
|
|
|
119
133
|
```bash
|
|
120
|
-
# Install
|
|
121
|
-
npx
|
|
134
|
+
# Install to a specific editor (recommended)
|
|
135
|
+
npx skills add YuluoY/ironware --skill '*' -a cursor -y
|
|
136
|
+
npx skills add YuluoY/ironware --skill '*' -a trae -y
|
|
137
|
+
npx skills add YuluoY/ironware --skill '*' -a claude-code -y
|
|
122
138
|
|
|
123
|
-
# Install
|
|
124
|
-
npx
|
|
139
|
+
# Install to multiple editors
|
|
140
|
+
npx skills add YuluoY/ironware --skill '*' -a cursor -a windsurf -y
|
|
141
|
+
|
|
142
|
+
# Install to ALL editors (installs many agent directories)
|
|
143
|
+
npx skills add YuluoY/ironware --all
|
|
144
|
+
|
|
145
|
+
# Interactive: select skills and editors
|
|
146
|
+
npx skills add YuluoY/ironware
|
|
147
|
+
|
|
148
|
+
# List available skills
|
|
149
|
+
npx skills add YuluoY/ironware --list
|
|
125
150
|
```
|
|
126
151
|
|
|
127
|
-
|
|
152
|
+
Agent names for skills.sh: `claude-code`, `github-copilot`, `cursor`, `windsurf`, `cline`, `trae`, `codebuddy`, `codex`, `gemini-cli`.
|
|
153
|
+
|
|
154
|
+
> Note: `skills.sh` does not support `--lang`. For English skills, use `npx ironweave@latest init --lang en`.
|
|
128
155
|
|
|
129
156
|
### Per-Agent Manual Installation
|
|
130
157
|
|
package/README_CN.md
CHANGED
|
@@ -96,33 +96,60 @@ Ironweave 是一套完整的软件开发工作流,由一组可自由组合的
|
|
|
96
96
|
|
|
97
97
|
## 安装
|
|
98
98
|
|
|
99
|
-
### 通过
|
|
99
|
+
### 通过 npm
|
|
100
100
|
|
|
101
101
|
```bash
|
|
102
|
-
#
|
|
103
|
-
npx
|
|
102
|
+
# 安装全部技能 + 全部编辑器配置(中文,默认)
|
|
103
|
+
npx ironweave@latest init
|
|
104
104
|
|
|
105
|
-
#
|
|
106
|
-
npx
|
|
105
|
+
# 安装英文版技能
|
|
106
|
+
npx ironweave@latest init --lang en
|
|
107
107
|
|
|
108
|
-
#
|
|
109
|
-
npx
|
|
108
|
+
# 只安装特定编辑器的配置
|
|
109
|
+
npx ironweave@latest init --agent cursor
|
|
110
|
+
npx ironweave@latest init --agent trae
|
|
111
|
+
npx ironweave@latest init --agent windsurf
|
|
110
112
|
|
|
111
|
-
#
|
|
112
|
-
npx
|
|
113
|
+
# 只复制 skills/,不安装编辑器配置
|
|
114
|
+
npx ironweave@latest init --skills-only
|
|
115
|
+
|
|
116
|
+
# 覆盖已有文件
|
|
117
|
+
npx ironweave@latest init --force
|
|
118
|
+
|
|
119
|
+
# 列出所有可用技能
|
|
120
|
+
npx ironweave@latest list
|
|
113
121
|
```
|
|
114
122
|
|
|
115
|
-
|
|
123
|
+
可选编辑器:`claude`、`copilot`、`cursor`、`windsurf`、`cline`、`trae`、`codebuddy`、`codex`、`gemini`、`all`(默认全部)。
|
|
124
|
+
|
|
125
|
+
> **冲突处理**:默认不覆盖已有文件。Ironweave 会将配置与你现有的规则并存。使用 `--force` 强制覆盖。
|
|
126
|
+
|
|
127
|
+
> **Skills 位置**:指定单个目录型编辑器时(如 `--agent trae`),skills 会安装到该编辑器目录内(如 `.trae/skills/`)。使用 `--agent all`(默认)时,skills 安装在项目根目录 `skills/`。
|
|
128
|
+
|
|
129
|
+
### 通过 skills.sh
|
|
116
130
|
|
|
117
131
|
```bash
|
|
118
|
-
#
|
|
119
|
-
npx
|
|
132
|
+
# 安装到指定编辑器(推荐)
|
|
133
|
+
npx skills add YuluoY/ironware --skill '*' -a cursor -y
|
|
134
|
+
npx skills add YuluoY/ironware --skill '*' -a trae -y
|
|
135
|
+
npx skills add YuluoY/ironware --skill '*' -a claude-code -y
|
|
120
136
|
|
|
121
|
-
#
|
|
122
|
-
npx
|
|
137
|
+
# 安装到多个编辑器
|
|
138
|
+
npx skills add YuluoY/ironware --skill '*' -a cursor -a windsurf -y
|
|
139
|
+
|
|
140
|
+
# 安装到所有编辑器(会生成很多 agent 目录)
|
|
141
|
+
npx skills add YuluoY/ironware --all
|
|
142
|
+
|
|
143
|
+
# 交互式选择技能和编辑器
|
|
144
|
+
npx skills add YuluoY/ironware
|
|
145
|
+
|
|
146
|
+
# 列出可用技能
|
|
147
|
+
npx skills add YuluoY/ironware --list
|
|
123
148
|
```
|
|
124
149
|
|
|
125
|
-
|
|
150
|
+
skills.sh 的 Agent 名称:`claude-code`、`github-copilot`、`cursor`、`windsurf`、`cline`、`trae`、`codebuddy`、`codex`、`gemini-cli`。
|
|
151
|
+
|
|
152
|
+
> 注意:`skills.sh` 不支持 `--lang` 参数。如需英文版,请使用 `npx ironweave@latest init --lang en`。
|
|
126
153
|
|
|
127
154
|
### 各 Agent 手动安装
|
|
128
155
|
|
package/bin/cli.js
CHANGED
|
@@ -51,12 +51,25 @@ if (command === 'init') {
|
|
|
51
51
|
const skillsOnly = args.includes('--skills-only');
|
|
52
52
|
const force = args.includes('--force');
|
|
53
53
|
|
|
54
|
-
//
|
|
54
|
+
// Directory-based agent roots (skills go inside agent dir for single-agent install)
|
|
55
|
+
const dirBasedAgents = {
|
|
56
|
+
cursor: '.cursor',
|
|
57
|
+
windsurf: '.windsurf',
|
|
58
|
+
cline: '.clinerules',
|
|
59
|
+
trae: '.trae',
|
|
60
|
+
codebuddy: '.codebuddy'
|
|
61
|
+
};
|
|
62
|
+
const isSingleDirAgent = agent !== 'all' && dirBasedAgents[agent];
|
|
63
|
+
|
|
64
|
+
// Copy skills/
|
|
55
65
|
const skillsSrc = lang === 'en' ? 'skills-en' : 'skills';
|
|
56
66
|
const srcSkills = path.join(pkgDir, skillsSrc);
|
|
57
|
-
const dstSkills =
|
|
67
|
+
const dstSkills = isSingleDirAgent
|
|
68
|
+
? path.join(targetDir, dirBasedAgents[agent], 'skills')
|
|
69
|
+
: path.join(targetDir, 'skills');
|
|
58
70
|
copyDirRecursive(srcSkills, dstSkills, force);
|
|
59
|
-
|
|
71
|
+
const skillsLabel = isSingleDirAgent ? `${dirBasedAgents[agent]}/skills/` : 'skills/';
|
|
72
|
+
console.log(`✓ ${skillsLabel} copied (${lang === 'en' ? 'English' : 'Chinese'})`);
|
|
60
73
|
|
|
61
74
|
const srcHooks = path.join(pkgDir, 'hooks');
|
|
62
75
|
const dstHooks = path.join(targetDir, 'hooks');
|
|
@@ -115,6 +128,18 @@ if (command === 'init') {
|
|
|
115
128
|
}
|
|
116
129
|
}
|
|
117
130
|
});
|
|
131
|
+
// Patch skills path references for single dir-based agent
|
|
132
|
+
if (isSingleDirAgent) {
|
|
133
|
+
const prefix = dirBasedAgents[agent] + '/';
|
|
134
|
+
files.forEach(f => {
|
|
135
|
+
const dstPath = path.join(targetDir, f.dst);
|
|
136
|
+
if (f.dir) {
|
|
137
|
+
patchSkillsPathsInDir(dstPath, prefix);
|
|
138
|
+
} else if (fs.existsSync(dstPath)) {
|
|
139
|
+
patchSkillsPathsInFile(dstPath, prefix);
|
|
140
|
+
}
|
|
141
|
+
});
|
|
142
|
+
}
|
|
118
143
|
console.log(`✓ ${a} config installed`);
|
|
119
144
|
});
|
|
120
145
|
}
|
|
@@ -140,3 +165,18 @@ function copyDirRecursive(src, dst, force) {
|
|
|
140
165
|
}
|
|
141
166
|
}
|
|
142
167
|
}
|
|
168
|
+
|
|
169
|
+
function patchSkillsPathsInDir(dirPath, prefix) {
|
|
170
|
+
if (!fs.existsSync(dirPath) || !fs.statSync(dirPath).isDirectory()) return;
|
|
171
|
+
for (const entry of fs.readdirSync(dirPath, { withFileTypes: true })) {
|
|
172
|
+
const full = path.join(dirPath, entry.name);
|
|
173
|
+
if (entry.isDirectory()) patchSkillsPathsInDir(full, prefix);
|
|
174
|
+
else patchSkillsPathsInFile(full, prefix);
|
|
175
|
+
}
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
function patchSkillsPathsInFile(filePath, prefix) {
|
|
179
|
+
let content = fs.readFileSync(filePath, 'utf8');
|
|
180
|
+
const patched = content.replace(/`skills\//g, '`' + prefix + 'skills/');
|
|
181
|
+
if (patched !== content) fs.writeFileSync(filePath, patched);
|
|
182
|
+
}
|
package/package.json
CHANGED