@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.
Files changed (95) hide show
  1. package/.aigne/doc-smith/config.yaml +1 -1
  2. package/.release-please-manifest.json +1 -1
  3. package/CHANGELOG.md +9 -2
  4. package/README.md +1 -1
  5. package/agents/clear/choose-contents.mjs +2 -2
  6. package/agents/clear/clear-document-structure.mjs +8 -8
  7. package/agents/clear/index.yaml +1 -1
  8. package/agents/evaluate/document-structure.yaml +1 -1
  9. package/agents/generate/check-document-structure.yaml +3 -3
  10. package/agents/generate/check-need-generate-structure.mjs +8 -8
  11. package/agents/generate/document-structure-tools/add-document.mjs +3 -3
  12. package/agents/generate/document-structure-tools/delete-document.mjs +2 -2
  13. package/agents/generate/document-structure-tools/move-document.mjs +3 -2
  14. package/agents/generate/document-structure-tools/update-document.mjs +2 -2
  15. package/agents/generate/generate-structure.yaml +1 -1
  16. package/agents/generate/update-document-structure.yaml +3 -3
  17. package/agents/generate/user-review-document-structure.mjs +10 -10
  18. package/agents/update/batch-generate-document.yaml +1 -1
  19. package/agents/update/check-document.mjs +2 -2
  20. package/agents/utils/check-feedback-refiner.mjs +1 -1
  21. package/agents/utils/choose-docs.mjs +1 -1
  22. package/agents/utils/load-document-all-content.mjs +3 -3
  23. package/agents/utils/load-sources.mjs +1 -1
  24. package/agents/utils/save-docs.mjs +7 -28
  25. package/aigne.yaml +2 -2
  26. package/docs/_sidebar.md +1 -1
  27. package/docs/advanced-how-it-works.md +3 -3
  28. package/docs/advanced-quality-assurance.md +1 -1
  29. package/docs/cli-reference.ja.md +151 -80
  30. package/docs/cli-reference.md +126 -55
  31. package/docs/cli-reference.zh-TW.md +133 -62
  32. package/docs/cli-reference.zh.md +143 -72
  33. package/docs/configuration-interactive-setup.md +1 -1
  34. package/docs/configuration-language-support.md +1 -1
  35. package/docs/configuration-preferences.md +1 -1
  36. package/docs/configuration.ja.md +104 -48
  37. package/docs/configuration.md +58 -2
  38. package/docs/configuration.zh-TW.md +99 -42
  39. package/docs/configuration.zh.md +78 -21
  40. package/docs/features-generate-documentation.ja.md +63 -44
  41. package/docs/features-generate-documentation.md +54 -35
  42. package/docs/features-generate-documentation.zh-TW.md +67 -48
  43. package/docs/features-generate-documentation.zh.md +61 -41
  44. package/docs/features-publish-your-docs.ja.md +69 -46
  45. package/docs/features-publish-your-docs.md +65 -42
  46. package/docs/features-publish-your-docs.zh-TW.md +73 -50
  47. package/docs/features-publish-your-docs.zh.md +67 -44
  48. package/docs/features-translate-documentation.ja.md +35 -33
  49. package/docs/features-translate-documentation.md +24 -22
  50. package/docs/features-translate-documentation.zh-TW.md +32 -30
  51. package/docs/features-translate-documentation.zh.md +29 -27
  52. package/docs/features-update-and-refine.ja.md +120 -66
  53. package/docs/features-update-and-refine.md +110 -56
  54. package/docs/features-update-and-refine.zh-TW.md +116 -62
  55. package/docs/features-update-and-refine.zh.md +118 -64
  56. package/docs/getting-started.ja.md +22 -22
  57. package/docs/getting-started.md +1 -1
  58. package/docs/getting-started.zh-TW.md +16 -16
  59. package/docs/getting-started.zh.md +28 -28
  60. package/docs/overview.md +3 -3
  61. package/docs-mcp/analyze-docs-relevance.yaml +6 -6
  62. package/docs-mcp/docs-search.yaml +1 -1
  63. package/package.json +2 -2
  64. package/prompts/common/document-structure/conflict-resolution-guidance.md +3 -3
  65. package/prompts/common/document-structure/document-structure-rules.md +2 -2
  66. package/prompts/detail/document-rules.md +1 -1
  67. package/prompts/detail/generate-document.md +1 -1
  68. package/prompts/evaluate/document-structure.md +6 -6
  69. package/prompts/structure/check-document-structure.md +10 -10
  70. package/prompts/structure/document-rules.md +2 -2
  71. package/prompts/structure/generate-structure-system.md +3 -3
  72. package/prompts/structure/structure-example.md +1 -1
  73. package/prompts/structure/structure-getting-started.md +1 -1
  74. package/prompts/structure/update-document-structure.md +9 -9
  75. package/prompts/utils/feedback-refiner.md +1 -1
  76. package/tests/agents/clear/choose-contents.test.mjs +1 -1
  77. package/tests/agents/clear/clear-document-structure.test.mjs +36 -30
  78. package/tests/agents/evaluate/generate-report.test.mjs +1 -1
  79. package/tests/agents/generate/check-need-generate-structure.test.mjs +1 -1
  80. package/tests/agents/generate/document-structure-tools/add-document.test.mjs +2 -2
  81. package/tests/agents/generate/document-structure-tools/delete-document.test.mjs +4 -4
  82. package/tests/agents/generate/document-structure-tools/move-document.test.mjs +3 -3
  83. package/tests/agents/generate/document-structure-tools/update-document.test.mjs +3 -3
  84. package/tests/agents/generate/user-review-document-structure.test.mjs +7 -5
  85. package/tests/agents/update/check-document.test.mjs +1 -1
  86. package/tests/agents/utils/format-document-structure.test.mjs +5 -5
  87. package/tests/agents/utils/load-sources.test.mjs +4 -4
  88. package/tests/agents/utils/save-docs.test.mjs +1 -1
  89. package/tests/utils/conflict-detector.test.mjs +1 -1
  90. package/tests/utils/docs-finder-utils.test.mjs +8 -8
  91. package/types/document-structure-schema.mjs +9 -9
  92. package/utils/conflict-detector.mjs +1 -1
  93. package/utils/constants/index.mjs +4 -4
  94. package/utils/docs-finder-utils.mjs +11 -11
  95. package/utils/markdown-checker.mjs +1 -1
@@ -1,193 +1,252 @@
1
- # CLIコマンドリファレンス
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
- Start: {
19
- label: "プロジェクトのセットアップ"
20
- shape: circle
18
+ # Artifacts
19
+ Source-Code: {
20
+ label: "ソースコード"
21
+ shape: cylinder
21
22
  }
22
-
23
- init: {
24
- label: "aigne doc init\n(対話式セットアップ)"
25
- shape: rectangle
23
+ Configuration: {
24
+ label: "設定\n(.aigne/doc-smith/config.yml)"
25
+ shape: cylinder
26
26
  }
27
-
28
- generate: {
29
- label: "aigne doc generate\n(全ドキュメントの作成/更新)"
30
- shape: rectangle
27
+ Generated-Docs: {
28
+ label: "生成されたドキュメント"
29
+ shape: cylinder
30
+ }
31
+ Published-Docs: {
32
+ label: "公開されたサイト"
33
+ shape: cylinder
31
34
  }
32
35
 
33
- refinement-cycle: {
34
- label: "改良サイクル"
35
- shape: rectangle
36
- grid-columns: 2
36
+ # --- Core Workflow ---
37
+ Lifecycle: {
38
+ label: "ドキュメントのライフサイクル"
39
+
40
+ init: {
41
+ label: "1. 初期化\n`aigne doc init`"
42
+ shape: rectangle
43
+ }
37
44
 
38
- update: {
39
- label: "aigne doc update\n(単一ドキュメントの改良)"
45
+ generate: {
46
+ label: "2. 生成\n`aigne doc generate`"
47
+ shape: rectangle
40
48
  }
41
- translate: {
42
- label: "aigne doc translate\n(コンテンツのローカライズ)"
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
- label: "aigne doc publish\n(ドキュメントのデプロイ)"
48
- shape: rectangle
64
+ publish: {
65
+ label: "4. 公開\n`aigne doc publish`"
66
+ shape: rectangle
67
+ }
49
68
  }
50
69
 
51
- End: {
52
- label: "ドキュメント公開"
53
- shape: circle
54
- style.fill: "#a2eeaf"
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
- Start -> init: "任意" {
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
- init -> generate: "設定"
61
- Start -> generate: "直接"
62
- generate -> refinement-cycle: "改良"
63
- refinement-cycle -> publish: "準備完了"
64
- generate -> publish: "直接デプロイ"
65
- publish -> End
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
- | オプション | タイプ | 説明 |
77
- | ------------------- | ------- | --------------------------------------------------------------------------------------------- |
78
- | `--feedback` | string | ドキュメント全体の構造を調整および改良するためのフィードバックを提供します。 |
79
- | `--forceRegenerate` | boolean | 既存のコンテンツを破棄し、すべてのドキュメントを最初から再生成します。 |
80
- | `--model` | string | 生成に使用する特定の言語モデルを指定します(例:`openai:gpt-4o`)。デフォルトを上書きします。 |
135
+ | オプション | タイプ | 説明 |
136
+ | ------------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
137
+ | `--forceRegenerate` | boolean | 既存のコンテンツを破棄し、すべてのドキュメントを最初から再生成します。 |
138
+ | `--feedback` | string | ドキュメント全体の構造を調整および改良するためのフィードバックを提供します。 |
139
+ | `--model` | string | 生成に使用する特定の言語モデルを指定します (例: `anthropic:claude-3-5-sonnet`)。デフォルトを上書きします。 |
81
140
 
82
141
  ### 使用例
83
142
 
84
- **ドキュメントを生成または更新する:**
143
+ **ドキュメントを生成または更新する:**
85
144
 
86
145
  ```bash
87
146
  aigne doc generate
88
147
  ```
89
148
 
90
- **すべてのドキュメントを強制的に再生成する:**
149
+ **すべてのドキュメントを強制的に完全に再生成する:**
91
150
 
92
151
  ```bash
93
152
  aigne doc generate --forceRegenerate
94
153
  ```
95
154
 
96
- **フィードバックをもとにドキュメント構造を改良する:**
155
+ **フィードバックを元にドキュメント構造を改良する:**
97
156
 
98
157
  ```bash
99
158
  aigne doc generate --feedback "APIの例のセクションを新しく追加し、「概要」ページを削除してください。"
100
159
  ```
101
160
 
102
- **AIGNE Hubの特定のモデルを使用して生成する:**
161
+ **特定のモデルを使用して生成する:**
103
162
 
104
163
  ```bash
105
- aigne doc generate --model google:gemini-1.5-flash
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
- | オプション | タイプ | 説明 |
117
- | ---------- | ----- | ----------------------------------------------------------------------------------- |
118
- | `--docs` | array | 再生成するドキュメントのパスのリスト。複数回使用できます。 |
119
- | `--feedback` | string | 選択したドキュメントのコンテンツを改善するための具体的なフィードバックを提供します。|
175
+ | オプション | タイプ | 説明 |
176
+ | ---------- | ----- | ------------------------------------------------------------------------------------------- |
177
+ | `--docs` | array | 再生成するドキュメントパスのリスト。複数回指定できます。 |
178
+ | `--feedback` | string | 選択したドキュメントのコンテンツを改善するための具体的なフィードバックを提供します。 |
120
179
 
121
180
  ### 使用例
122
181
 
123
- **更新するドキュメントを選択するための対話セッションを開始する:**
182
+ **対話セッションを開始して更新するドキュメントを選択する:**
124
183
 
125
184
  ```bash
126
185
  aigne doc update
127
186
  ```
128
187
 
129
- **特定のドキュメントを対象を絞ったフィードバックで更新する:**
188
+ **特定のドキュメントを対象を絞ったフィードバックで更新する:**
130
189
 
131
190
  ```bash
132
- aigne doc update --docs overview.md --feedback "より詳細なFAQ項目を追加してください"
191
+ aigne doc update --docs /overview.md --feedback "より詳細なFAQ項目を追加してください"
133
192
  ```
134
193
 
135
194
  ---
136
195
 
137
196
  ## `aigne doc translate`
138
197
 
139
- 既存のドキュメントを1つ以上の言語に翻訳します。対話形式で実行してドキュメントと言語を選択するか、引数として指定して非対話形式で実行することができます。
198
+ 既存のドキュメントを1つ以上の言語に翻訳します。対話形式で実行してドキュメントと言語を選択するか、引数として指定して非対話形式で実行できます。
140
199
 
141
200
  ### オプション
142
201
 
143
- | オプション | タイプ | 説明 |
144
- | ------------ | ----- | ------------------------------------------------------------------------------------------------ |
145
- | `--docs` | array | 翻訳するドキュメントのパスのリスト。複数回使用できます。 |
146
- | `--langs` | array | ターゲット言語コードのリスト(例:`zh`、`ja`)。複数回使用できます。 |
147
- | `--feedback` | string | 翻訳の品質を向上させるためのフィードバックを提供します。 |
202
+ | オプション | タイプ | 説明 |
203
+ | ------------ | ----- | ---------------------------------------------------------------------------------------------------------- |
204
+ | `--docs` | array | 翻訳するドキュメントパスのリスト。複数回指定できます。 |
205
+ | `--langs` | array | ターゲット言語コードのリスト (例: `zh-CN`, `ja`)。複数回指定できます。 |
206
+ | `--feedback` | string | 翻訳の品質を向上させるためのフィードバックを提供します。 |
148
207
  | `--glossary` | string | 言語間で一貫した用語を確保するための用語集ファイルへのパス。`@path/to/glossary.md` を使用します。 |
149
208
 
150
209
  ### 使用例
151
210
 
152
- **対話型の翻訳セッションを開始する:**
211
+ **対話式の翻訳セッションを開始する:**
153
212
 
154
213
  ```bash
155
214
  aigne doc translate
156
215
  ```
157
216
 
158
- **特定のドキュメントを中国語と日本語に翻訳する:**
217
+ **特定のドキュメントを中国語と日本語に翻訳する:**
159
218
 
160
219
  ```bash
161
- aigne doc translate --langs zh --langs ja --docs examples.md --docs overview.md
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 "技術用語を一貫して使用してください"
168
227
  ```
169
228
 
170
229
  ---
171
230
 
172
231
  ## `aigne doc publish`
173
232
 
174
- 生成されたドキュメントをDiscuss Kitプラットフォームに公開します。公式のAIGNE DocSmithプラットフォーム、または自己ホスト型のインスタンスに公開できます。
233
+ ドキュメントを公開し、共有可能なリンクを生成します。このコマンドは、コンテンツをDiscuss Kitインスタンスにアップロードします。公式のAIGNE DocSmithプラットフォームを使用するか、独自の[Discuss Kit](https://www.web3kit.rocks/discuss-kit)インスタンスを実行できます。
175
234
 
176
235
  ### オプション
177
236
 
178
- | オプション | タイプ | 説明 |
179
- | ---------- | ------ | -------------------------------------------------------------------------------------------- |
180
- | `--appUrl` | string | 自己ホスト型のDiscuss KitインスタンスのURL。指定しない場合、コマンドは対話形式で実行されます。 |
237
+ | オプション | タイプ | 説明 |
238
+ | ---------- | ------ | ---------------------------------------------------------------------------------------------------- |
239
+ | `--appUrl` | string | セルフホストしている Discuss Kit インスタンスの URL。指定しない場合、コマンドは対話形式で実行されます。 |
181
240
 
182
241
  ### 使用例
183
242
 
184
- **対話型の公開セッションを開始する:**
243
+ **対話式の公開セッションを開始する:**
185
244
 
186
245
  ```bash
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 init`
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 init
266
+ aigne doc prefs
208
267
  ```
209
268
 
210
- DocSmithをニーズに合わせて調整する方法の詳細については、[設定ガイド](./configuration.md)を参照してください。
269
+ ---
270
+
271
+ ## `aigne doc clear`
272
+
273
+ ローカルに保存されたデータをクリアするための対話セッションを起動します。これを使用して、生成されたドキュメント、ドキュメント構造の設定、またはキャッシュされた認証トークンを削除できます。
274
+
275
+ ### 使用例
276
+
277
+ **対話式のクリーンアッププロセスを開始する:**
278
+
279
+ ```bash
280
+ aigne doc clear
281
+ ```
@@ -1,83 +1,142 @@
1
1
  # CLI Command Reference
2
2
 
3
- This guide provides a reference for all available `aigne doc` sub-commands, their arguments, and options. It is intended for users who want to use the command-line interface to its full potential.
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
4
 
5
5
  The general syntax is:
6
6
 
7
- ```bash
7
+ ```bash command
8
8
  aigne doc <command> [options]
9
9
  ```
10
10
 
11
11
  ### Command Workflow
12
12
 
13
- The following diagram illustrates the typical lifecycle of creating and maintaining documentation with DocSmith's CLI commands:
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
14
 
15
15
  ```d2
16
16
  direction: down
17
17
 
18
- Start: {
19
- label: "Project Setup"
20
- shape: circle
18
+ # Artifacts
19
+ Source-Code: {
20
+ label: "Source Code"
21
+ shape: cylinder
21
22
  }
22
-
23
- init: {
24
- label: "aigne doc init\n(Interactive Setup)"
25
- shape: rectangle
23
+ Configuration: {
24
+ label: "Configuration\n(.aigne/doc-smith/config.yml)"
25
+ shape: cylinder
26
26
  }
27
-
28
- generate: {
29
- label: "aigne doc generate\n(Create/Update All Docs)"
30
- shape: rectangle
27
+ Generated-Docs: {
28
+ label: "Generated Docs"
29
+ shape: cylinder
30
+ }
31
+ Published-Docs: {
32
+ label: "Published Site"
33
+ shape: cylinder
31
34
  }
32
35
 
33
- refinement-cycle: {
34
- label: "Refinement Cycle"
35
- shape: rectangle
36
- grid-columns: 2
36
+ # --- Core Workflow ---
37
+ Lifecycle: {
38
+ label: "Documentation Lifecycle"
39
+
40
+ init: {
41
+ label: "1. Init\n`aigne doc init`"
42
+ shape: rectangle
43
+ }
37
44
 
38
- update: {
39
- label: "aigne doc update\n(Refine Single Doc)"
45
+ generate: {
46
+ label: "2. Generate\n`aigne doc generate`"
47
+ shape: rectangle
40
48
  }
41
- translate: {
42
- label: "aigne doc translate\n(Localize Content)"
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
+ }
43
62
  }
44
- }
45
63
 
46
- publish: {
47
- label: "aigne doc publish\n(Deploy Docs)"
48
- shape: rectangle
64
+ publish: {
65
+ label: "4. Publish\n`aigne doc publish`"
66
+ shape: rectangle
67
+ }
49
68
  }
50
69
 
51
- End: {
52
- label: "Docs Live"
53
- shape: circle
54
- style.fill: "#a2eeaf"
70
+ # --- Utility Commands ---
71
+ Utilities: {
72
+ label: "Utility Commands"
73
+ grid-columns: 2
74
+
75
+ prefs: {
76
+ label: "View Config\n`aigne doc prefs`"
77
+ shape: rectangle
78
+ }
79
+ clear: {
80
+ label: "Clear Data\n`aigne doc clear`"
81
+ shape: rectangle
82
+ }
55
83
  }
56
84
 
57
- Start -> init: "Optional" {
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"
58
95
  style.stroke-dash: 4
59
96
  }
60
- init -> generate: "Configure"
61
- Start -> generate: "Direct"
62
- generate -> refinement-cycle: "Refine"
63
- refinement-cycle -> publish: "Ready"
64
- generate -> publish: "Direct Deploy"
65
- publish -> End
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"
66
109
  ```
67
110
 
68
111
  ---
69
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
+
125
+ For more details on how to tailor DocSmith to your needs, see the [Configuration Guide](./configuration.md).
126
+
127
+ ---
128
+
70
129
  ## `aigne doc generate`
71
130
 
72
- 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.
131
+ 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`).
73
132
 
74
133
  ### Options
75
134
 
76
135
  | Option | Type | Description |
77
136
  | ------------------- | ------- | ------------------------------------------------------------------------------------------------------------- |
78
- | `--feedback` | string | Provides feedback to adjust and refine the overall documentation structure. |
79
137
  | `--forceRegenerate` | boolean | Discards existing content and regenerates all documentation from scratch. |
80
- | `--model` | string | Specifies a particular large language model to use for generation (e.g., `openai:gpt-4o`). Overrides the default. |
138
+ | `--feedback` | string | Provides feedback to adjust and refine the overall documentation structure. |
139
+ | `--model` | string | Specifies a particular large language model to use for generation (e.g., `anthropic:claude-3-5-sonnet`). Overrides the default. |
81
140
 
82
141
  ### Usage Examples
83
142
 
@@ -93,16 +152,16 @@ aigne doc generate
93
152
  aigne doc generate --forceRegenerate
94
153
  ```
95
154
 
96
- **Refine the document structure with feedback:**
155
+ **Refine the documentation structure with feedback:**
97
156
 
98
157
  ```bash
99
158
  aigne doc generate --feedback "Add a new section for API examples and remove the 'About' page."
100
159
  ```
101
160
 
102
- **Generate using a specific model from AIGNE Hub:**
161
+ **Generate using a specific model:**
103
162
 
104
163
  ```bash
105
- aigne doc generate --model google:gemini-1.5-flash
164
+ aigne doc generate --model openai:gpt-4o
106
165
  ```
107
166
 
108
167
  ---
@@ -115,7 +174,7 @@ Optimizes and regenerates specific documents. You can run it interactively to se
115
174
 
116
175
  | Option | Type | Description |
117
176
  | ---------- | ----- | ------------------------------------------------------------------------------------------- |
118
- | `--docs` | array | A list of document paths to regenerate. Can be used multiple times. |
177
+ | `--docs` | array | A list of document paths to regenerate. Can be specified multiple times. |
119
178
  | `--feedback` | string | Provides specific feedback to improve the content of the selected document(s). |
120
179
 
121
180
  ### Usage Examples
@@ -129,7 +188,7 @@ aigne doc update
129
188
  **Update a specific document with targeted feedback:**
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
  ---
@@ -142,8 +201,8 @@ Translates existing documentation into one or more languages. It can be run inte
142
201
 
143
202
  | Option | Type | Description |
144
203
  | ------------ | ----- | ---------------------------------------------------------------------------------------------------------- |
145
- | `--docs` | array | A list of document paths to translate. Can be used multiple times. |
146
- | `--langs` | array | A list of target language codes (e.g., `zh`, `ja`). Can be used multiple times. |
204
+ | `--docs` | array | A list of document paths to translate. Can be specified multiple times. |
205
+ | `--langs` | array | A list of target language codes (e.g., `zh-CN`, `ja`). Can be specified multiple times. |
147
206
  | `--feedback` | string | Provides feedback to improve the quality of the translation. |
148
207
  | `--glossary` | string | Path to a glossary file to ensure consistent terminology across languages. Use `@path/to/glossary.md`. |
149
208
 
@@ -158,10 +217,10 @@ aigne doc translate
158
217
  **Translate specific documents into Chinese and Japanese:**
159
218
 
160
219
  ```bash
161
- aigne doc translate --langs zh --langs ja --docs examples.md --docs overview.md
220
+ aigne doc translate --langs zh-CN --langs ja --docs /features/generate-documentation.md --docs /overview.md
162
221
  ```
163
222
 
164
- **Translate with a glossary and feedback for better quality:**
223
+ **Translate with a glossary and feedback for improved quality:**
165
224
 
166
225
  ```bash
167
226
  aigne doc translate --glossary @glossary.md --feedback "Use technical terminology consistently"
@@ -171,7 +230,7 @@ aigne doc translate --glossary @glossary.md --feedback "Use technical terminolog
171
230
 
172
231
  ## `aigne doc publish`
173
232
 
174
- Publishes your generated documentation to a Discuss Kit platform. You can publish to the official AIGNE DocSmith platform or to your own self-hosted instance.
233
+ 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).
175
234
 
176
235
  ### Options
177
236
 
@@ -195,16 +254,28 @@ aigne doc publish --appUrl https://your-discuss-kit-instance.com
195
254
 
196
255
  ---
197
256
 
198
- ## `aigne doc init`
257
+ ## `aigne doc prefs`
199
258
 
200
- 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.
259
+ Displays the current configuration settings for the project. This is a read-only command that helps you verify the settings applied during the `init` or `generate` process.
201
260
 
202
261
  ### Usage Example
203
262
 
204
- **Launch the setup wizard:**
263
+ **View current project configuration:**
205
264
 
206
265
  ```bash
207
- aigne doc init
266
+ aigne doc prefs
208
267
  ```
209
268
 
210
- For more details on how to tailor DocSmith to your needs, see the [Configuration Guide](./configuration.md).
269
+ ---
270
+
271
+ ## `aigne doc clear`
272
+
273
+ 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.
274
+
275
+ ### Usage Example
276
+
277
+ **Start the interactive cleanup process:**
278
+
279
+ ```bash
280
+ aigne doc clear
281
+ ```