@aigne/doc-smith 0.8.12-beta.7 → 0.8.12-beta.8
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/.aigne/doc-smith/media-description.yaml +91 -0
- package/.aigne/doc-smith/upload-cache.yaml +6 -69
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +12 -0
- package/agents/clear/choose-contents.mjs +14 -1
- package/agents/clear/clear-media-description.mjs +129 -0
- package/agents/clear/index.yaml +3 -1
- package/agents/evaluate/code-snippet.mjs +28 -24
- package/agents/evaluate/document-structure.yaml +0 -4
- package/agents/evaluate/document.yaml +1 -5
- package/agents/generate/index.yaml +1 -0
- package/agents/init/index.mjs +10 -0
- package/agents/media/batch-generate-media-description.yaml +44 -0
- package/agents/media/generate-media-description.yaml +47 -0
- package/agents/media/load-media-description.mjs +238 -0
- package/agents/update/index.yaml +1 -0
- package/agents/utils/load-sources.mjs +103 -53
- package/aigne.yaml +6 -0
- package/assets/report-template/report.html +34 -34
- package/docs/configuration-initial-setup.md +74 -55
- package/docs/configuration.ja.md +59 -86
- package/docs/configuration.md +59 -86
- package/docs/configuration.zh-TW.md +59 -86
- package/docs/configuration.zh.md +59 -86
- package/docs/getting-started.ja.md +43 -24
- package/docs/getting-started.md +29 -10
- package/docs/getting-started.zh-TW.md +42 -23
- package/docs/getting-started.zh.md +39 -20
- package/docs/guides-cleaning-up.md +19 -18
- package/docs/guides-evaluating-documents.md +70 -29
- package/docs/guides-generating-documentation.md +59 -121
- package/docs/guides-interactive-chat.md +34 -26
- package/docs/guides-managing-history.md +18 -13
- package/docs/guides-publishing-your-docs.md +40 -35
- package/docs/guides-translating-documentation.md +39 -34
- package/docs/guides-updating-documentation.md +11 -9
- package/docs/overview.md +2 -2
- package/docs/release-notes.md +60 -27
- package/package.json +2 -1
- package/prompts/evaluate/document-structure.md +6 -7
- package/prompts/evaluate/document.md +16 -25
- package/prompts/media/media-description/system-prompt.md +35 -0
- package/prompts/media/media-description/user-prompt.md +8 -0
- package/utils/constants/index.mjs +0 -107
- package/utils/file-utils.mjs +41 -0
- package/media.md +0 -19
|
@@ -1,96 +1,69 @@
|
|
|
1
1
|
# 設定
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
正確的設定是引導 AIGNE DocSmith 工具產生符合您專案特定需求文件的基礎。此過程涉及透過一個中央設定檔來定義專案層級的設定,並管理個人偏好設定以微調產生過程。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
本節將概覽如何設定此工具。有關詳細的逐步說明,請參考下方連結的具體指南。
|
|
6
6
|
|
|
7
|
-
<x-cards>
|
|
8
|
-
<x-card data-title="初始設定" data-icon="lucide:settings-2" data-href="/configuration/initial-setup"
|
|
9
|
-
|
|
7
|
+
<x-cards data-columns="2">
|
|
8
|
+
<x-card data-title="初始設定" data-icon="lucide:settings-2" data-href="/configuration/initial-setup">
|
|
9
|
+
遵循互動式設定指南來建立主要的 `config.yaml` 檔案。這是任何新文件專案的必要第一步。
|
|
10
|
+
</x-card>
|
|
11
|
+
<x-card data-title="管理偏好設定" data-icon="lucide:user-cog" data-href="/configuration/managing-preferences">
|
|
12
|
+
了解如何檢視、啟用、停用或刪除個人偏好設定。這些設定可讓您應用特定規則來補充主要的專案設定。
|
|
13
|
+
</x-card>
|
|
10
14
|
</x-cards>
|
|
11
15
|
|
|
12
|
-
## `config.yaml` 檔案
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
readerKnowledgeLevel: completeBeginners
|
|
59
|
-
|
|
60
|
-
# 文件深度:文件應該要多詳盡?
|
|
61
|
-
# 可用選項(取消註解並根據需要修改):
|
|
62
|
-
# essentialOnly - 僅涵蓋必要內容:涵蓋 80% 的使用案例,保持簡潔
|
|
63
|
-
# balancedCoverage - 平衡的涵蓋範圍:具有足夠深度和實用範例 [建議]
|
|
64
|
-
# comprehensive - 全面詳盡:涵蓋所有功能、邊界案例和進階情境
|
|
65
|
-
# aiDecide - 讓 AI 決定:分析程式碼複雜度並建議適當的深度
|
|
66
|
-
documentationDepth: comprehensive
|
|
67
|
-
|
|
68
|
-
# 自訂規則:定義特定的文件產生規則與要求
|
|
69
|
-
rules: |
|
|
70
|
-
Avoid using vague or empty words that don't provide measurable or specific details, such as 'intelligently', 'seamlessly', 'comprehensive', or 'high-quality'. Focus on concrete, verifiable facts and information.
|
|
71
|
-
Focus on concrete, verifiable facts and information.
|
|
72
|
-
Must cover all subcommands of DocSmith
|
|
73
|
-
|
|
74
|
-
# 目標受眾:描述您的特定目標受眾及其特徵
|
|
75
|
-
targetAudience: |
|
|
76
|
-
|
|
77
|
-
locale: en
|
|
78
|
-
translateLanguages:
|
|
79
|
-
- zh
|
|
80
|
-
- zh-TW
|
|
81
|
-
- ja
|
|
82
|
-
docsDir: ./docs # 儲存產生文件的目錄
|
|
83
|
-
sourcesPath: # 要分析的原始碼路徑
|
|
84
|
-
- ./README.md
|
|
85
|
-
- ./CHANGELOG.md
|
|
86
|
-
- ./aigne.yaml
|
|
87
|
-
- ./agents
|
|
88
|
-
- ./media.md
|
|
89
|
-
- ./.aigne/doc-smith/config.yaml
|
|
90
|
-
```
|
|
16
|
+
## 了解 `config.yaml` 檔案
|
|
17
|
+
|
|
18
|
+
`config.yaml` 檔案是您文件專案的唯一可信來源。它在初始設定過程中產生,並包含 AI 用於分析您的原始碼及產生內容的所有核心指令。一個設定正確的檔案可確保輸出內容是為您預期的受眾、目的和風格量身打造。
|
|
19
|
+
|
|
20
|
+
以下是您會在 `config.yaml` 檔案中找到的關鍵參數的詳細說明。
|
|
21
|
+
|
|
22
|
+
### 核心設定參數
|
|
23
|
+
|
|
24
|
+
<x-field-group>
|
|
25
|
+
<x-field data-name="projectName" data-type="string" data-required="true">
|
|
26
|
+
<x-field-desc markdown>您專案的正式名稱。此名稱將用於整份文件的標題和其他元資料中。</x-field-desc>
|
|
27
|
+
</x-field>
|
|
28
|
+
<x-field data-name="projectDesc" data-type="string" data-required="true">
|
|
29
|
+
<x-field-desc markdown>用一句話簡潔描述您專案的目的和功能。</x-field-desc>
|
|
30
|
+
</x-field>
|
|
31
|
+
<x-field data-name="projectLogo" data-type="string" data-required="false">
|
|
32
|
+
<x-field-desc markdown>指向您專案標誌圖片的 URL。此圖片將用於已發佈文件網站的品牌識別。</x-field-desc>
|
|
33
|
+
</x-field>
|
|
34
|
+
<x-field data-name="documentPurpose" data-type="array" data-required="true">
|
|
35
|
+
<x-field-desc markdown>定義文件的主要目標。範例包含用於入門指南的 `getStarted` 或用於程序說明的 `completeTasks`。</x-field-desc>
|
|
36
|
+
</x-field>
|
|
37
|
+
<x-field data-name="targetAudienceTypes" data-type="array" data-required="true">
|
|
38
|
+
<x-field-desc markdown>指定預期的讀者。範例包含針對非技術人員的 `endUsers` 或針對工程師的 `developers`。</x-field-desc>
|
|
39
|
+
</x-field>
|
|
40
|
+
<x-field data-name="readerKnowledgeLevel" data-type="string" data-required="true">
|
|
41
|
+
<x-field-desc markdown>描述目標受眾的預期技術知識和背景,例如 `completeBeginners`。</x-field-desc>
|
|
42
|
+
</x-field>
|
|
43
|
+
<x-field data-name="documentationDepth" data-type="string" data-required="true">
|
|
44
|
+
<x-field-desc markdown>控制產生內容的詳細程度。選項範圍從 `essentialOnly` 到 `comprehensive`。</x-field-desc>
|
|
45
|
+
</x-field>
|
|
46
|
+
<x-field data-name="rules" data-type="string" data-required="false">
|
|
47
|
+
<x-field-desc markdown>一組自訂指令、指南或限制,供 AI 在內容產生過程中遵循。</x-field-desc>
|
|
48
|
+
</x-field>
|
|
49
|
+
<x-field data-name="locale" data-type="string" data-required="true">
|
|
50
|
+
<x-field-desc markdown>文件的主要語言代碼,例如 `en` 代表英文。</x-field-desc>
|
|
51
|
+
</x-field>
|
|
52
|
+
<x-field data-name="translateLanguages" data-type="array" data-required="false">
|
|
53
|
+
<x-field-desc markdown>應將主要文件翻譯成的語言代碼列表,例如 `zh` (中文) 或 `ja` (日文)。</x-field-desc>
|
|
54
|
+
</x-field>
|
|
55
|
+
<x-field data-name="docsDir" data-type="string" data-required="true">
|
|
56
|
+
<x-field-desc markdown>儲存所產生文件檔案的本機目錄路徑。</x-field-desc>
|
|
57
|
+
</x-field>
|
|
58
|
+
<x-field data-name="sourcesPath" data-type="array" data-required="true">
|
|
59
|
+
<x-field-desc markdown>工具應分析以產生文件的來源檔案、目錄或 glob 模式的列表。</x-field-desc>
|
|
60
|
+
</x-field>
|
|
61
|
+
</x-field-group>
|
|
91
62
|
|
|
92
63
|
## 總結
|
|
93
64
|
|
|
94
|
-
|
|
65
|
+
一個定義完善的設定對於產出準確、相關且有效的文件至關重要。透過完成初始設定並了解 `config.yaml` 檔案,您為所有的文件任務奠定了堅實的基礎。
|
|
95
66
|
|
|
96
|
-
|
|
67
|
+
若要繼續設定您的專案,請參考以下指南:
|
|
68
|
+
* **[初始設定](./configuration-initial-setup.md)**:建立您專案的 `config.yaml` 檔案。
|
|
69
|
+
* **[管理偏好設定](./configuration-managing-preferences.md)**:使用個人規則自訂工具的行為。
|
package/docs/configuration.zh.md
CHANGED
|
@@ -1,96 +1,69 @@
|
|
|
1
1
|
# 配置
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
正确的配置是指导 AIGNE DocSmith 工具生成符合项目特定需求的文档的基础。该过程涉及通过中央配置文件定义项目级设置,以及管理个人偏好以微调生成过程。
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
本节概述了如何配置该工具。有关详细的分步说明,请参阅下面链接的具体指南。
|
|
6
6
|
|
|
7
|
-
<x-cards>
|
|
8
|
-
<x-card data-title="初始设置" data-icon="lucide:settings-2" data-href="/configuration/initial-setup"
|
|
9
|
-
|
|
7
|
+
<x-cards data-columns="2">
|
|
8
|
+
<x-card data-title="初始设置" data-icon="lucide:settings-2" data-href="/configuration/initial-setup">
|
|
9
|
+
遵循交互式设置指南创建主 `config.yaml` 文件。这是任何新文档项目必不可少的第一步。
|
|
10
|
+
</x-card>
|
|
11
|
+
<x-card data-title="管理偏好设置" data-icon="lucide:user-cog" data-href="/configuration/managing-preferences">
|
|
12
|
+
了解如何查看、启用、禁用或删除个人偏好设置。这些设置允许您应用特定规则来补充主项目配置。
|
|
13
|
+
</x-card>
|
|
10
14
|
</x-cards>
|
|
11
15
|
|
|
12
|
-
## `config.yaml` 文件
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
readerKnowledgeLevel: completeBeginners
|
|
59
|
-
|
|
60
|
-
# 文档深度:文档应有多全面?
|
|
61
|
-
# 可用选项(取消注释并根据需要修改):
|
|
62
|
-
# essentialOnly - 仅包含基本内容:覆盖 80% 的用例,保持简洁
|
|
63
|
-
# balancedCoverage - 平衡覆盖:具有适当深度和实际示例 [推荐]
|
|
64
|
-
# comprehensive - 全面:覆盖所有功能、边缘情况和高级场景
|
|
65
|
-
# aiDecide - 让 AI 决定:分析代码复杂性并建议适当的深度
|
|
66
|
-
documentationDepth: comprehensive
|
|
67
|
-
|
|
68
|
-
# 自定义规则:定义具体的文档生成规则和要求
|
|
69
|
-
rules: |
|
|
70
|
-
避免使用模糊或空洞的词语,这些词语无法提供可衡量或具体的细节,例如‘智能地’、‘无缝地’、‘全面地’或‘高质量地’。专注于具体、可验证的事实和信息。
|
|
71
|
-
专注于具体、可验证的事实和信息。
|
|
72
|
-
必须覆盖 DocSmith 的所有子命令
|
|
73
|
-
|
|
74
|
-
# 目标受众:描述您的具体目标受众及其特征
|
|
75
|
-
targetAudience: |
|
|
76
|
-
|
|
77
|
-
locale: en
|
|
78
|
-
translateLanguages:
|
|
79
|
-
- zh
|
|
80
|
-
- zh-TW
|
|
81
|
-
- ja
|
|
82
|
-
docsDir: ./docs # 保存生成文档的目录
|
|
83
|
-
sourcesPath: # 要分析的源代码路径
|
|
84
|
-
- ./README.md
|
|
85
|
-
- ./CHANGELOG.md
|
|
86
|
-
- ./aigne.yaml
|
|
87
|
-
- ./agents
|
|
88
|
-
- ./media.md
|
|
89
|
-
- ./.aigne/doc-smith/config.yaml
|
|
90
|
-
```
|
|
16
|
+
## 理解 `config.yaml` 文件
|
|
17
|
+
|
|
18
|
+
`config.yaml` 文件是您文档项目的主要可信来源。它在初始设置过程中生成,包含了 AI 用来分析源代码和生成内容的所有核心指令。正确配置的文件可确保输出内容符合您预期的受众、目的和风格。
|
|
19
|
+
|
|
20
|
+
以下是您将在 `config.yaml` 文件中找到的关键参数的分解说明。
|
|
21
|
+
|
|
22
|
+
### 核心配置参数
|
|
23
|
+
|
|
24
|
+
<x-field-group>
|
|
25
|
+
<x-field data-name="projectName" data-type="string" data-required="true">
|
|
26
|
+
<x-field-desc markdown>您项目的官方名称。该名称将用于整个文档的标题和其他元数据中。</x-field-desc>
|
|
27
|
+
</x-field>
|
|
28
|
+
<x-field data-name="projectDesc" data-type="string" data-required="true">
|
|
29
|
+
<x-field-desc markdown>关于您项目目的和功能的简明单句描述。</x-field-desc>
|
|
30
|
+
</x-field>
|
|
31
|
+
<x-field data-name="projectLogo" data-type="string" data-required="false">
|
|
32
|
+
<x-field-desc markdown>指向您项目徽标图像的 URL。该 URL 将用于已发布文档网站的品牌塑造。</x-field-desc>
|
|
33
|
+
</x-field>
|
|
34
|
+
<x-field data-name="documentPurpose" data-type="array" data-required="true">
|
|
35
|
+
<x-field-desc markdown>定义文档的主要目标。示例包括用于入门指南的 `getStarted` 或用于流程说明的 `completeTasks`。</x-field-desc>
|
|
36
|
+
</x-field>
|
|
37
|
+
<x-field data-name="targetAudienceTypes" data-type="array" data-required="true">
|
|
38
|
+
<x-field-desc markdown>指定预期的读者。示例包括非技术人员的 `endUsers` 或工程师的 `developers`。</x-field-desc>
|
|
39
|
+
</x-field>
|
|
40
|
+
<x-field data-name="readerKnowledgeLevel" data-type="string" data-required="true">
|
|
41
|
+
<x-field-desc markdown>描述目标受众假定的技术知识和背景,例如 `completeBeginners`。</x-field-desc>
|
|
42
|
+
</x-field>
|
|
43
|
+
<x-field data-name="documentationDepth" data-type="string" data-required="true">
|
|
44
|
+
<x-field-desc markdown>控制生成内容的详细程度。选项范围从 `essentialOnly` 到 `comprehensive`。</x-field-desc>
|
|
45
|
+
</x-field>
|
|
46
|
+
<x-field data-name="rules" data-type="string" data-required="false">
|
|
47
|
+
<x-field-desc markdown>一组供 AI 在内容生成过程中遵循的自定义指令、指南或约束。</x-field-desc>
|
|
48
|
+
</x-field>
|
|
49
|
+
<x-field data-name="locale" data-type="string" data-required="true">
|
|
50
|
+
<x-field-desc markdown>文档的主要语言代码,例如 `en` 代表英语。</x-field-desc>
|
|
51
|
+
</x-field>
|
|
52
|
+
<x-field data-name="translateLanguages" data-type="array" data-required="false">
|
|
53
|
+
<x-field-desc markdown>主要文档应翻译成的语言代码列表,例如 `zh`(中文)或 `ja`(日语)。</x-field-desc>
|
|
54
|
+
</x-field>
|
|
55
|
+
<x-field data-name="docsDir" data-type="string" data-required="true">
|
|
56
|
+
<x-field-desc markdown>用于保存生成的文档文件的本地目录路径。</x-field-desc>
|
|
57
|
+
</x-field>
|
|
58
|
+
<x-field data-name="sourcesPath" data-type="array" data-required="true">
|
|
59
|
+
<x-field-desc markdown>工具为生成文档而应分析的源文件、目录或 glob 模式的列表。</x-field-desc>
|
|
60
|
+
</x-field>
|
|
61
|
+
</x-field-group>
|
|
91
62
|
|
|
92
63
|
## 总结
|
|
93
64
|
|
|
94
|
-
|
|
65
|
+
定义良好的配置对于生成准确、相关且有效的文档至关重要。通过完成初始设置并理解 `config.yaml` 文件,您为所有文档任务奠定了坚实的基础。
|
|
95
66
|
|
|
96
|
-
|
|
67
|
+
要继续配置您的项目,请参阅以下指南:
|
|
68
|
+
* **[初始设置](./configuration-initial-setup.md)**:创建您项目的 `config.yaml` 文件。
|
|
69
|
+
* **[管理偏好设置](./configuration-managing-preferences.md)**:使用个人规则自定义工具的行为。
|
|
@@ -1,20 +1,20 @@
|
|
|
1
1
|
# はじめに
|
|
2
2
|
|
|
3
|
-
このガイドでは、AIGNE DocSmith
|
|
3
|
+
このガイドでは、AIGNE DocSmithをインストールし、最初のドキュメント一式を生成するための手順をステップバイステップで説明します。このプロセスは分かりやすいように設計されており、数分で完了できます。
|
|
4
4
|
|
|
5
5
|
## 前提条件
|
|
6
6
|
|
|
7
7
|
インストールを進める前に、お使いのシステムが以下の要件を満たしていることを確認してください。
|
|
8
8
|
|
|
9
|
-
* **Node.js**: バージョン20以降が必要です。DocSmithはNode
|
|
9
|
+
* **Node.js**: バージョン20以降が必要です。DocSmithはNode Package Manager (npm) を使用してインストールされ、これはNode.jsのインストールに含まれています。Node.jsをインストールするには、公式の[Node.jsウェブサイト](https://nodejs.org/)にアクセスし、お使いのオペレーティングシステムの手順に従ってください。ターミナルを開き、`node -v`と`npm -v`を実行することでインストールを確認できます。
|
|
10
10
|
|
|
11
|
-
* **APIキー**: 開始にあたりAPIキーは不要です。デフォルトでは、DocSmithはAI
|
|
11
|
+
* **APIキー**: 開始にあたりAPIキーは不要です。デフォルトでは、DocSmithはAIを利用した生成のためにAIGNE Hubサービスを使用します。これにより、直接的な設定なしで様々な大規模言語モデルを利用できます。
|
|
12
12
|
|
|
13
13
|
## インストール
|
|
14
14
|
|
|
15
|
-
このツールは、AIGNE
|
|
15
|
+
このツールは、AIGNEコマンドラインインターフェース(CLI)の一部として配布されます。インストールプロセスは、2つの簡単なステップで構成されています。
|
|
16
16
|
|
|
17
|
-
### ステップ1:AIGNE CLI
|
|
17
|
+
### ステップ1:AIGNE CLIのインストール
|
|
18
18
|
|
|
19
19
|
システムにAIGNE CLIをグローバルにインストールするには、ターミナルで以下のコマンドを実行します。
|
|
20
20
|
|
|
@@ -22,23 +22,23 @@
|
|
|
22
22
|
npm install -g @aigne/cli
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
|
|
25
|
+
このコマンドはnpmレジストリからパッケージをダウンロードしてインストールし、ターミナルのどのディレクトリからでも`aigne`コマンドが利用できるようになります。
|
|
26
26
|
|
|
27
|
-
### ステップ2
|
|
27
|
+
### ステップ2:インストールの確認
|
|
28
28
|
|
|
29
|
-
|
|
29
|
+
インストールが完了したら、ドキュメントツールのヘルプコマンドを実行して確認できます。
|
|
30
30
|
|
|
31
31
|
```bash title="インストールの確認"
|
|
32
32
|
aigne doc --help
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
|
|
35
|
+
このコマンドは、利用可能なDocSmithのコマンドとそのオプションのリストを表示するはずです。これにより、インストールが成功したことが確認できます。
|
|
36
36
|
|
|
37
37
|
## 最初のドキュメントを生成する
|
|
38
38
|
|
|
39
|
-
|
|
39
|
+
以下の手順に従って、プロジェクトを分析し、ドキュメント一式を生成します。
|
|
40
40
|
|
|
41
|
-
### ステップ1
|
|
41
|
+
### ステップ1:プロジェクトディレクトリへの移動
|
|
42
42
|
|
|
43
43
|
ターミナルを開き、`cd`コマンドを使用して、ドキュメントを作成したいプロジェクトのルートにカレントディレクトリを変更します。
|
|
44
44
|
|
|
@@ -46,43 +46,62 @@ aigne doc --help
|
|
|
46
46
|
cd /path/to/your/project
|
|
47
47
|
```
|
|
48
48
|
|
|
49
|
-
### ステップ2
|
|
49
|
+
### ステップ2:生成コマンドの実行
|
|
50
50
|
|
|
51
|
-
主要な`generate
|
|
51
|
+
主要な`generate`コマンドを実行します。この単一のコマンドが、分析からコンテンツ生成までのドキュメント作成プロセス全体を処理します。
|
|
52
52
|
|
|
53
53
|
```bash title="生成コマンドの実行"
|
|
54
54
|
aigne doc generate
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
-
### ステップ3
|
|
57
|
+
### ステップ3:対話式セットアップの完了
|
|
58
58
|
|
|
59
|
-
プロジェクトで初めて`generate`コマンドを実行すると、DocSmith
|
|
59
|
+
プロジェクトで初めて`generate`コマンドを実行すると、DocSmithは一度限りの対話式セットアッププロセスを開始します。一連の質問を通じて、ドキュメントの主な目的、対象読者、言語などの設定を行います。
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
回答は`.aigne/doc-smith`ディレクトリにある`config.yaml`ファイルに保存されます。このファイルは、必要に応じて後で手動で編集できます。
|
|
60
64
|
|
|
61
65
|
### ステップ4:生成を待つ
|
|
62
66
|
|
|
63
67
|
セットアップが完了すると、DocSmithは自動的に以下のアクションを実行します。
|
|
64
68
|
|
|
65
|
-
1. **コードベースの分析**:
|
|
66
|
-
2. **構造の計画**:
|
|
67
|
-
3. **コンテンツの生成**:
|
|
69
|
+
1. **コードベースの分析**: ソースファイルをスキャンして、プロジェクトの構造、機能、ロジックを理解します。
|
|
70
|
+
2. **構造の計画**: セクションやトピックを概説し、ドキュメントの論理的な計画を作成します。
|
|
71
|
+
3. **コンテンツの生成**: 分析と設定に基づいてドキュメントのコンテンツを作成します。
|
|
72
|
+
|
|
73
|
+
完了すると確認メッセージが表示され、生成されたファイルはセットアップ時に指定された出力ディレクトリ(デフォルトでは`.aigne/doc-smith/docs`)に配置されます。
|
|
74
|
+
|
|
75
|
+

|
|
76
|
+
|
|
77
|
+
## 全コマンドの確認
|
|
78
|
+
|
|
79
|
+
DocSmithは、ドキュメントのライフサイクル全体を管理するための一連のコマンドを提供します。以下の表は、利用可能なすべてのコマンドとその機能の一覧です。
|
|
68
80
|
|
|
69
|
-
|
|
81
|
+
| コマンド | 説明 |
|
|
82
|
+
| :---------- | :------------------------------------------------------------------------------------------------------------ |
|
|
83
|
+
| `generate` | コードベースを分析し、設定に基づいてドキュメント一式を生成します。 |
|
|
84
|
+
| `update` | 既存のドキュメントの特定の部分を対話形式で選択し、多くの場合新しいフィードバックを加えて再生成します。 |
|
|
85
|
+
| `translate` | 既存のドキュメントを、`zh`や`ja`など、サポートされている12言語のいずれかに翻訳します。 |
|
|
86
|
+
| `publish` | 生成されたドキュメントをライブプラットフォームに公開し、URL経由でアクセスできるようにします。 |
|
|
87
|
+
| `init` | 対話式のセットアップウィザードを開始して、`config.yaml`設定ファイルを作成または上書きします。 |
|
|
88
|
+
| `prefs` | `config.yaml`ファイルから現在の設定を表示します。 |
|
|
70
89
|
|
|
71
90
|
## 次のステップ
|
|
72
91
|
|
|
73
|
-
|
|
92
|
+
最初のドキュメント一式の生成が成功しました。ドキュメントを管理し、強化するための一般的な次のステップは以下の通りです。
|
|
74
93
|
|
|
75
94
|
<x-cards data-columns="2">
|
|
76
95
|
<x-card data-title="ドキュメントの更新" data-icon="lucide:refresh-cw" data-href="/guides/updating-documentation">
|
|
77
|
-
|
|
96
|
+
コードの変更や新しい要件に基づいて、ドキュメントの特定のセクションを修正または再生成します。
|
|
78
97
|
</x-card>
|
|
79
98
|
<x-card data-title="ドキュメントの翻訳" data-icon="lucide:languages" data-href="/guides/translating-documentation">
|
|
80
99
|
ドキュメントを中国語、スペイン語、ドイツ語など、サポートされている12言語のいずれかに翻訳します。
|
|
81
100
|
</x-card>
|
|
82
101
|
<x-card data-title="ドキュメントの公開" data-icon="lucide:rocket" data-href="/guides/publishing-your-docs">
|
|
83
|
-
|
|
102
|
+
ドキュメントをオンラインで利用可能にし、チームや一般の人がアクセスできるようにします。
|
|
84
103
|
</x-card>
|
|
85
104
|
<x-card data-title="設定の確認" data-icon="lucide:settings" data-href="/configuration/initial-setup">
|
|
86
|
-
|
|
105
|
+
初期設定時に作成されたconfig.yamlファイルを確認・修正して、設定を調整します。
|
|
87
106
|
</x-card>
|
|
88
|
-
</x-cards>
|
|
107
|
+
</x-cards>
|
package/docs/getting-started.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Getting Started
|
|
2
2
|
|
|
3
|
-
This guide provides a step-by-step procedure for installing AIGNE DocSmith and generating your first set of documentation. The process is designed to be straightforward and can be completed
|
|
3
|
+
This guide provides a step-by-step procedure for installing AIGNE DocSmith and generating your first set of documentation. The process is designed to be straightforward and can be completed in a few minutes.
|
|
4
4
|
|
|
5
5
|
## Prerequisites
|
|
6
6
|
|
|
@@ -12,7 +12,7 @@ Before proceeding with the installation, ensure your system meets the following
|
|
|
12
12
|
|
|
13
13
|
## Installation
|
|
14
14
|
|
|
15
|
-
The tool is distributed as part of the AIGNE command-line interface (CLI).
|
|
15
|
+
The tool is distributed as part of the AIGNE command-line interface (CLI). The installation process consists of two simple steps.
|
|
16
16
|
|
|
17
17
|
### Step 1: Install the AIGNE CLI
|
|
18
18
|
|
|
@@ -22,17 +22,17 @@ To install the AIGNE CLI globally on your system, execute the following command
|
|
|
22
22
|
npm install -g @aigne/cli
|
|
23
23
|
```
|
|
24
24
|
|
|
25
|
-
This command downloads and installs the package, making the `aigne` command available from any directory.
|
|
25
|
+
This command downloads and installs the package from the npm registry, making the `aigne` command available from any directory in your terminal.
|
|
26
26
|
|
|
27
27
|
### Step 2: Verify the Installation
|
|
28
28
|
|
|
29
|
-
After the installation is complete, verify it by running the help command for the documentation tool:
|
|
29
|
+
After the installation is complete, you can verify it by running the help command for the documentation tool:
|
|
30
30
|
|
|
31
31
|
```bash title="Verify Installation"
|
|
32
32
|
aigne doc --help
|
|
33
33
|
```
|
|
34
34
|
|
|
35
|
-
This command should display a list of available DocSmith commands and options,
|
|
35
|
+
This command should display a list of available DocSmith commands and their options, which confirms that the installation was successful.
|
|
36
36
|
|
|
37
37
|
## Generating Your First Documents
|
|
38
38
|
|
|
@@ -48,7 +48,7 @@ cd /path/to/your/project
|
|
|
48
48
|
|
|
49
49
|
### Step 2: Run the Generate Command
|
|
50
50
|
|
|
51
|
-
Execute the primary `generate` command. This single command handles the entire documentation creation process.
|
|
51
|
+
Execute the primary `generate` command. This single command handles the entire documentation creation process from analysis to content generation.
|
|
52
52
|
|
|
53
53
|
```bash title="Run Generate Command"
|
|
54
54
|
aigne doc generate
|
|
@@ -56,17 +56,36 @@ aigne doc generate
|
|
|
56
56
|
|
|
57
57
|
### Step 3: Complete the Interactive Setup
|
|
58
58
|
|
|
59
|
-
The first time you run the `generate` command in a project, DocSmith will initiate a one-time interactive setup process. You will be
|
|
59
|
+
The first time you run the `generate` command in a project, DocSmith will initiate a one-time interactive setup process. You will be guided through a series of questions to configure your documentation preferences, such as its primary purpose, target audience, and language.
|
|
60
|
+
|
|
61
|
+

|
|
62
|
+
|
|
63
|
+
Your answers are saved to a `config.yaml` file located in the `.aigne/doc-smith` directory. This file can be manually edited later if needed.
|
|
60
64
|
|
|
61
65
|
### Step 4: Await Generation
|
|
62
66
|
|
|
63
67
|
Once the setup is complete, DocSmith will perform the following actions automatically:
|
|
64
68
|
|
|
65
|
-
1. **Analyze Codebase**: It scans your source files to understand the project's structure and logic.
|
|
66
|
-
2. **Plan Structure**: It creates a logical plan for the documentation,
|
|
69
|
+
1. **Analyze Codebase**: It scans your source files to understand the project's structure, functions, and logic.
|
|
70
|
+
2. **Plan Structure**: It creates a logical plan for the documentation, outlining sections and topics.
|
|
67
71
|
3. **Generate Content**: It writes the documentation content based on the analysis and your configuration.
|
|
68
72
|
|
|
69
|
-
Upon completion, a confirmation message will appear, and the generated files will be located in the output directory specified during setup (
|
|
73
|
+
Upon completion, a confirmation message will appear, and the generated files will be located in the output directory specified during setup (by default, `.aigne/doc-smith/docs`).
|
|
74
|
+
|
|
75
|
+

|
|
76
|
+
|
|
77
|
+
## Exploring All Commands
|
|
78
|
+
|
|
79
|
+
DocSmith provides a set of commands to manage the full lifecycle of your documentation. The table below lists all available commands and their functions.
|
|
80
|
+
|
|
81
|
+
| Command | Description |
|
|
82
|
+
| :---------- | :------------------------------------------------------------------------------------------------------------ |
|
|
83
|
+
| `generate` | Analyzes the codebase and generates a complete set of documentation based on the configuration. |
|
|
84
|
+
| `update` | Interactively selects and regenerates specific parts of existing documentation, often with new feedback. |
|
|
85
|
+
| `translate` | Translates existing documentation into one or more of the 12 supported languages, such as `zh` or `ja`. |
|
|
86
|
+
| `publish` | Publishes the generated documentation to a live platform, making it accessible via a URL. |
|
|
87
|
+
| `init` | Starts the interactive setup wizard to create or overwrite the `config.yaml` configuration file. |
|
|
88
|
+
| `prefs` | Displays the current configuration settings from the `config.yaml` file. |
|
|
70
89
|
|
|
71
90
|
## What's Next?
|
|
72
91
|
|