@aigne/doc-smith 0.8.11-beta.4 → 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 +2 -4
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +17 -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-d2-diagram-valid.mjs +26 -0
- 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-d2-diagram.yaml +23 -0
- package/agents/generate/generate-structure.yaml +1 -1
- package/agents/generate/merge-d2-diagram.yaml +39 -0
- package/agents/generate/update-document-structure.yaml +3 -3
- package/agents/generate/user-review-document-structure.mjs +10 -10
- package/agents/init/index.mjs +18 -10
- package/agents/publish/publish-docs.mjs +17 -20
- package/agents/update/batch-generate-document.yaml +1 -1
- package/agents/update/check-document.mjs +2 -2
- package/agents/update/generate-document.yaml +25 -0
- 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 +3 -3
- 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/{d2-chart/rules.md → d2-diagram/rules-system.md} +41 -5
- package/prompts/detail/d2-diagram/rules-user.md +4 -0
- package/prompts/detail/document-rules.md +3 -4
- package/prompts/detail/generate-document.md +8 -2
- package/prompts/detail/update-document.md +0 -2
- 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/init/init.test.mjs +25 -19
- package/tests/agents/publish/publish-docs.test.mjs +99 -0
- package/tests/agents/update/check-document.test.mjs +1 -1
- package/tests/agents/utils/check-detail-result.test.mjs +2 -15
- 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/auth-utils.test.mjs +1 -1
- package/tests/utils/conflict-detector.test.mjs +1 -1
- package/tests/utils/d2-utils.test.mjs +4 -4
- package/tests/utils/deploy.test.mjs +3 -10
- package/tests/utils/docs-finder-utils.test.mjs +8 -8
- package/tests/utils/kroki-utils.test.mjs +5 -5
- package/tests/utils/preferences-utils.test.mjs +5 -3
- package/tests/utils/save-value-to-config.test.mjs +3 -1
- package/types/document-structure-schema.mjs +9 -9
- package/utils/auth-utils.mjs +4 -0
- package/utils/conflict-detector.mjs +1 -1
- package/utils/constants/index.mjs +7 -4
- package/utils/d2-utils.mjs +11 -6
- package/utils/deploy.mjs +4 -20
- package/utils/docs-finder-utils.mjs +11 -11
- package/utils/kroki-utils.mjs +5 -4
- package/utils/markdown-checker.mjs +1 -21
- /package/prompts/detail/{d2-chart → d2-diagram}/official-examples.md +0 -0
package/docs/cli-reference.ja.md
CHANGED
|
@@ -1,193 +1,252 @@
|
|
|
1
|
-
# CLIコマンドリファレンス
|
|
1
|
+
# CLI コマンドリファレンス
|
|
2
2
|
|
|
3
|
-
|
|
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
|
-
| オプション
|
|
77
|
-
| ------------------- | ------- |
|
|
78
|
-
| `--
|
|
79
|
-
| `--
|
|
80
|
-
| `--model` | string |
|
|
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
|
-
|
|
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
|
-
| オプション
|
|
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 |
|
|
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
|
|
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
|
-
|
|
233
|
+
ドキュメントを公開し、共有可能なリンクを生成します。このコマンドは、コンテンツをDiscuss Kitインスタンスにアップロードします。公式のAIGNE DocSmithプラットフォームを使用するか、独自の[Discuss Kit](https://www.web3kit.rocks/discuss-kit)インスタンスを実行できます。
|
|
175
234
|
|
|
176
235
|
### オプション
|
|
177
236
|
|
|
178
|
-
| オプション
|
|
179
|
-
| ---------- | ------ |
|
|
180
|
-
| `--appUrl` | string |
|
|
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
|
|
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.md
CHANGED
|
@@ -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
|
|
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
|
-
|
|
19
|
-
|
|
20
|
-
|
|
18
|
+
# Artifacts
|
|
19
|
+
Source-Code: {
|
|
20
|
+
label: "Source Code"
|
|
21
|
+
shape: cylinder
|
|
21
22
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
shape: rectangle
|
|
23
|
+
Configuration: {
|
|
24
|
+
label: "Configuration\n(.aigne/doc-smith/config.yml)"
|
|
25
|
+
shape: cylinder
|
|
26
26
|
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
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
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
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
|
-
|
|
39
|
-
label: "
|
|
45
|
+
generate: {
|
|
46
|
+
label: "2. Generate\n`aigne doc generate`"
|
|
47
|
+
shape: rectangle
|
|
40
48
|
}
|
|
41
|
-
|
|
42
|
-
|
|
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
|
-
|
|
48
|
-
|
|
64
|
+
publish: {
|
|
65
|
+
label: "4. Publish\n`aigne doc publish`"
|
|
66
|
+
shape: rectangle
|
|
67
|
+
}
|
|
49
68
|
}
|
|
50
69
|
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
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
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
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
|
-
| `--
|
|
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
|
|
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
|
|
161
|
+
**Generate using a specific model:**
|
|
103
162
|
|
|
104
163
|
```bash
|
|
105
|
-
aigne doc generate --model
|
|
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
|
|
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
|
|
146
|
-
| `--langs` | array | A list of target language codes (e.g., `zh`, `ja`). Can be
|
|
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
|
|
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
|
|
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
|
|
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
|
|
257
|
+
## `aigne doc prefs`
|
|
199
258
|
|
|
200
|
-
|
|
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
|
-
**
|
|
263
|
+
**View current project configuration:**
|
|
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
|
+
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
|
+
```
|