@aigne/doc-smith 0.8.11-beta.5 → 0.8.11-beta.6
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/.aigne/doc-smith/config.yaml +1 -1
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +9 -2
- package/README.md +1 -1
- package/agents/clear/choose-contents.mjs +2 -2
- package/agents/clear/clear-document-structure.mjs +8 -8
- package/agents/clear/index.yaml +1 -1
- package/agents/evaluate/document-structure.yaml +1 -1
- package/agents/generate/check-document-structure.yaml +3 -3
- package/agents/generate/check-need-generate-structure.mjs +8 -8
- package/agents/generate/document-structure-tools/add-document.mjs +3 -3
- package/agents/generate/document-structure-tools/delete-document.mjs +2 -2
- package/agents/generate/document-structure-tools/move-document.mjs +3 -2
- package/agents/generate/document-structure-tools/update-document.mjs +2 -2
- package/agents/generate/generate-structure.yaml +1 -1
- package/agents/generate/update-document-structure.yaml +3 -3
- package/agents/generate/user-review-document-structure.mjs +10 -10
- package/agents/update/batch-generate-document.yaml +1 -1
- package/agents/update/check-document.mjs +2 -2
- package/agents/utils/check-feedback-refiner.mjs +1 -1
- package/agents/utils/choose-docs.mjs +1 -1
- package/agents/utils/load-document-all-content.mjs +3 -3
- package/agents/utils/load-sources.mjs +1 -1
- package/agents/utils/save-docs.mjs +7 -28
- package/aigne.yaml +2 -2
- package/docs/_sidebar.md +1 -1
- package/docs/advanced-how-it-works.md +3 -3
- package/docs/advanced-quality-assurance.md +1 -1
- package/docs/cli-reference.ja.md +151 -80
- package/docs/cli-reference.md +126 -55
- package/docs/cli-reference.zh-TW.md +133 -62
- package/docs/cli-reference.zh.md +143 -72
- package/docs/configuration-interactive-setup.md +1 -1
- package/docs/configuration-language-support.md +1 -1
- package/docs/configuration-preferences.md +1 -1
- package/docs/configuration.ja.md +104 -48
- package/docs/configuration.md +58 -2
- package/docs/configuration.zh-TW.md +99 -42
- package/docs/configuration.zh.md +78 -21
- package/docs/features-generate-documentation.ja.md +63 -44
- package/docs/features-generate-documentation.md +54 -35
- package/docs/features-generate-documentation.zh-TW.md +67 -48
- package/docs/features-generate-documentation.zh.md +61 -41
- package/docs/features-publish-your-docs.ja.md +69 -46
- package/docs/features-publish-your-docs.md +65 -42
- package/docs/features-publish-your-docs.zh-TW.md +73 -50
- package/docs/features-publish-your-docs.zh.md +67 -44
- package/docs/features-translate-documentation.ja.md +35 -33
- package/docs/features-translate-documentation.md +24 -22
- package/docs/features-translate-documentation.zh-TW.md +32 -30
- package/docs/features-translate-documentation.zh.md +29 -27
- package/docs/features-update-and-refine.ja.md +120 -66
- package/docs/features-update-and-refine.md +110 -56
- package/docs/features-update-and-refine.zh-TW.md +116 -62
- package/docs/features-update-and-refine.zh.md +118 -64
- package/docs/getting-started.ja.md +22 -22
- package/docs/getting-started.md +1 -1
- package/docs/getting-started.zh-TW.md +16 -16
- package/docs/getting-started.zh.md +28 -28
- package/docs/overview.md +3 -3
- package/docs-mcp/analyze-docs-relevance.yaml +6 -6
- package/docs-mcp/docs-search.yaml +1 -1
- package/package.json +2 -2
- package/prompts/common/document-structure/conflict-resolution-guidance.md +3 -3
- package/prompts/common/document-structure/document-structure-rules.md +2 -2
- package/prompts/detail/document-rules.md +1 -1
- package/prompts/detail/generate-document.md +1 -1
- package/prompts/evaluate/document-structure.md +6 -6
- package/prompts/structure/check-document-structure.md +10 -10
- package/prompts/structure/document-rules.md +2 -2
- package/prompts/structure/generate-structure-system.md +3 -3
- package/prompts/structure/structure-example.md +1 -1
- package/prompts/structure/structure-getting-started.md +1 -1
- package/prompts/structure/update-document-structure.md +9 -9
- package/prompts/utils/feedback-refiner.md +1 -1
- package/tests/agents/clear/choose-contents.test.mjs +1 -1
- package/tests/agents/clear/clear-document-structure.test.mjs +36 -30
- package/tests/agents/evaluate/generate-report.test.mjs +1 -1
- package/tests/agents/generate/check-need-generate-structure.test.mjs +1 -1
- package/tests/agents/generate/document-structure-tools/add-document.test.mjs +2 -2
- package/tests/agents/generate/document-structure-tools/delete-document.test.mjs +4 -4
- package/tests/agents/generate/document-structure-tools/move-document.test.mjs +3 -3
- package/tests/agents/generate/document-structure-tools/update-document.test.mjs +3 -3
- package/tests/agents/generate/user-review-document-structure.test.mjs +7 -5
- package/tests/agents/update/check-document.test.mjs +1 -1
- package/tests/agents/utils/format-document-structure.test.mjs +5 -5
- package/tests/agents/utils/load-sources.test.mjs +4 -4
- package/tests/agents/utils/save-docs.test.mjs +1 -1
- package/tests/utils/conflict-detector.test.mjs +1 -1
- package/tests/utils/docs-finder-utils.test.mjs +8 -8
- package/types/document-structure-schema.mjs +9 -9
- package/utils/conflict-detector.mjs +1 -1
- package/utils/constants/index.mjs +4 -4
- package/utils/docs-finder-utils.mjs +11 -11
- package/utils/markdown-checker.mjs +1 -1
|
@@ -1,83 +1,142 @@
|
|
|
1
1
|
# CLI 命令參考
|
|
2
2
|
|
|
3
|
-
本指南為所有可用的 `aigne doc`
|
|
3
|
+
本指南為所有可用的 `aigne doc` 子命令、其參數和選項提供了全面的參考。它旨在幫助使用者充分利用命令列介面的全部潛力。
|
|
4
4
|
|
|
5
5
|
一般語法為:
|
|
6
6
|
|
|
7
|
-
```bash
|
|
7
|
+
```bash command
|
|
8
8
|
aigne doc <command> [options]
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
### 命令工作流程
|
|
12
12
|
|
|
13
|
-
下圖說明了使用 DocSmith 的 CLI
|
|
13
|
+
下圖說明了使用 DocSmith 的 CLI 命令建立和維護文件的一般生命週期,以及它們互動的資料。
|
|
14
14
|
|
|
15
15
|
```d2
|
|
16
16
|
direction: down
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
# Artifacts
|
|
19
|
+
Source-Code: {
|
|
20
|
+
label: "原始碼"
|
|
21
|
+
shape: cylinder
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
shape: rectangle
|
|
23
|
+
Configuration: {
|
|
24
|
+
label: "設定\n(.aigne/doc-smith/config.yml)"
|
|
25
|
+
shape: cylinder
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
Generated-Docs: {
|
|
28
|
+
label: "產生的文件"
|
|
29
|
+
shape: cylinder
|
|
30
|
+
}
|
|
31
|
+
Published-Docs: {
|
|
32
|
+
label: "已發佈的網站"
|
|
33
|
+
shape: cylinder
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
# --- Core Workflow ---
|
|
37
|
+
Lifecycle: {
|
|
38
|
+
label: "文件生命週期"
|
|
39
|
+
|
|
40
|
+
init: {
|
|
41
|
+
label: "1. 初始化\n`aigne doc init`"
|
|
42
|
+
shape: rectangle
|
|
43
|
+
}
|
|
37
44
|
|
|
38
|
-
|
|
39
|
-
label: "aigne doc
|
|
45
|
+
generate: {
|
|
46
|
+
label: "2. 產生\n`aigne doc generate`"
|
|
47
|
+
shape: rectangle
|
|
40
48
|
}
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
|
|
50
|
+
Refinement: {
|
|
51
|
+
label: "3. 優化 (迭代)"
|
|
52
|
+
grid-columns: 2
|
|
53
|
+
|
|
54
|
+
update: {
|
|
55
|
+
label: "更新\n`aigne doc update`"
|
|
56
|
+
shape: rectangle
|
|
57
|
+
}
|
|
58
|
+
translate: {
|
|
59
|
+
label: "翻譯\n`aigne doc translate`"
|
|
60
|
+
shape: rectangle
|
|
61
|
+
}
|
|
43
62
|
}
|
|
44
|
-
}
|
|
45
63
|
|
|
46
|
-
publish: {
|
|
47
|
-
|
|
48
|
-
|
|
64
|
+
publish: {
|
|
65
|
+
label: "4. 發佈\n`aigne doc publish`"
|
|
66
|
+
shape: rectangle
|
|
67
|
+
}
|
|
49
68
|
}
|
|
50
69
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
70
|
+
# --- Utility Commands ---
|
|
71
|
+
Utilities: {
|
|
72
|
+
label: "工具命令"
|
|
73
|
+
grid-columns: 2
|
|
74
|
+
|
|
75
|
+
prefs: {
|
|
76
|
+
label: "檢視設定\n`aigne doc prefs`"
|
|
77
|
+
shape: rectangle
|
|
78
|
+
}
|
|
79
|
+
clear: {
|
|
80
|
+
label: "清除資料\n`aigne doc clear`"
|
|
81
|
+
shape: rectangle
|
|
82
|
+
}
|
|
55
83
|
}
|
|
56
84
|
|
|
57
|
-
|
|
85
|
+
|
|
86
|
+
# --- Connections ---
|
|
87
|
+
|
|
88
|
+
# Setup and Generation
|
|
89
|
+
Lifecycle.init -> Configuration: "建立"
|
|
90
|
+
Source-Code -> Lifecycle.generate: "讀取"
|
|
91
|
+
Configuration -> Lifecycle.generate: "讀取"
|
|
92
|
+
Lifecycle.generate -> Generated-Docs: "建立 / 覆寫"
|
|
93
|
+
Lifecycle.generate -> Lifecycle.init: {
|
|
94
|
+
label: "若無設定則執行"
|
|
58
95
|
style.stroke-dash: 4
|
|
59
96
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
97
|
+
|
|
98
|
+
# Refinement Loop
|
|
99
|
+
Generated-Docs <-> Lifecycle.Refinement: "讀取與寫入"
|
|
100
|
+
|
|
101
|
+
# Publishing
|
|
102
|
+
Lifecycle.Refinement -> Lifecycle.publish
|
|
103
|
+
Lifecycle.publish -> Published-Docs: "上傳至"
|
|
104
|
+
|
|
105
|
+
# Utility Connections
|
|
106
|
+
Utilities.prefs -> Configuration: "讀取"
|
|
107
|
+
Utilities.clear -> Configuration: "刪除"
|
|
108
|
+
Utilities.clear -> Generated-Docs: "刪除"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## `aigne doc init`
|
|
114
|
+
|
|
115
|
+
手動啟動互動式設定精靈。這對於設定新專案或修改現有專案的設定很有用。此精靈會引導您定義原始碼路徑、設定輸出目錄、選擇語言,以及定義文件的風格和目標受眾。
|
|
116
|
+
|
|
117
|
+
### 使用範例
|
|
118
|
+
|
|
119
|
+
**啟動設定精靈:**
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
aigne doc init
|
|
66
123
|
```
|
|
67
124
|
|
|
125
|
+
有關如何根據您的需求客製化 DocSmith 的更多詳細資訊,請參閱 [設定指南](./configuration.md)。
|
|
126
|
+
|
|
68
127
|
---
|
|
69
128
|
|
|
70
129
|
## `aigne doc generate`
|
|
71
130
|
|
|
72
|
-
|
|
131
|
+
分析您的原始碼並根據您的設定產生一套完整的文件。如果找不到設定,它會自動啟動互動式設定精靈 (`aigne doc init`)。
|
|
73
132
|
|
|
74
133
|
### 選項
|
|
75
134
|
|
|
76
135
|
| Option | Type | Description |
|
|
77
136
|
| ------------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
|
|
78
|
-
| `--
|
|
79
|
-
| `--
|
|
80
|
-
| `--model` | string | 指定用於產生的特定大型語言模型(例如 `
|
|
137
|
+
| `--forceRegenerate` | boolean | 捨棄現有內容並從頭開始重新產生所有文件。 |
|
|
138
|
+
| `--feedback` | string | 提供回饋以調整和優化整體文件結構。 |
|
|
139
|
+
| `--model` | string | 指定用於產生的特定大型語言模型(例如 `anthropic:claude-3-5-sonnet`)。此選項會覆寫預設設定。 |
|
|
81
140
|
|
|
82
141
|
### 使用範例
|
|
83
142
|
|
|
@@ -99,24 +158,24 @@ aigne doc generate --forceRegenerate
|
|
|
99
158
|
aigne doc generate --feedback "Add a new section for API examples and remove the 'About' page."
|
|
100
159
|
```
|
|
101
160
|
|
|
102
|
-
|
|
161
|
+
**使用特定模型產生:**
|
|
103
162
|
|
|
104
163
|
```bash
|
|
105
|
-
aigne doc generate --model
|
|
164
|
+
aigne doc generate --model openai:gpt-4o
|
|
106
165
|
```
|
|
107
166
|
|
|
108
167
|
---
|
|
109
168
|
|
|
110
169
|
## `aigne doc update`
|
|
111
170
|
|
|
112
|
-
|
|
171
|
+
優化並重新產生特定文件。您可以以互動方式執行以選擇文件,或直接使用選項指定它們。這對於根據回饋進行有針對性的改進,而無需重新產生整個專案,非常有用。
|
|
113
172
|
|
|
114
173
|
### 選項
|
|
115
174
|
|
|
116
175
|
| Option | Type | Description |
|
|
117
176
|
| ---------- | ----- | ------------------------------------------------------------------------------------------- |
|
|
118
|
-
| `--docs` | array |
|
|
119
|
-
| `--feedback` | string | 提供具體回饋以改善所選文件的內容。
|
|
177
|
+
| `--docs` | array | 要重新產生的文件路徑列表。可多次指定。 |
|
|
178
|
+
| `--feedback` | string | 提供具體回饋以改善所選文件的內容。 |
|
|
120
179
|
|
|
121
180
|
### 使用範例
|
|
122
181
|
|
|
@@ -129,23 +188,23 @@ aigne doc update
|
|
|
129
188
|
**使用針對性回饋更新特定文件:**
|
|
130
189
|
|
|
131
190
|
```bash
|
|
132
|
-
aigne doc update --docs overview.md --feedback "Add more detailed FAQ entries"
|
|
191
|
+
aigne doc update --docs /overview.md --feedback "Add more detailed FAQ entries"
|
|
133
192
|
```
|
|
134
193
|
|
|
135
194
|
---
|
|
136
195
|
|
|
137
196
|
## `aigne doc translate`
|
|
138
197
|
|
|
139
|
-
|
|
198
|
+
將現有文件翻譯成一種或多種語言。它可以以互動方式執行以選擇文件和語言,也可以透過將它們指定為參數以非互動方式執行。
|
|
140
199
|
|
|
141
200
|
### 選項
|
|
142
201
|
|
|
143
202
|
| Option | Type | Description |
|
|
144
203
|
| ------------ | ----- | ---------------------------------------------------------------------------------------------------------- |
|
|
145
|
-
| `--docs` | array |
|
|
146
|
-
| `--langs` | array | 目標語言代碼列表(例如 `zh`、`ja
|
|
147
|
-
| `--feedback` | string | 提供回饋以改善翻譯品質。
|
|
148
|
-
| `--glossary` | string | 詞彙表檔案的路徑,以確保跨語言的術語一致性。使用 `@path/to/glossary.md`。
|
|
204
|
+
| `--docs` | array | 要翻譯的文件路徑列表。可多次指定。 |
|
|
205
|
+
| `--langs` | array | 目標語言代碼列表(例如 `zh-CN`、`ja`)。可多次指定。 |
|
|
206
|
+
| `--feedback` | string | 提供回饋以改善翻譯品質。 |
|
|
207
|
+
| `--glossary` | string | 詞彙表檔案的路徑,以確保跨語言的術語一致性。使用 `@path/to/glossary.md`。 |
|
|
149
208
|
|
|
150
209
|
### 使用範例
|
|
151
210
|
|
|
@@ -158,10 +217,10 @@ aigne doc translate
|
|
|
158
217
|
**將特定文件翻譯成中文和日文:**
|
|
159
218
|
|
|
160
219
|
```bash
|
|
161
|
-
aigne doc translate --langs zh --langs ja --docs
|
|
220
|
+
aigne doc translate --langs zh-CN --langs ja --docs /features/generate-documentation.md --docs /overview.md
|
|
162
221
|
```
|
|
163
222
|
|
|
164
|
-
|
|
223
|
+
**使用詞彙表和回饋進行翻譯以提高品質:**
|
|
165
224
|
|
|
166
225
|
```bash
|
|
167
226
|
aigne doc translate --glossary @glossary.md --feedback "Use technical terminology consistently"
|
|
@@ -171,13 +230,13 @@ aigne doc translate --glossary @glossary.md --feedback "Use technical terminolog
|
|
|
171
230
|
|
|
172
231
|
## `aigne doc publish`
|
|
173
232
|
|
|
174
|
-
|
|
233
|
+
發佈您的文件並產生一個可分享的連結。此命令會將您的內容上傳到一個 Discuss Kit 實例。您可以使用官方的 AIGNE DocSmith 平台或執行您自己的 [Discuss Kit](https://www.web3kit.rocks/discuss-kit) 實例。
|
|
175
234
|
|
|
176
235
|
### 選項
|
|
177
236
|
|
|
178
237
|
| Option | Type | Description |
|
|
179
238
|
| ---------- | ------ | ---------------------------------------------------------------------------------------------------- |
|
|
180
|
-
| `--appUrl` | string | 您自行託管的 Discuss Kit 實例的 URL
|
|
239
|
+
| `--appUrl` | string | 您自行託管的 Discuss Kit 實例的 URL。若未提供,此命令將以互動模式執行。 |
|
|
181
240
|
|
|
182
241
|
### 使用範例
|
|
183
242
|
|
|
@@ -187,7 +246,7 @@ aigne doc translate --glossary @glossary.md --feedback "Use technical terminolog
|
|
|
187
246
|
aigne doc publish
|
|
188
247
|
```
|
|
189
248
|
|
|
190
|
-
|
|
249
|
+
**直接發佈至自行託管的實例:**
|
|
191
250
|
|
|
192
251
|
```bash
|
|
193
252
|
aigne doc publish --appUrl https://your-discuss-kit-instance.com
|
|
@@ -195,16 +254,28 @@ aigne doc publish --appUrl https://your-discuss-kit-instance.com
|
|
|
195
254
|
|
|
196
255
|
---
|
|
197
256
|
|
|
198
|
-
## `aigne doc
|
|
257
|
+
## `aigne doc prefs`
|
|
199
258
|
|
|
200
|
-
|
|
259
|
+
顯示專案目前的設定。這是一個唯讀命令,可幫助您驗證在 `init` 或 `generate` 過程中應用的設定。
|
|
201
260
|
|
|
202
261
|
### 使用範例
|
|
203
262
|
|
|
204
|
-
|
|
263
|
+
**檢視目前專案設定:**
|
|
205
264
|
|
|
206
265
|
```bash
|
|
207
|
-
aigne doc
|
|
266
|
+
aigne doc prefs
|
|
208
267
|
```
|
|
209
268
|
|
|
210
|
-
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## `aigne doc clear`
|
|
272
|
+
|
|
273
|
+
啟動一個互動式會話以清除本地儲存的資料。這可用於移除產生的文件、文件結構設定或快取的驗證權杖。
|
|
274
|
+
|
|
275
|
+
### 使用範例
|
|
276
|
+
|
|
277
|
+
**啟動互動式清理程序:**
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
aigne doc clear
|
|
281
|
+
```
|
package/docs/cli-reference.zh.md
CHANGED
|
@@ -1,85 +1,144 @@
|
|
|
1
1
|
# CLI 命令参考
|
|
2
2
|
|
|
3
|
-
本指南为所有可用的 `aigne doc`
|
|
3
|
+
本指南为所有可用的 `aigne doc` 子命令及其参数和选项提供了全面的参考。它旨在帮助用户充分利用命令行界面。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
通用语法为:
|
|
6
6
|
|
|
7
|
-
```bash
|
|
7
|
+
```bash command
|
|
8
8
|
aigne doc <command> [options]
|
|
9
9
|
```
|
|
10
10
|
|
|
11
11
|
### 命令工作流
|
|
12
12
|
|
|
13
|
-
下图展示了使用 DocSmith 的 CLI
|
|
13
|
+
下图展示了使用 DocSmith 的 CLI 命令创建和维护文档的典型生命周期,以及它们与之交互的数据。
|
|
14
14
|
|
|
15
15
|
```d2
|
|
16
16
|
direction: down
|
|
17
17
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
# 工件
|
|
19
|
+
Source-Code: {
|
|
20
|
+
label: "源代码"
|
|
21
|
+
shape: cylinder
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
shape: rectangle
|
|
23
|
+
Configuration: {
|
|
24
|
+
label: "配置\n(.aigne/doc-smith/config.yml)"
|
|
25
|
+
shape: cylinder
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
27
|
+
Generated-Docs: {
|
|
28
|
+
label: "生成的文档"
|
|
29
|
+
shape: cylinder
|
|
30
|
+
}
|
|
31
|
+
Published-Docs: {
|
|
32
|
+
label: "发布的站点"
|
|
33
|
+
shape: cylinder
|
|
31
34
|
}
|
|
32
35
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
36
|
+
# --- 核心工作流 ---
|
|
37
|
+
Lifecycle: {
|
|
38
|
+
label: "文档生命周期"
|
|
39
|
+
|
|
40
|
+
init: {
|
|
41
|
+
label: "1. 初始化\n`aigne doc init`"
|
|
42
|
+
shape: rectangle
|
|
43
|
+
}
|
|
37
44
|
|
|
38
|
-
|
|
39
|
-
label: "aigne doc
|
|
45
|
+
generate: {
|
|
46
|
+
label: "2. 生成\n`aigne doc generate`"
|
|
47
|
+
shape: rectangle
|
|
40
48
|
}
|
|
41
|
-
|
|
42
|
-
|
|
49
|
+
|
|
50
|
+
Refinement: {
|
|
51
|
+
label: "3. 优化(迭代)"
|
|
52
|
+
grid-columns: 2
|
|
53
|
+
|
|
54
|
+
update: {
|
|
55
|
+
label: "更新\n`aigne doc update`"
|
|
56
|
+
shape: rectangle
|
|
57
|
+
}
|
|
58
|
+
translate: {
|
|
59
|
+
label: "翻译\n`aigne doc translate`"
|
|
60
|
+
shape: rectangle
|
|
61
|
+
}
|
|
43
62
|
}
|
|
44
|
-
}
|
|
45
63
|
|
|
46
|
-
publish: {
|
|
47
|
-
|
|
48
|
-
|
|
64
|
+
publish: {
|
|
65
|
+
label: "4. 发布\n`aigne doc publish`"
|
|
66
|
+
shape: rectangle
|
|
67
|
+
}
|
|
49
68
|
}
|
|
50
69
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
70
|
+
# --- 实用命令 ---
|
|
71
|
+
Utilities: {
|
|
72
|
+
label: "实用命令"
|
|
73
|
+
grid-columns: 2
|
|
74
|
+
|
|
75
|
+
prefs: {
|
|
76
|
+
label: "查看配置\n`aigne doc prefs`"
|
|
77
|
+
shape: rectangle
|
|
78
|
+
}
|
|
79
|
+
clear: {
|
|
80
|
+
label: "清除数据\n`aigne doc clear`"
|
|
81
|
+
shape: rectangle
|
|
82
|
+
}
|
|
55
83
|
}
|
|
56
84
|
|
|
57
|
-
|
|
85
|
+
|
|
86
|
+
# --- 连接 ---
|
|
87
|
+
|
|
88
|
+
# 设置与生成
|
|
89
|
+
Lifecycle.init -> Configuration: "创建"
|
|
90
|
+
Source-Code -> Lifecycle.generate: "读取"
|
|
91
|
+
Configuration -> Lifecycle.generate: "读取"
|
|
92
|
+
Lifecycle.generate -> Generated-Docs: "创建/覆盖"
|
|
93
|
+
Lifecycle.generate -> Lifecycle.init: {
|
|
94
|
+
label: "无配置时运行"
|
|
58
95
|
style.stroke-dash: 4
|
|
59
96
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
97
|
+
|
|
98
|
+
# 优化循环
|
|
99
|
+
Generated-Docs <-> Lifecycle.Refinement: "读取和写入"
|
|
100
|
+
|
|
101
|
+
# 发布
|
|
102
|
+
Lifecycle.Refinement -> Lifecycle.publish
|
|
103
|
+
Lifecycle.publish -> Published-Docs: "上传至"
|
|
104
|
+
|
|
105
|
+
# 实用工具连接
|
|
106
|
+
Utilities.prefs -> Configuration: "读取"
|
|
107
|
+
Utilities.clear -> Configuration: "删除"
|
|
108
|
+
Utilities.clear -> Generated-Docs: "删除"
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
---
|
|
112
|
+
|
|
113
|
+
## `aigne doc init`
|
|
114
|
+
|
|
115
|
+
手动启动交互式配置向导。这对于设置新项目或修改现有项目的配置非常有用。该向导会引导您定义源代码路径、设置输出目录、选择语言以及定义文档的风格和目标受众。
|
|
116
|
+
|
|
117
|
+
### 用法示例
|
|
118
|
+
|
|
119
|
+
**启动设置向导:**
|
|
120
|
+
|
|
121
|
+
```bash
|
|
122
|
+
aigne doc init
|
|
66
123
|
```
|
|
67
124
|
|
|
125
|
+
有关如何根据您的需求定制 DocSmith 的更多详细信息,请参阅[配置指南](./configuration.md)。
|
|
126
|
+
|
|
68
127
|
---
|
|
69
128
|
|
|
70
129
|
## `aigne doc generate`
|
|
71
130
|
|
|
72
|
-
|
|
131
|
+
分析您的源代码并根据您的配置生成一套完整的文档。如果未找到配置,它将自动启动交互式设置向导 (`aigne doc init`)。
|
|
73
132
|
|
|
74
133
|
### 选项
|
|
75
134
|
|
|
76
|
-
| 选项
|
|
135
|
+
| 选项 | 类型 | 描述 |
|
|
77
136
|
| ------------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
|
|
78
|
-
| `--
|
|
79
|
-
| `--
|
|
80
|
-
| `--model`
|
|
137
|
+
| `--forceRegenerate` | boolean | 丢弃现有内容并从头开始重新生成所有文档。 |
|
|
138
|
+
| `--feedback` | string | 提供反馈以调整和优化整体文档结构。 |
|
|
139
|
+
| `--model` | string | 指定用于生成的特定大语言模型(例如 `anthropic:claude-3-5-sonnet`)。此选项会覆盖默认设置。 |
|
|
81
140
|
|
|
82
|
-
###
|
|
141
|
+
### 用法示例
|
|
83
142
|
|
|
84
143
|
**生成或更新文档:**
|
|
85
144
|
|
|
@@ -96,29 +155,29 @@ aigne doc generate --forceRegenerate
|
|
|
96
155
|
**通过反馈优化文档结构:**
|
|
97
156
|
|
|
98
157
|
```bash
|
|
99
|
-
aigne doc generate --feedback "
|
|
158
|
+
aigne doc generate --feedback "Add a new section for API examples and remove the 'About' page."
|
|
100
159
|
```
|
|
101
160
|
|
|
102
|
-
|
|
161
|
+
**使用特定模型生成:**
|
|
103
162
|
|
|
104
163
|
```bash
|
|
105
|
-
aigne doc generate --model
|
|
164
|
+
aigne doc generate --model openai:gpt-4o
|
|
106
165
|
```
|
|
107
166
|
|
|
108
167
|
---
|
|
109
168
|
|
|
110
169
|
## `aigne doc update`
|
|
111
170
|
|
|
112
|
-
|
|
171
|
+
优化并重新生成特定文档。您可以以交互方式运行它来选择文档,或直接使用选项指定文档。这对于根据反馈进行有针对性的改进非常有用,而无需重新生成整个项目。
|
|
113
172
|
|
|
114
173
|
### 选项
|
|
115
174
|
|
|
116
|
-
| 选项
|
|
175
|
+
| 选项 | 类型 | 描述 |
|
|
117
176
|
| ---------- | ----- | ------------------------------------------------------------------------------------------- |
|
|
118
|
-
| `--docs`
|
|
119
|
-
| `--feedback` | string | 提供具体反馈以改进所选文档的内容。
|
|
177
|
+
| `--docs` | array | 要重新生成的文档路径列表。可以多次指定。 |
|
|
178
|
+
| `--feedback` | string | 提供具体反馈以改进所选文档的内容。 |
|
|
120
179
|
|
|
121
|
-
###
|
|
180
|
+
### 用法示例
|
|
122
181
|
|
|
123
182
|
**启动交互式会话以选择要更新的文档:**
|
|
124
183
|
|
|
@@ -129,25 +188,25 @@ aigne doc update
|
|
|
129
188
|
**使用有针对性的反馈更新特定文档:**
|
|
130
189
|
|
|
131
190
|
```bash
|
|
132
|
-
aigne doc update --docs overview.md --feedback "
|
|
191
|
+
aigne doc update --docs /overview.md --feedback "Add more detailed FAQ entries"
|
|
133
192
|
```
|
|
134
193
|
|
|
135
194
|
---
|
|
136
195
|
|
|
137
196
|
## `aigne doc translate`
|
|
138
197
|
|
|
139
|
-
|
|
198
|
+
将现有文档翻译成一种或多种语言。可以以交互方式运行它来选择文档和语言,也可以通过将它们指定为参数以非交互方式运行。
|
|
140
199
|
|
|
141
200
|
### 选项
|
|
142
201
|
|
|
143
|
-
| 选项
|
|
202
|
+
| 选项 | 类型 | 描述 |
|
|
144
203
|
| ------------ | ----- | ---------------------------------------------------------------------------------------------------------- |
|
|
145
|
-
| `--docs`
|
|
146
|
-
| `--langs`
|
|
147
|
-
| `--feedback`
|
|
148
|
-
| `--glossary`
|
|
204
|
+
| `--docs` | array | 要翻译的文档路径列表。可以多次指定。 |
|
|
205
|
+
| `--langs` | array | 目标语言代码列表(例如 `zh-CN`、`ja`)。可以多次指定。 |
|
|
206
|
+
| `--feedback` | string | 提供反馈以提高翻译质量。 |
|
|
207
|
+
| `--glossary` | string | 词汇表文件的路径,以确保跨语言术语的一致性。使用 `@path/to/glossary.md`。 |
|
|
149
208
|
|
|
150
|
-
###
|
|
209
|
+
### 用法示例
|
|
151
210
|
|
|
152
211
|
**启动交互式翻译会话:**
|
|
153
212
|
|
|
@@ -158,28 +217,28 @@ aigne doc translate
|
|
|
158
217
|
**将特定文档翻译成中文和日文:**
|
|
159
218
|
|
|
160
219
|
```bash
|
|
161
|
-
aigne doc translate --langs zh --langs ja --docs
|
|
220
|
+
aigne doc translate --langs zh-CN --langs ja --docs /features/generate-documentation.md --docs /overview.md
|
|
162
221
|
```
|
|
163
222
|
|
|
164
|
-
|
|
223
|
+
**使用词汇表和反馈进行翻译以提高质量:**
|
|
165
224
|
|
|
166
225
|
```bash
|
|
167
|
-
aigne doc translate --glossary @glossary.md --feedback "
|
|
226
|
+
aigne doc translate --glossary @glossary.md --feedback "Use technical terminology consistently"
|
|
168
227
|
```
|
|
169
228
|
|
|
170
229
|
---
|
|
171
230
|
|
|
172
231
|
## `aigne doc publish`
|
|
173
232
|
|
|
174
|
-
|
|
233
|
+
发布您的文档并生成一个可共享的链接。此命令会将您的内容上传到 Discuss Kit 实例。您可以使用官方的 AIGNE DocSmith 平台,也可以运行您自己的 [Discuss Kit](https://www.web3kit.rocks/discuss-kit) 实例。
|
|
175
234
|
|
|
176
235
|
### 选项
|
|
177
236
|
|
|
178
|
-
| 选项
|
|
237
|
+
| 选项 | 类型 | 描述 |
|
|
179
238
|
| ---------- | ------ | ---------------------------------------------------------------------------------------------------- |
|
|
180
239
|
| `--appUrl` | string | 您自托管的 Discuss Kit 实例的 URL。如果未提供,该命令将以交互方式运行。 |
|
|
181
240
|
|
|
182
|
-
###
|
|
241
|
+
### 用法示例
|
|
183
242
|
|
|
184
243
|
**启动交互式发布会话:**
|
|
185
244
|
|
|
@@ -195,16 +254,28 @@ aigne doc publish --appUrl https://your-discuss-kit-instance.com
|
|
|
195
254
|
|
|
196
255
|
---
|
|
197
256
|
|
|
198
|
-
## `aigne doc
|
|
257
|
+
## `aigne doc prefs`
|
|
199
258
|
|
|
200
|
-
|
|
259
|
+
显示项目的当前配置设置。这是一个只读命令,可帮助您验证在 `init` 或 `generate` 过程中应用的设置。
|
|
201
260
|
|
|
202
|
-
###
|
|
261
|
+
### 用法示例
|
|
203
262
|
|
|
204
|
-
|
|
263
|
+
**查看当前项目配置:**
|
|
205
264
|
|
|
206
265
|
```bash
|
|
207
|
-
aigne doc
|
|
266
|
+
aigne doc prefs
|
|
208
267
|
```
|
|
209
268
|
|
|
210
|
-
|
|
269
|
+
---
|
|
270
|
+
|
|
271
|
+
## `aigne doc clear`
|
|
272
|
+
|
|
273
|
+
启动一个交互式会话以清除本地存储的数据。这可用于删除生成的文档、文档结构配置或缓存的身份验证令牌。
|
|
274
|
+
|
|
275
|
+
### 用法示例
|
|
276
|
+
|
|
277
|
+
**启动交互式清理过程:**
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
aigne doc clear
|
|
281
|
+
```
|
|
@@ -79,7 +79,7 @@ As you make selections, the wizard provides defaults and filters subsequent opti
|
|
|
79
79
|
|
|
80
80
|
In some cases, you may have multiple goals or audiences that require a specific documentation structure to be effective, such as creating documentation for both non-technical **End Users** and expert **Developers**. The wizard identifies these as "resolvable conflicts."
|
|
81
81
|
|
|
82
|
-
It then formulates a strategy to address these needs within the
|
|
82
|
+
It then formulates a strategy to address these needs within the documentation structure. For the End User vs. Developer example, the resolution strategy is to create separate user paths:
|
|
83
83
|
|
|
84
84
|
- **User Guide Path**: Uses plain language, focuses on UI interactions, and is oriented toward business outcomes.
|
|
85
85
|
- **Developer Guide Path**: Is code-first, technically precise, and includes SDK examples and configuration snippets.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Language Support
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith uses AI to provide automated documentation translation into 12 languages.
|
|
3
|
+
AIGNE DocSmith uses AI to provide automated documentation translation into 12 languages. Generate and maintain documentation for a global audience using the `aigne doc translate` command.
|
|
4
4
|
|
|
5
5
|
The translation workflow processes your source documents through an AI engine to generate localized versions in your selected target languages.
|
|
6
6
|
|
|
@@ -66,7 +66,7 @@ Each rule saved in `preferences.yml` has the following structure:
|
|
|
66
66
|
|
|
67
67
|
## Managing Preferences with the CLI
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
View and manage all your saved preferences using the `aigne doc prefs` command. You can list, activate, deactivate, or permanently remove rules.
|
|
70
70
|
|
|
71
71
|
### Listing All Preferences
|
|
72
72
|
|