@aigne/doc-smith 0.8.12-beta.2 → 0.8.12-beta.4

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.
Files changed (170) hide show
  1. package/.aigne/doc-smith/config.yaml +9 -6
  2. package/.aigne/doc-smith/output/structure-plan.json +123 -109
  3. package/.aigne/doc-smith/upload-cache.yaml +48 -0
  4. package/.github/workflows/publish-docs.yml +4 -7
  5. package/.release-please-manifest.json +1 -1
  6. package/CHANGELOG.md +20 -0
  7. package/agents/clear/choose-contents.mjs +22 -5
  8. package/agents/clear/clear-auth-tokens.mjs +2 -4
  9. package/agents/clear/clear-deployment-config.mjs +49 -0
  10. package/agents/clear/clear-document-config.mjs +2 -5
  11. package/agents/clear/clear-document-structure.mjs +2 -6
  12. package/agents/clear/clear-generated-docs.mjs +0 -1
  13. package/agents/generate/check-need-generate-structure.mjs +15 -60
  14. package/agents/generate/document-structure-tools/generate-sub-structure.mjs +131 -0
  15. package/agents/generate/generate-structure-without-tools.yaml +65 -0
  16. package/agents/generate/generate-structure.yaml +7 -1
  17. package/agents/generate/index.yaml +0 -3
  18. package/agents/generate/update-document-structure.yaml +3 -0
  19. package/agents/generate/user-review-document-structure.mjs +7 -5
  20. package/agents/init/index.mjs +15 -15
  21. package/agents/publish/publish-docs.mjs +132 -113
  22. package/agents/translate/index.yaml +1 -1
  23. package/agents/update/batch-generate-document.yaml +1 -1
  24. package/agents/update/batch-update-document.yaml +1 -1
  25. package/agents/update/check-document.mjs +3 -19
  26. package/agents/update/user-review-document.mjs +4 -3
  27. package/agents/utils/load-sources.mjs +54 -151
  28. package/agents/utils/transform-detail-datasources.mjs +14 -18
  29. package/aigne.yaml +2 -0
  30. package/biome.json +1 -1
  31. package/docs/_sidebar.md +13 -15
  32. package/docs/configuration-initial-setup.ja.md +179 -0
  33. package/docs/configuration-initial-setup.md +179 -0
  34. package/docs/configuration-initial-setup.zh-TW.md +179 -0
  35. package/docs/configuration-initial-setup.zh.md +179 -0
  36. package/docs/configuration-managing-preferences.ja.md +100 -0
  37. package/docs/configuration-managing-preferences.md +100 -0
  38. package/docs/configuration-managing-preferences.zh-TW.md +100 -0
  39. package/docs/configuration-managing-preferences.zh.md +100 -0
  40. package/docs/configuration.ja.md +68 -184
  41. package/docs/configuration.md +62 -178
  42. package/docs/configuration.zh-TW.md +70 -186
  43. package/docs/configuration.zh.md +67 -183
  44. package/docs/getting-started.ja.md +46 -78
  45. package/docs/getting-started.md +46 -78
  46. package/docs/getting-started.zh-TW.md +47 -79
  47. package/docs/getting-started.zh.md +47 -79
  48. package/docs/guides-cleaning-up.ja.md +50 -0
  49. package/docs/guides-cleaning-up.md +50 -0
  50. package/docs/guides-cleaning-up.zh-TW.md +50 -0
  51. package/docs/guides-cleaning-up.zh.md +50 -0
  52. package/docs/guides-evaluating-documents.ja.md +66 -0
  53. package/docs/guides-evaluating-documents.md +66 -0
  54. package/docs/guides-evaluating-documents.zh-TW.md +66 -0
  55. package/docs/guides-evaluating-documents.zh.md +66 -0
  56. package/docs/guides-generating-documentation.ja.md +149 -0
  57. package/docs/guides-generating-documentation.md +149 -0
  58. package/docs/guides-generating-documentation.zh-TW.md +149 -0
  59. package/docs/guides-generating-documentation.zh.md +149 -0
  60. package/docs/guides-interactive-chat.ja.md +85 -0
  61. package/docs/guides-interactive-chat.md +85 -0
  62. package/docs/guides-interactive-chat.zh-TW.md +85 -0
  63. package/docs/guides-interactive-chat.zh.md +85 -0
  64. package/docs/guides-managing-history.ja.md +51 -0
  65. package/docs/guides-managing-history.md +51 -0
  66. package/docs/guides-managing-history.zh-TW.md +51 -0
  67. package/docs/guides-managing-history.zh.md +51 -0
  68. package/docs/guides-publishing-your-docs.ja.md +78 -0
  69. package/docs/guides-publishing-your-docs.md +78 -0
  70. package/docs/guides-publishing-your-docs.zh-TW.md +78 -0
  71. package/docs/guides-publishing-your-docs.zh.md +78 -0
  72. package/docs/guides-translating-documentation.ja.md +95 -0
  73. package/docs/guides-translating-documentation.md +95 -0
  74. package/docs/guides-translating-documentation.zh-TW.md +95 -0
  75. package/docs/guides-translating-documentation.zh.md +95 -0
  76. package/docs/guides-updating-documentation.ja.md +77 -0
  77. package/docs/guides-updating-documentation.md +77 -0
  78. package/docs/guides-updating-documentation.zh-TW.md +77 -0
  79. package/docs/guides-updating-documentation.zh.md +77 -0
  80. package/docs/guides.ja.md +32 -0
  81. package/docs/guides.md +32 -0
  82. package/docs/guides.zh-TW.md +32 -0
  83. package/docs/guides.zh.md +32 -0
  84. package/docs/overview.ja.md +39 -60
  85. package/docs/overview.md +39 -60
  86. package/docs/overview.zh-TW.md +39 -60
  87. package/docs/overview.zh.md +39 -60
  88. package/docs/release-notes.ja.md +255 -0
  89. package/docs/release-notes.md +255 -0
  90. package/docs/release-notes.zh-TW.md +255 -0
  91. package/docs/release-notes.zh.md +255 -0
  92. package/package.json +4 -2
  93. package/prompts/common/document/content-rules-core.md +1 -0
  94. package/prompts/common/document-structure/document-structure-rules.md +8 -9
  95. package/prompts/common/document-structure/output-constraints.md +1 -1
  96. package/prompts/structure/document-rules.md +8 -2
  97. package/prompts/structure/generate/system-prompt.md +27 -2
  98. package/prompts/structure/generate/user-prompt.md +18 -0
  99. package/prompts/structure/update/system-prompt.md +12 -0
  100. package/prompts/structure/update/user-prompt.md +3 -0
  101. package/tests/agents/clear/choose-contents.test.mjs +8 -4
  102. package/tests/agents/generate/check-need-generate-structure.test.mjs +53 -63
  103. package/tests/agents/generate/document-structure-tools/generate-sub-structure.test.mjs +277 -0
  104. package/tests/agents/init/init.test.mjs +18 -18
  105. package/tests/agents/publish/publish-docs.test.mjs +79 -0
  106. package/tests/agents/update/check-document.test.mjs +7 -67
  107. package/tests/agents/utils/load-sources.test.mjs +90 -90
  108. package/tests/agents/utils/transform-detail-datasources.test.mjs +153 -196
  109. package/tests/utils/file-utils.test.mjs +309 -1
  110. package/utils/auth-utils.mjs +12 -5
  111. package/utils/constants/index.mjs +5 -2
  112. package/utils/deploy.mjs +2 -2
  113. package/utils/file-utils.mjs +315 -0
  114. package/utils/utils.mjs +89 -50
  115. package/docs/advanced-how-it-works.ja.md +0 -101
  116. package/docs/advanced-how-it-works.md +0 -101
  117. package/docs/advanced-how-it-works.zh-TW.md +0 -101
  118. package/docs/advanced-how-it-works.zh.md +0 -101
  119. package/docs/advanced-quality-assurance.ja.md +0 -92
  120. package/docs/advanced-quality-assurance.md +0 -92
  121. package/docs/advanced-quality-assurance.zh-TW.md +0 -92
  122. package/docs/advanced-quality-assurance.zh.md +0 -92
  123. package/docs/advanced.ja.md +0 -20
  124. package/docs/advanced.md +0 -20
  125. package/docs/advanced.zh-TW.md +0 -20
  126. package/docs/advanced.zh.md +0 -20
  127. package/docs/changelog.ja.md +0 -486
  128. package/docs/changelog.md +0 -486
  129. package/docs/changelog.zh-TW.md +0 -486
  130. package/docs/changelog.zh.md +0 -486
  131. package/docs/cli-reference.ja.md +0 -311
  132. package/docs/cli-reference.md +0 -311
  133. package/docs/cli-reference.zh-TW.md +0 -311
  134. package/docs/cli-reference.zh.md +0 -311
  135. package/docs/configuration-interactive-setup.ja.md +0 -138
  136. package/docs/configuration-interactive-setup.md +0 -138
  137. package/docs/configuration-interactive-setup.zh-TW.md +0 -138
  138. package/docs/configuration-interactive-setup.zh.md +0 -138
  139. package/docs/configuration-language-support.ja.md +0 -64
  140. package/docs/configuration-language-support.md +0 -64
  141. package/docs/configuration-language-support.zh-TW.md +0 -64
  142. package/docs/configuration-language-support.zh.md +0 -64
  143. package/docs/configuration-llm-setup.ja.md +0 -56
  144. package/docs/configuration-llm-setup.md +0 -56
  145. package/docs/configuration-llm-setup.zh-TW.md +0 -56
  146. package/docs/configuration-llm-setup.zh.md +0 -56
  147. package/docs/configuration-preferences.ja.md +0 -144
  148. package/docs/configuration-preferences.md +0 -144
  149. package/docs/configuration-preferences.zh-TW.md +0 -144
  150. package/docs/configuration-preferences.zh.md +0 -144
  151. package/docs/features-generate-documentation.ja.md +0 -95
  152. package/docs/features-generate-documentation.md +0 -95
  153. package/docs/features-generate-documentation.zh-TW.md +0 -95
  154. package/docs/features-generate-documentation.zh.md +0 -95
  155. package/docs/features-publish-your-docs.ja.md +0 -130
  156. package/docs/features-publish-your-docs.md +0 -130
  157. package/docs/features-publish-your-docs.zh-TW.md +0 -130
  158. package/docs/features-publish-your-docs.zh.md +0 -130
  159. package/docs/features-translate-documentation.ja.md +0 -90
  160. package/docs/features-translate-documentation.md +0 -90
  161. package/docs/features-translate-documentation.zh-TW.md +0 -90
  162. package/docs/features-translate-documentation.zh.md +0 -90
  163. package/docs/features-update-and-refine.ja.md +0 -142
  164. package/docs/features-update-and-refine.md +0 -142
  165. package/docs/features-update-and-refine.zh-TW.md +0 -143
  166. package/docs/features-update-and-refine.zh.md +0 -142
  167. package/docs/features.ja.md +0 -62
  168. package/docs/features.md +0 -62
  169. package/docs/features.zh-TW.md +0 -62
  170. package/docs/features.zh.md +0 -62
@@ -1,311 +0,0 @@
1
- # CLIコマンドリファレンス
2
-
3
- このガイドは、利用可能なすべての`aigne doc`サブコマンド、その引数、およびオプションに関する包括的なリファレンスを提供します。コマンドラインインターフェースを最大限に活用したいユーザーを対象としています。
4
-
5
- 一般的な構文は次のとおりです:
6
-
7
- ```bash command icon=lucide:terminal
8
- aigne doc <command> [options]
9
- ```
10
-
11
- ### コマンドのワークフロー
12
-
13
- 以下の図は、DocSmithのCLIコマンドを使用してドキュメントを作成および維持する一般的なライフサイクルと、それらが相互作用するデータを示しています。
14
-
15
- ```d2
16
- direction: down
17
-
18
- # Artifacts
19
- Source-Code: {
20
- label: "ソースコード"
21
- shape: cylinder
22
- }
23
- Configuration: {
24
- label: "設定\n(.aigne/doc-smith/config.yml)"
25
- shape: cylinder
26
- }
27
- Generated-Docs: {
28
- label: "生成されたドキュメント"
29
- shape: cylinder
30
- }
31
- Published-Docs: {
32
- label: "公開されたサイト"
33
- shape: cylinder
34
- }
35
-
36
- # --- Core Workflow ---
37
- Lifecycle: {
38
- label: "ドキュメントのライフサイクル"
39
-
40
- init: {
41
- label: "1. 初期化\n`aigne doc init`"
42
- shape: rectangle
43
- }
44
-
45
- generate: {
46
- label: "2. 生成\n`aigne doc generate`"
47
- shape: rectangle
48
- }
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
- }
62
- }
63
-
64
- publish: {
65
- label: "4. 公開\n`aigne doc publish`"
66
- shape: rectangle
67
- }
68
- }
69
-
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
- }
83
- }
84
-
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: "設定がない場合に実行"
95
- style.stroke-dash: 4
96
- }
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
123
- ```
124
- ![対話型セットアップウィザード完了のスクリーンショット。](../assets/screenshots/doc-complete-setup.png)
125
-
126
- DocSmithをニーズに合わせて調整する方法の詳細については、[設定ガイド](./configuration.md)を参照してください。
127
-
128
- ---
129
-
130
- ## `aigne doc generate`
131
-
132
- ソースコードを分析し、設定に基づいて完全なドキュメントセットを生成します。設定が見つからない場合は、自動的に対話式のセットアップウィザード(`aigne doc init`)を起動します。
133
-
134
- ![generateコマンド実行中のスクリーンショット。](../assets/screenshots/doc-generate.png)
135
-
136
- ### オプション
137
-
138
- | オプション | タイプ | 説明 |
139
- | :------------------ | :------ | :------------------------------------------------------------------------------------------------------- |
140
- | `--forceRegenerate` | boolean | 既存のコンテンツを破棄し、すべてのドキュメントを最初から再生成します。 |
141
- | `--feedback` | string | ドキュメント全体の構造を調整・改良するためのフィードバックを提供します。 |
142
- | `--model` | string | 生成に使用する特定の言語モデルを指定します(例:`openai:gpt-4o`)。デフォルト設定を上書きします。 |
143
-
144
- ### 使用例
145
-
146
- **ドキュメントを生成または更新します:**
147
-
148
- ```bash
149
- aigne doc generate
150
- ```
151
-
152
- **すべてのドキュメントの完全な再生成を強制します:**
153
-
154
- ```bash
155
- aigne doc generate --forceRegenerate
156
- ```
157
-
158
- **フィードバックを反映してドキュメント構造を改良します:**
159
-
160
- ```bash
161
- aigne doc generate --feedback "APIの例のセクションを新しく追加し、「概要」ページを削除してください。"
162
- ```
163
-
164
- **特定のモデルを使用して生成します:**
165
-
166
- ```bash
167
- aigne doc generate --model openai:gpt-4o
168
- ```
169
-
170
- ---
171
-
172
- ## `aigne doc update`
173
-
174
- 特定のドキュメントを最適化し、再生成します。対話形式で実行してドキュメントを選択するか、オプションで直接指定できます。これは、プロジェクト全体を再生成することなく、フィードバックに基づいて的を絞った改善を行うのに役立ちます。
175
-
176
- ![updateコマンド実行中のスクリーンショット。](../assets/screenshots/doc-update.png)
177
-
178
- ### オプション
179
-
180
- | オプション | タイプ | 説明 |
181
- | :--------- | :---- | :-------------------------------------------------------------------------- |
182
- | `--docs` | array | 再生成するドキュメントのパスのリスト。複数回指定できます。 |
183
- | `--feedback` | string | 選択したドキュメントのコンテンツを改善するための具体的なフィードバックを提供します。 |
184
-
185
- ### 使用例
186
-
187
- **対話セッションを開始して更新するドキュメントを選択します:**
188
-
189
- ```bash
190
- aigne doc update
191
- ```
192
-
193
- **特定のドキュメントを的を絞ったフィードバックで更新します:**
194
-
195
- ```bash
196
- aigne doc update --docs /overview --feedback "より詳細なFAQ項目を追加してください"
197
- ```
198
-
199
- ---
200
-
201
- ## `aigne doc translate`
202
-
203
- 既存のドキュメントを1つ以上の言語に翻訳します。対話形式で実行してドキュメントや言語を選択することも、引数として指定して非対話形式で実行することもできます。
204
-
205
- ![translateコマンド実行中のスクリーンショット。](../assets/screenshots/doc-translate.png)
206
-
207
- ### オプション
208
-
209
- | オプション | タイプ | 説明 |
210
- | :--------- | :---- | :----------------------------------------------------------------------------------- |
211
- | `--docs` | array | 翻訳するドキュメントのパスのリスト。複数回指定できます。 |
212
- | `--langs` | array | 翻訳先の言語コードのリスト(例:`zh-CN`、`ja`)。複数回指定できます。 |
213
- | `--feedback` | string | 翻訳の質を向上させるためのフィードバックを提供します。 |
214
- | `--glossary` | string | 言語間で一貫した用語を確保するための用語集ファイルへのパス。`@path/to/glossary.md`を使用します。 |
215
-
216
- ### 使用例
217
-
218
- **対話式の翻訳セッションを開始します:**
219
-
220
- ```bash
221
- aigne doc translate
222
- ```
223
-
224
- **特定のドキュメントを中国語と日本語に翻訳します:**
225
-
226
- ```bash
227
- aigne doc translate --langs zh-CN --langs ja --docs /features/generate-documentation --docs /overview
228
- ```
229
-
230
- **用語集とフィードバックを使用して翻訳品質を向上させます:**
231
-
232
- ```bash
233
- aigne doc translate --glossary @glossary.md --feedback "技術用語を一貫して使用してください"
234
- ```
235
-
236
- ---
237
-
238
- ## `aigne doc publish`
239
-
240
- ドキュメントを公開し、共有可能なリンクを生成します。このコマンドは、コンテンツをDiscuss Kitインスタンスにアップロードします。公式のAIGNE DocSmithプラットフォームを使用するか、独自の[Discuss Kit](https://www.web3kit.rocks/discuss-kit)インスタンスを実行できます。
241
-
242
- ![publishコマンド実行中のスクリーンショット。](../assets/screenshots/doc-publish.png)
243
-
244
- ### オプション
245
-
246
- | オプション | タイプ | 説明 |
247
- | :------- | :----- | :------------------------------------------------------------------------------------------------------ |
248
- | `--appUrl` | string | セルフホストしているDiscuss KitインスタンスのURL。指定しない場合、コマンドは対話形式で実行されます。 |
249
-
250
- ### 使用例
251
-
252
- **対話式の公開セッションを開始します:**
253
-
254
- ```bash
255
- aigne doc publish
256
- ```
257
-
258
- **セルフホストのインスタンスに直接公開します:**
259
-
260
- ```bash
261
- aigne doc publish --appUrl https://your-discuss-kit-instance.com
262
- ```
263
-
264
- ---
265
-
266
- ## `aigne doc prefs`
267
-
268
- ユーザー設定とフィードバックに基づくルールを管理します。DocSmithは時間とともにフィードバックから学習し、永続的な設定を作成します。このコマンドを使用すると、これらの学習済みルールを表示、切り替え、または削除できます。
269
-
270
- ### オプション
271
-
272
- | オプション | タイプ | 説明 |
273
- | :------- | :------ | :------------------------------------------------------------------------- |
274
- | `--list` | boolean | 保存されているすべての設定を一覧表示します。 |
275
- | `--remove` | boolean | 対話形式で1つ以上の設定を選択して削除するように促します。 |
276
- | `--toggle` | boolean | 対話形式で設定を選択し、その有効状態を切り替えるように促します。 |
277
- | `--id` | array | 直接削除または切り替える1つ以上の設定IDを指定します。 |
278
-
279
- ### 使用例
280
-
281
- **保存されているすべての設定を一覧表示します:**
282
-
283
- ```bash
284
- aigne doc prefs --list
285
- ```
286
-
287
- **対話式の削除モードを開始します:**
288
-
289
- ```bash
290
- aigne doc prefs --remove
291
- ```
292
-
293
- **IDで特定の設定を切り替えます:**
294
-
295
- ```bash
296
- aigne doc prefs --toggle --id "pref_2a1dfe2b09695aab"
297
- ```
298
-
299
- ---
300
-
301
- ## `aigne doc clear`
302
-
303
- ローカルに保存されたデータを消去するための対話セッションを起動します。これを使用して、生成されたドキュメント、ドキュメント構造の設定、またはキャッシュされた認証トークンを削除できます。
304
-
305
- ### 使用例
306
-
307
- **対話式のクリーンアッププロセスを開始します:**
308
-
309
- ```bash
310
- aigne doc clear
311
- ```
@@ -1,311 +0,0 @@
1
- # CLI Command Reference
2
-
3
- This guide provides a comprehensive reference for all available `aigne doc` sub-commands, their arguments, and options. It is intended for users who want to utilize the command-line interface to its full potential.
4
-
5
- The general syntax is:
6
-
7
- ```bash command icon=lucide:terminal
8
- aigne doc <command> [options]
9
- ```
10
-
11
- ### Command Workflow
12
-
13
- The following diagram illustrates the typical lifecycle of creating and maintaining documentation with DocSmith's CLI commands, along with the data they interact with.
14
-
15
- ```d2
16
- direction: down
17
-
18
- # Artifacts
19
- Source-Code: {
20
- label: "Source Code"
21
- shape: cylinder
22
- }
23
- Configuration: {
24
- label: "Configuration\n(.aigne/doc-smith/config.yml)"
25
- shape: cylinder
26
- }
27
- Generated-Docs: {
28
- label: "Generated Docs"
29
- shape: cylinder
30
- }
31
- Published-Docs: {
32
- label: "Published Site"
33
- shape: cylinder
34
- }
35
-
36
- # --- Core Workflow ---
37
- Lifecycle: {
38
- label: "Documentation Lifecycle"
39
-
40
- init: {
41
- label: "1. Init\n`aigne doc init`"
42
- shape: rectangle
43
- }
44
-
45
- generate: {
46
- label: "2. Generate\n`aigne doc generate`"
47
- shape: rectangle
48
- }
49
-
50
- Refinement: {
51
- label: "3. Refine (Iterative)"
52
- grid-columns: 2
53
-
54
- update: {
55
- label: "Update\n`aigne doc update`"
56
- shape: rectangle
57
- }
58
- translate: {
59
- label: "Translate\n`aigne doc translate`"
60
- shape: rectangle
61
- }
62
- }
63
-
64
- publish: {
65
- label: "4. Publish\n`aigne doc publish`"
66
- shape: rectangle
67
- }
68
- }
69
-
70
- # --- Utility Commands ---
71
- Utilities: {
72
- label: "Utility Commands"
73
- grid-columns: 2
74
-
75
- prefs: {
76
- label: "Manage Prefs\n`aigne doc prefs`"
77
- shape: rectangle
78
- }
79
- clear: {
80
- label: "Clear Data\n`aigne doc clear`"
81
- shape: rectangle
82
- }
83
- }
84
-
85
-
86
- # --- Connections ---
87
-
88
- # Setup and Generation
89
- Lifecycle.init -> Configuration: "Creates"
90
- Source-Code -> Lifecycle.generate: "Reads"
91
- Configuration -> Lifecycle.generate: "Reads"
92
- Lifecycle.generate -> Generated-Docs: "Creates / Overwrites"
93
- Lifecycle.generate -> Lifecycle.init: {
94
- label: "Runs if no config"
95
- style.stroke-dash: 4
96
- }
97
-
98
- # Refinement Loop
99
- Generated-Docs <-> Lifecycle.Refinement: "Reads & Writes"
100
-
101
- # Publishing
102
- Lifecycle.Refinement -> Lifecycle.publish
103
- Lifecycle.publish -> Published-Docs: "Uploads to"
104
-
105
- # Utility Connections
106
- Utilities.prefs -> Configuration: "Reads"
107
- Utilities.clear -> Configuration: "Deletes"
108
- Utilities.clear -> Generated-Docs: "Deletes"
109
- ```
110
-
111
- ---
112
-
113
- ## `aigne doc init`
114
-
115
- Manually starts the interactive configuration wizard. This is useful for setting up a new project or modifying the configuration of an existing one. The wizard guides you through defining source code paths, setting output directories, choosing languages, and defining the documentation's style and target audience.
116
-
117
- ### Usage Example
118
-
119
- **Launch the setup wizard:**
120
-
121
- ```bash
122
- aigne doc init
123
- ```
124
- ![Screenshot of the interactive setup wizard completion.](../assets/screenshots/doc-complete-setup.png)
125
-
126
- For more details on how to tailor DocSmith to your needs, see the [Configuration Guide](./configuration.md).
127
-
128
- ---
129
-
130
- ## `aigne doc generate`
131
-
132
- Analyzes your source code and generates a complete set of documentation based on your configuration. If no configuration is found, it automatically launches the interactive setup wizard (`aigne doc init`).
133
-
134
- ![Screenshot of the generate command running.](../assets/screenshots/doc-generate.png)
135
-
136
- ### Options
137
-
138
- | Option | Type | Description |
139
- | :------------------ | :------ | :------------------------------------------------------------------------------------------------------- |
140
- | `--forceRegenerate` | boolean | Discards existing content and regenerates all documentation from scratch. |
141
- | `--feedback` | string | Provides feedback to adjust and refine the overall documentation structure. |
142
- | `--model` | string | Specifies a particular large language model to use for generation (e.g., `openai:gpt-4o`). Overrides the default. |
143
-
144
- ### Usage Examples
145
-
146
- **Generate or update documentation:**
147
-
148
- ```bash
149
- aigne doc generate
150
- ```
151
-
152
- **Force a complete regeneration of all documents:**
153
-
154
- ```bash
155
- aigne doc generate --forceRegenerate
156
- ```
157
-
158
- **Refine the documentation structure with feedback:**
159
-
160
- ```bash
161
- aigne doc generate --feedback "Add a new section for API examples and remove the 'About' page."
162
- ```
163
-
164
- **Generate using a specific model:**
165
-
166
- ```bash
167
- aigne doc generate --model openai:gpt-4o
168
- ```
169
-
170
- ---
171
-
172
- ## `aigne doc update`
173
-
174
- Optimizes and regenerates specific documents. You can run it interactively to select documents or specify them directly with options. This is useful for making targeted improvements based on feedback without regenerating the entire project.
175
-
176
- ![Screenshot of the update command running.](../assets/screenshots/doc-update.png)
177
-
178
- ### Options
179
-
180
- | Option | Type | Description |
181
- | :--------- | :---- | :-------------------------------------------------------------------------- |
182
- | `--docs` | array | A list of document paths to regenerate. Can be specified multiple times. |
183
- | `--feedback` | string | Provides specific feedback to improve the content of the selected document(s). |
184
-
185
- ### Usage Examples
186
-
187
- **Start an interactive session to select a document to update:**
188
-
189
- ```bash
190
- aigne doc update
191
- ```
192
-
193
- **Update a specific document with targeted feedback:**
194
-
195
- ```bash
196
- aigne doc update --docs /overview --feedback "Add more detailed FAQ entries"
197
- ```
198
-
199
- ---
200
-
201
- ## `aigne doc translate`
202
-
203
- Translates existing documentation into one or more languages. It can be run interactively to select documents and languages, or non-interactively by specifying them as arguments.
204
-
205
- ![Screenshot of the translate command running.](../assets/screenshots/doc-translate.png)
206
-
207
- ### Options
208
-
209
- | Option | Type | Description |
210
- | :--------- | :---- | :----------------------------------------------------------------------------------- |
211
- | `--docs` | array | A list of document paths to translate. Can be specified multiple times. |
212
- | `--langs` | array | A list of target language codes (e.g., `zh-CN`, `ja`). Can be specified multiple times. |
213
- | `--feedback` | string | Provides feedback to improve the quality of the translation. |
214
- | `--glossary` | string | Path to a glossary file to ensure consistent terminology across languages. Use `@path/to/glossary.md`. |
215
-
216
- ### Usage Examples
217
-
218
- **Start an interactive translation session:**
219
-
220
- ```bash
221
- aigne doc translate
222
- ```
223
-
224
- **Translate specific documents into Chinese and Japanese:**
225
-
226
- ```bash
227
- aigne doc translate --langs zh-CN --langs ja --docs /features/generate-documentation --docs /overview
228
- ```
229
-
230
- **Translate with a glossary and feedback for improved quality:**
231
-
232
- ```bash
233
- aigne doc translate --glossary @glossary.md --feedback "Use technical terminology consistently"
234
- ```
235
-
236
- ---
237
-
238
- ## `aigne doc publish`
239
-
240
- Publishes your documentation and generates a shareable link. This command uploads your content to a Discuss Kit instance. You can use the official AIGNE DocSmith platform or run your own instance of [Discuss Kit](https://www.web3kit.rocks/discuss-kit).
241
-
242
- ![Screenshot of the publish command running.](../assets/screenshots/doc-publish.png)
243
-
244
- ### Options
245
-
246
- | Option | Type | Description |
247
- | :------- | :----- | :------------------------------------------------------------------------------------------------------ |
248
- | `--appUrl` | string | The URL of your self-hosted Discuss Kit instance. If not provided, the command runs interactively. |
249
-
250
- ### Usage Examples
251
-
252
- **Start an interactive publishing session:**
253
-
254
- ```bash
255
- aigne doc publish
256
- ```
257
-
258
- **Publish directly to a self-hosted instance:**
259
-
260
- ```bash
261
- aigne doc publish --appUrl https://your-discuss-kit-instance.com
262
- ```
263
-
264
- ---
265
-
266
- ## `aigne doc prefs`
267
-
268
- Manages user preferences and feedback-driven rules. Over time, DocSmith learns from your feedback and creates persistent preferences. This command allows you to view, toggle, or remove these learned rules.
269
-
270
- ### Options
271
-
272
- | Option | Type | Description |
273
- | :------- | :------ | :------------------------------------------------------------------------- |
274
- | `--list` | boolean | Lists all saved preferences. |
275
- | `--remove` | boolean | Interactively prompts to select and remove one or more preferences. |
276
- | `--toggle` | boolean | Interactively prompts to select and toggle the active state of preferences. |
277
- | `--id` | array | Specifies one or more preference IDs to remove or toggle directly. |
278
-
279
- ### Usage Examples
280
-
281
- **List all saved preferences:**
282
-
283
- ```bash
284
- aigne doc prefs --list
285
- ```
286
-
287
- **Start interactive removal mode:**
288
-
289
- ```bash
290
- aigne doc prefs --remove
291
- ```
292
-
293
- **Toggle a specific preference by ID:**
294
-
295
- ```bash
296
- aigne doc prefs --toggle --id "pref_2a1dfe2b09695aab"
297
- ```
298
-
299
- ---
300
-
301
- ## `aigne doc clear`
302
-
303
- Launches an interactive session to clear locally stored data. This can be used to remove the generated documentation, the document structure configuration, or cached authentication tokens.
304
-
305
- ### Usage Example
306
-
307
- **Start the interactive cleanup process:**
308
-
309
- ```bash
310
- aigne doc clear
311
- ```