@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,120 +1,88 @@
1
1
  # はじめに
2
2
 
3
- このガイドでは、AIGNE DocSmith をインストールし、プロジェクトを設定し、ソースコードから完全なドキュメント一式を数分で生成するための手順をステップバイステップで説明します。
3
+ このガイドでは、AIGNE DocSmithをインストールし、最初のドキュメントセットを生成するためのステップバイステップの手順を説明します。このプロセスは分かりやすく設計されており、短時間で完了できます。
4
4
 
5
- ## ステップ1:前提条件
5
+ ## 前提条件
6
6
 
7
- 始める前に、お使いのシステムに Node.js バージョン 20 以降がインストールされていることを確認してください。DocSmith は Node.js 環境で動作するコマンドラインツールです。インストールには、Node.js に付属している Node Package Manager (npm) の使用を推奨します。
7
+ インストールを進める前に、お使いのシステムが以下の要件を満たしていることを確認してください。
8
8
 
9
- 詳細なインストール手順については、公式の [Node.js ウェブサイト](https://nodejs.org/) を参照してください。一般的なオペレーティングシステム向けの簡単なガイドを以下に示します。
9
+ * **Node.js**: バージョン20以降が必要です。DocSmithはNode.jsのインストールに含まれているNode Package Manager (npm) を使用してインストールされます。Node.jsをインストールするには、公式の[Node.jsウェブサイト](https://nodejs.org/)にアクセスし、お使いのオペレーティングシステムの手順に従ってください。ターミナルを開き、`node -v`と`npm -v`を実行することでインストールを確認できます。
10
10
 
11
- **Windows**
12
- 1. [Node.js ダウンロードページ](https://nodejs.org/en/download) から Windows インストーラー (`.msi`) をダウンロードします。
13
- 2. インストーラーを実行し、セットアップウィザードの指示に従います。
11
+ * **APIキー**: 開始にあたりAPIキーは不要です。デフォルトでは、DocSmithはAIによる生成のためにAIGNE Hubサービスを使用します。これにより、直接的な設定なしで様々な大規模言語モデルを利用できます。
14
12
 
15
- **macOS**
13
+ ## インストール
16
14
 
17
- macOS のパッケージマネージャーである [Homebrew](https://brew.sh/) を使用したインストール方法を推奨します。
15
+ このツールは、AIGNEコマンドラインインターフェース(CLI)の一部として配布されています。
18
16
 
19
- ```bash Terminal icon=lucide:apple
20
- # Homebrew がまだインストールされていない場合はインストールします
21
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
17
+ ### ステップ1:AIGNE CLIをインストールする
22
18
 
23
- # Node.js をインストールします
24
- brew install node
25
- ```
26
-
27
- または、[Node.js ウェブサイト](https://nodejs.org/) から直接 macOS インストーラー (`.pkg`) をダウンロードすることもできます。
28
-
29
- **Linux**
19
+ システムにAIGNE CLIをグローバルにインストールするには、ターミナルで以下のコマンドを実行します。
30
20
 
31
- Debian および Ubuntu ベースのディストリビューションでは、次のコマンドを使用します。
32
-
33
- ```bash Terminal icon=lucide:laptop
34
- sudo apt-get update
35
- sudo apt-get install -y ca-certificates curl gnupg
36
- curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
37
- sudo apt-get install -y nodejs
21
+ ```bash title="AIGNE CLIのインストール" icon=logos:npm-icon
22
+ npm install -g @aigne/cli
38
23
  ```
39
24
 
40
- Red Hat、CentOS、および Fedora では、次のコマンドを使用します。
25
+ このコマンドはパッケージをダウンロードしてインストールし、どのディレクトリからでも`aigne`コマンドを利用できるようにします。
41
26
 
42
- ```bash Terminal icon=lucide:laptop
43
- curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
44
- sudo yum install nodejs
45
- ```
46
-
47
- ### インストールの確認
27
+ ### ステップ2:インストールを確認する
48
28
 
49
- インストールが完了したら、ターミナルを開き、次のコマンドを実行して Node.js と npm が正しくインストールされていることを確認します。
29
+ インストールが完了したら、ドキュメンテーションツールのヘルプコマンドを実行して確認します。
50
30
 
51
- ```bash Terminal
52
- node --version
53
- npm --version
31
+ ```bash title="インストールの確認"
32
+ aigne doc --help
54
33
  ```
55
34
 
56
- ## ステップ2:AIGNE CLI のインストール
35
+ このコマンドにより、利用可能なDocSmithのコマンドとオプションのリストが表示され、インストールが成功したことを確認できます。
57
36
 
58
- DocSmith ツールは、公式の AIGNE コマンドラインインターフェース (CLI) の一部として配布されています。npm を使用して、システムに CLI をグローバルにインストールします。
37
+ ## 最初のドキュメントを生成する
59
38
 
60
- ```bash Terminal icon=logos:npm
61
- npm install -g @aigne/cli
62
- ```
39
+ 以下の手順に従って、プロジェクトを分析し、完全なドキュメントセットを生成します。
63
40
 
64
- インストールが完了したら、ヘルプコマンドを実行して DocSmith が利用可能であることを確認します。
41
+ ### ステップ1:プロジェクトディレクトリに移動する
65
42
 
66
- ```bash Terminal
67
- aigne doc --help
68
- ```
43
+ ターミナルを開き、`cd`コマンドを使用して、ドキュメントを作成したいプロジェクトのルートにカレントディレクトリを変更します。
69
44
 
70
- このコマンドを実行すると、DocSmith のヘルプメニューが表示され、インストールが完了し、使用できる状態であることが確認できます。
45
+ ```bash title="ディレクトリの変更" icon=mdi:folder-open
46
+ cd /path/to/your/project
47
+ ```
71
48
 
72
- ## ステップ3:ドキュメントの生成
49
+ ### ステップ2:生成コマンドを実行する
73
50
 
74
- AIGNE CLI をインストールしたら、ドキュメントを生成できます。ターミナルでプロジェクトのルートディレクトリに移動し、次のコマンドを実行します。
51
+ 主要な`generate`コマンドを実行します。この単一のコマンドが、ドキュメント作成プロセス全体を処理します。
75
52
 
76
- ```bash Terminal icon=lucide:sparkles
53
+ ```bash title="生成コマンドの実行"
77
54
  aigne doc generate
78
55
  ```
79
56
 
80
- ![generate コマンドを実行すると、プロセスが開始され、インテリジェントなセットアップウィザードがトリガーされます。](../assets/screenshots/doc-generate.png)
81
-
82
- ### 自動設定
83
-
84
- 新しいプロジェクトでこのコマンドを初めて実行すると、DocSmith は設定ファイルが存在しないことを検出し、プロセスをガイドするための対話型のセットアップウィザードを自動的に起動します。
57
+ ### ステップ3:対話式セットアップを完了する
85
58
 
86
- ウィザードでは、ドキュメントの特性を定義するための一連の質問が表示されます。これには以下が含まれます。
59
+ プロジェクトで初めて`generate`コマンドを実行すると、DocSmithは1回限りの対話式セットアッププロセスを開始します。ドキュメントの主な目的、対象読者、言語など、ドキュメントの設定に関する一連の質問が表示されます。設定を保存するために、`.aigne/doc-smith`ディレクトリに`config.yaml`ファイルが作成されます。
87
60
 
88
- * 主な目的とライティングスタイル。
89
- * 対象読者(例:開発者、エンドユーザー)。
90
- * 主要言語と翻訳用の追加言語。
91
- * AI が分析するソースコードのパス。
92
- * 生成されたドキュメントファイルの出力ディレクトリ。
61
+ ### ステップ4:生成を待つ
93
62
 
94
- ![一連の質問に答えて、プロジェクトのセットアップを完了します。](../assets/screenshots/doc-complete-setup.png)
63
+ セットアップが完了すると、DocSmithは自動的に以下のアクションを実行します。
95
64
 
96
- プロンプトに回答すると、DocSmith は選択内容を設定ファイルに保存し、コードベースの分析を開始し、ドキュメント構造を計画し、コンテンツを生成します。
65
+ 1. **コードベースの分析**: ソースファイルをスキャンして、プロジェクトの構造とロジックを理解します。
66
+ 2. **構造の計画**: セクションやトピックを含む、ドキュメントの論理的な計画を作成します。
67
+ 3. **コンテンツの生成**: 分析と設定に基づいてドキュメントのコンテンツを記述します。
97
68
 
98
- ![DocSmith がドキュメント構造を計画し、ファイルの生成を開始します。](../assets/screenshots/doc-generate-docs.png)
99
-
100
- ## ステップ4:出力の確認
101
-
102
- 生成プロセスが完了すると、ターミナルに確認メッセージが表示され、ドキュメントが正常に作成されたことが示されます。新しいドキュメントは、セットアップ時に指定した出力ディレクトリにあります。デフォルト設定を使用した場合は、`.aigne/doc-smith/docs` にあります。
103
-
104
- ![確認メッセージは、ドキュメントが正常に生成されたことを示します。](../assets/screenshots/doc-generated-successfully.png)
69
+ 完了すると確認メッセージが表示され、生成されたファイルはセットアップ時に指定された出力ディレクトリ(例:`.aigne/doc-smith/docs`)に配置されます。
105
70
 
106
71
  ## 次のステップ
107
72
 
108
- 最初のドキュメント一式が正常に生成されました。これで、より高度な機能やカスタマイズオプションを試す準備が整いました。
73
+ 最初のドキュメントセットの生成が成功しました。ドキュメントを管理し、強化するための一般的な次のステップは以下の通りです。
109
74
 
110
- <x-cards>
111
- <x-card data-title="コア機能" data-icon="lucide:box" data-href="/features">
112
- ドキュメントの更新からオンラインでの公開まで、主要なコマンドと機能について学びます。
75
+ <x-cards data-columns="2">
76
+ <x-card data-title="ドキュメントの更新" data-icon="lucide:refresh-cw" data-href="/guides/updating-documentation">
77
+ コードの変更や新しい要件に基づいて、ドキュメントの特定の部分を修正または再生成します。
78
+ </x-card>
79
+ <x-card data-title="ドキュメントの翻訳" data-icon="lucide:languages" data-href="/guides/translating-documentation">
80
+ ドキュメントを中国語、スペイン語、ドイツ語など、サポートされている12言語のいずれかに翻訳します。
113
81
  </x-card>
114
- <x-card data-title="設定ガイド" data-icon="lucide:settings" data-href="/configuration">
115
- 設定ファイルを編集して、ドキュメントのスタイル、対象読者、言語を微調整する方法を学びます。
82
+ <x-card data-title="ドキュメントの公開" data-icon="lucide:rocket" data-href="/guides/publishing-your-docs">
83
+ ドキュメントをオンラインで公開し、チームや一般の人が利用できるようにします。
116
84
  </x-card>
117
- <x-card data-title="CLI コマンドリファレンス" data-icon="lucide:terminal" data-href="/cli-reference">
118
- 利用可能なすべての `aigne doc` コマンドとそのオプションの完全なリファレンスを取得します。
85
+ <x-card data-title="設定の確認" data-icon="lucide:settings" data-href="/configuration/initial-setup">
86
+ 初期セットアップ時に作成されたconfig.yamlファイルを確認・修正して、設定を調整します。
119
87
  </x-card>
120
88
  </x-cards>
@@ -1,120 +1,88 @@
1
1
  # Getting Started
2
2
 
3
- This guide provides a step-by-step walkthrough to install AIGNE DocSmith, configure a project, and generate a complete set of documentation from your source code in minutes.
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 quickly.
4
4
 
5
- ## Step 1: Prerequisites
5
+ ## Prerequisites
6
6
 
7
- Before you begin, ensure you have Node.js version 20 or higher installed on your system. DocSmith is a command-line tool that operates within the Node.js environment. We recommend using the Node Package Manager (npm), which is included with Node.js, for installation.
7
+ Before proceeding with the installation, ensure your system meets the following requirements:
8
8
 
9
- For detailed installation instructions, please refer to the official [Node.js website](https://nodejs.org/). A brief guide for common operating systems is provided below.
9
+ * **Node.js**: Version 20 or newer is required. DocSmith is installed using the Node Package Manager (npm), which is included with the Node.js installation. To install Node.js, visit the official [Node.js website](https://nodejs.org/) and follow the instructions for your operating system. You can verify the installation by opening your terminal and running `node -v` and `npm -v`.
10
10
 
11
- **Windows**
12
- 1. Download the Windows Installer (`.msi`) from the [Node.js downloads page](https://nodejs.org/en/download).
13
- 2. Execute the installer and follow the prompts in the setup wizard.
11
+ * **API Keys**: No API keys are required to start. By default, DocSmith uses the AIGNE Hub service for AI-powered generation, which allows you to use various large language models without direct configuration.
14
12
 
15
- **macOS**
13
+ ## Installation
16
14
 
17
- The recommended installation method is using [Homebrew](https://brew.sh/), a package manager for macOS.
15
+ The tool is distributed as part of the AIGNE command-line interface (CLI).
18
16
 
19
- ```bash Terminal icon=lucide:apple
20
- # Install Homebrew if it is not already installed
21
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
17
+ ### Step 1: Install the AIGNE CLI
22
18
 
23
- # Install Node.js
24
- brew install node
25
- ```
26
-
27
- Alternatively, you can download the macOS Installer (`.pkg`) directly from the [Node.js website](https://nodejs.org/).
28
-
29
- **Linux**
19
+ To install the AIGNE CLI globally on your system, execute the following command in your terminal:
30
20
 
31
- For Debian and Ubuntu-based distributions, use the following commands:
32
-
33
- ```bash Terminal icon=lucide:laptop
34
- sudo apt-get update
35
- sudo apt-get install -y ca-certificates curl gnupg
36
- curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
37
- sudo apt-get install -y nodejs
21
+ ```bash title="Install AIGNE CLI" icon=logos:npm-icon
22
+ npm install -g @aigne/cli
38
23
  ```
39
24
 
40
- For Red Hat, CentOS, and Fedora, use the following commands:
25
+ This command downloads and installs the package, making the `aigne` command available from any directory.
41
26
 
42
- ```bash Terminal icon=lucide:laptop
43
- curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
44
- sudo yum install nodejs
45
- ```
46
-
47
- ### Verify Installation
27
+ ### Step 2: Verify the Installation
48
28
 
49
- After the installation is complete, open your terminal and run the following commands to confirm that Node.js and npm are correctly installed:
29
+ After the installation is complete, verify it by running the help command for the documentation tool:
50
30
 
51
- ```bash Terminal
52
- node --version
53
- npm --version
31
+ ```bash title="Verify Installation"
32
+ aigne doc --help
54
33
  ```
55
34
 
56
- ## Step 2: Install AIGNE CLI
35
+ This command should display a list of available DocSmith commands and options, confirming that the installation was successful.
57
36
 
58
- The DocSmith tool is distributed as part of the official AIGNE Command Line Interface (CLI). Install the CLI globally on your system using npm:
37
+ ## Generating Your First Documents
59
38
 
60
- ```bash Terminal icon=logos:npm
61
- npm install -g @aigne/cli
62
- ```
39
+ Follow these steps to analyze your project and generate a complete set of documentation.
63
40
 
64
- Once the installation is finished, verify that DocSmith is available by running its help command:
41
+ ### Step 1: Navigate to Your Project Directory
65
42
 
66
- ```bash Terminal
67
- aigne doc --help
68
- ```
43
+ Open your terminal and use the `cd` command to change the current directory to the root of the project you wish to document.
69
44
 
70
- This command should display the help menu for DocSmith, confirming that it is installed and ready to use.
45
+ ```bash title="Change Directory" icon=mdi:folder-open
46
+ cd /path/to/your/project
47
+ ```
71
48
 
72
- ## Step 3: Generate Your Documentation
49
+ ### Step 2: Run the Generate Command
73
50
 
74
- With the AIGNE CLI installed, you can now generate your documentation. Navigate to the root directory of your project in your terminal and execute the following command:
51
+ Execute the primary `generate` command. This single command handles the entire documentation creation process.
75
52
 
76
- ```bash Terminal icon=lucide:sparkles
53
+ ```bash title="Run Generate Command"
77
54
  aigne doc generate
78
55
  ```
79
56
 
80
- ![Running the generate command initiates the process and triggers an intelligent setup wizard.](../assets/screenshots/doc-generate.png)
81
-
82
- ### Automatic Configuration
83
-
84
- The first time you run this command in a new project, DocSmith will detect that no configuration file exists and will automatically launch an interactive setup wizard to guide you through the process.
57
+ ### Step 3: Complete the Interactive Setup
85
58
 
86
- The wizard will ask a series of questions to define the characteristics of your documentation, including:
59
+ The first time you run the `generate` command in a project, DocSmith will initiate a one-time interactive setup process. You will be asked a series of questions to configure your documentation preferences, such as its primary purpose, target audience, and language. A `config.yaml` file will be created in the `.aigne/doc-smith` directory to store your settings.
87
60
 
88
- * The primary purpose and writing style.
89
- * The intended target audience (e.g., developers, end-users).
90
- * The primary language and any additional languages for translation.
91
- * The source code paths for the AI to analyze.
92
- * The output directory for the generated document files.
61
+ ### Step 4: Await Generation
93
62
 
94
- ![Answer a series of questions to complete the project setup.](../assets/screenshots/doc-complete-setup.png)
63
+ Once the setup is complete, DocSmith will perform the following actions automatically:
95
64
 
96
- After you answer the prompts, DocSmith will save your choices to a configuration file, begin analyzing your codebase, plan the document structure, and generate the content.
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, including sections and topics.
67
+ 3. **Generate Content**: It writes the documentation content based on the analysis and your configuration.
97
68
 
98
- ![DocSmith will plan the document structure and begin generating the files.](../assets/screenshots/doc-generate-docs.png)
99
-
100
- ## Step 4: Review Your Output
101
-
102
- When the generation process is complete, a confirmation message will appear in your terminal, indicating the successful creation of your documents. Your new documentation is now located in the output directory you specified during setup. If you used the default setting, you can find it at `.aigne/doc-smith/docs`.
103
-
104
- ![A confirmation message indicates that the documentation has been generated successfully.](../assets/screenshots/doc-generated-successfully.png)
69
+ Upon completion, a confirmation message will appear, and the generated files will be located in the output directory specified during setup (e.g., `.aigne/doc-smith/docs`).
105
70
 
106
71
  ## What's Next?
107
72
 
108
- You have successfully generated your first set of documents. Now you are ready to explore more advanced features and customization options.
73
+ You have successfully generated your first set of documents. Here are the common next steps to manage and enhance your documentation:
109
74
 
110
- <x-cards>
111
- <x-card data-title="Core Features" data-icon="lucide:box" data-href="/features">
112
- Explore the main commands and capabilities, from updating documents to publishing them online.
75
+ <x-cards data-columns="2">
76
+ <x-card data-title="Update Documentation" data-icon="lucide:refresh-cw" data-href="/guides/updating-documentation">
77
+ Modify or regenerate specific sections of your documentation based on code changes or new requirements.
78
+ </x-card>
79
+ <x-card data-title="Translate Documentation" data-icon="lucide:languages" data-href="/guides/translating-documentation">
80
+ Translate your documents into any of the 12 supported languages, such as Chinese, Spanish, or German.
113
81
  </x-card>
114
- <x-card data-title="Configuration Guide" data-icon="lucide:settings" data-href="/configuration">
115
- Learn how to fine-tune your documentation's style, audience, and languages by editing the configuration file.
82
+ <x-card data-title="Publish Your Docs" data-icon="lucide:rocket" data-href="/guides/publishing-your-docs">
83
+ Make your documentation available online for your team or the public.
116
84
  </x-card>
117
- <x-card data-title="CLI Command Reference" data-icon="lucide:terminal" data-href="/cli-reference">
118
- Get a complete reference for all available `aigne doc` commands and their options.
85
+ <x-card data-title="Review Configuration" data-icon="lucide:settings" data-href="/configuration/initial-setup">
86
+ Review and modify the config.yaml file that was created during the initial setup to adjust your preferences.
119
87
  </x-card>
120
88
  </x-cards>
@@ -1,120 +1,88 @@
1
1
  # 開始使用
2
2
 
3
- 本指南提供逐步教學,引導您安裝 AIGNE DocSmith、設定專案,並在幾分鐘內從您的原始碼產生一套完整的文件。
3
+ 本指南提供安裝 AIGNE DocSmith 並產生第一份文件的逐步流程。整個過程設計得簡單明瞭,可以快速完成。
4
4
 
5
- ## 步驟 1:前置準備
5
+ ## 前提條件
6
6
 
7
- 在開始之前,請確保您的系統上已安裝 Node.js 20 或更高版本。DocSmith 是一個在 Node.js 環境中運作的命令列工具。我們建議使用 Node.js 隨附的 Node Package Manager (npm) 進行安裝。
7
+ 在進行安裝之前,請確保您的系統符合以下要求:
8
8
 
9
- 關於詳細的安裝說明,請參考官方的 [Node.js 網站](https://nodejs.org/)。以下為常見作業系統的簡要指南。
9
+ * **Node.js**:需要 20 或更新版本。DocSmith 使用 Node Package Manager (npm) 安裝,npm 包含在 Node.js 的安裝中。若要安裝 Node.js,請造訪官方 [Node.js 網站](https://nodejs.org/) 並按照您作業系統的說明進行操作。您可以透過開啟終端機並執行 `node -v` 和 `npm -v` 來驗證安裝。
10
10
 
11
- **Windows**
12
- 1. 從 [Node.js 下載頁面](https://nodejs.org/en/download) 下載 Windows 安裝程式 (`.msi`)。
13
- 2. 執行安裝程式並依照設定精靈中的提示操作。
11
+ * **API 金鑰**:開始時不需要任何 API 金鑰。預設情況下,DocSmith 使用 AIGNE Hub 服務進行 AI 驅動的生成,讓您無需直接設定即可使用各種大型語言模型。
14
12
 
15
- **macOS**
13
+ ## 安裝
16
14
 
17
- 建議的安裝方法是使用 [Homebrew](https://brew.sh/),這是一款適用於 macOS 的套件管理器。
15
+ 此工具作為 AIGNE 命令列介面 (CLI) 的一部分進行分發。
18
16
 
19
- ```bash Terminal icon=lucide:apple
20
- # 如果尚未安裝 Homebrew,請先安裝
21
- /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
17
+ ### 步驟 1:安裝 AIGNE CLI
22
18
 
23
- # 安裝 Node.js
24
- brew install node
25
- ```
26
-
27
- 或者,您也可以直接從 [Node.js 網站](https://nodejs.org/) 下載 macOS 安裝程式 (`.pkg`)。
28
-
29
- **Linux**
19
+ 若要在您的系統上全域安裝 AIGNE CLI,請在終端機中執行以下指令:
30
20
 
31
- 對於 Debian 和基於 Ubuntu 的發行版,請使用以下指令:
32
-
33
- ```bash Terminal icon=lucide:laptop
34
- sudo apt-get update
35
- sudo apt-get install -y ca-certificates curl gnupg
36
- curl -fsSL https://deb.nodesource.com/setup_lts.x | sudo -E bash -
37
- sudo apt-get install -y nodejs
21
+ ```bash title="安裝 AIGNE CLI" icon=logos:npm-icon
22
+ npm install -g @aigne/cli
38
23
  ```
39
24
 
40
- 對於 Red Hat、CentOS 和 Fedora,請使用以下指令:
41
-
42
- ```bash Terminal icon=lucide:laptop
43
- curl -fsSL https://rpm.nodesource.com/setup_lts.x | sudo bash -
44
- sudo yum install nodejs
45
- ```
25
+ 此指令會下載並安裝套件,使 `aigne` 指令在任何目錄下都可用。
46
26
 
47
- ### 驗證安裝
27
+ ### 步驟 2:驗證安裝
48
28
 
49
- 安裝完成後,開啟您的終端機並執行以下指令,以確認 Node.js 和 npm 已正確安裝:
29
+ 安裝完成後,請執行文件工具的說明指令來進行驗證:
50
30
 
51
- ```bash Terminal
52
- node --version
53
- npm --version
31
+ ```bash title="驗證安裝"
32
+ aigne doc --help
54
33
  ```
55
34
 
56
- ## 步驟 2:安裝 AIGNE CLI
35
+ 此指令應會顯示可用的 DocSmith 指令與選項列表,確認安裝成功。
57
36
 
58
- DocSmith 工具是作為官方 AIGNE 命令列介面 (CLI) 的一部分發行的。請使用 npm 在您的系統上全域安裝 CLI:
37
+ ## 產生您的第一份文件
59
38
 
60
- ```bash Terminal icon=logos:npm
61
- npm install -g @aigne/cli
62
- ```
39
+ 請依照以下步驟分析您的專案並產生一套完整的文件。
63
40
 
64
- 安裝完成後,執行其幫助指令來驗證 DocSmith 是否可用:
41
+ ### 步驟 1:導覽至您的專案目錄
65
42
 
66
- ```bash Terminal
67
- aigne doc --help
68
- ```
43
+ 開啟您的終端機,並使用 `cd` 指令將目前目錄切換到您想要建立文件的專案根目錄。
69
44
 
70
- 此指令應顯示 DocSmith 的幫助選單,確認其已安裝並可供使用。
45
+ ```bash title="切換目錄" icon=mdi:folder-open
46
+ cd /path/to/your/project
47
+ ```
71
48
 
72
- ## 步驟 3:產生您的文件
49
+ ### 步驟 2:執行產生指令
73
50
 
74
- 安裝 AIGNE CLI 後,您現在可以產生您的文件了。在您的終端機中,導覽至專案的根目錄並執行以下指令:
51
+ 執行主要的 `generate` 指令。這個單一指令會處理整個文件建立過程。
75
52
 
76
- ```bash Terminal icon=lucide:sparkles
53
+ ```bash title="執行產生指令"
77
54
  aigne doc generate
78
55
  ```
79
56
 
57
+ ### 步驟 3:完成互動式設定
80
58
 
59
+ 當您第一次在專案中執行 `generate` 指令時,DocSmith 將啟動一次性的互動式設定流程。系統會詢問您一系列問題來設定您的文件偏好,例如其主要目的、目標受眾和語言。設定完成後,將會在 `.aigne/doc-smith` 目錄中建立一個 `config.yaml` 檔案來儲存您的設定。
81
60
 
82
- ### 自動設定
83
-
84
- 當您首次在新專案中執行此指令時,DocSmith 會偵測到沒有設定檔存在,並會自動啟動一個互動式設定精靈來引導您完成整個過程。
85
-
86
- 該精靈會詢問一系列問題來定義您文件的特性,包括:
87
-
88
- * 主要目的與寫作風格。
89
- * 預期的目標受眾(例如,開發者、終端使用者)。
90
- * 主要語言以及任何用於翻譯的其他語言。
91
- * 供 AI 分析的原始碼路徑。
92
- * 產生文件檔案的輸出目錄。
93
-
94
-
61
+ ### 步驟 4:等待產生
95
62
 
96
- 在您回答完提示後,DocSmith 會將您的選擇儲存到一個設定檔中,開始分析您的程式碼庫、規劃文件結構,並產生內容。
63
+ 設定完成後,DocSmith 將自動執行以下操作:
97
64
 
65
+ 1. **分析程式碼庫**:掃描您的原始檔案以了解專案的結構和邏輯。
66
+ 2. **規劃結構**:為文件建立一個邏輯計畫,包含章節和主題。
67
+ 3. **產生內容**:根據分析和您的設定撰寫文件內容。
98
68
 
69
+ 完成後,將會出現一則確認訊息,且產生的檔案將位於設定時指定的輸出目錄中(例如 `.aigne/doc-smith/docs`)。
99
70
 
100
- ## 步驟 4:檢視您的產出
71
+ ## 接下來呢?
101
72
 
102
- 當產生過程完成後,您的終端機中會出現一則確認訊息,表示您的文件已成功建立。您的新文件現在位於您在設定過程中指定的輸出目錄中。如果您使用預設設定,可以在 `.aigne/doc-smith/docs` 中找到它。
73
+ 您已成功產生第一份文件。以下是管理和強化文件的常見後續步驟:
103
74
 
104
-
105
-
106
- ## 下一步?
107
-
108
- 您已成功產生第一套文件。現在,您可以開始探索更進階的功能和自訂選項。
109
-
110
- <x-cards>
111
- <x-card data-title="核心功能" data-icon="lucide:box" data-href="/features">
112
- 探索主要指令與功能,從更新文件到線上發佈。
75
+ <x-cards data-columns="2">
76
+ <x-card data-title="更新文件" data-icon="lucide:refresh-cw" data-href="/guides/updating-documentation">
77
+ 根據程式碼變更或新需求,修改或重新產生文件的特定部分。
78
+ </x-card>
79
+ <x-card data-title="翻譯文件" data-icon="lucide:languages" data-href="/guides/translating-documentation">
80
+ 將您的文件翻譯成 12 種支援的語言之一,例如中文、西班牙文或德文。
113
81
  </x-card>
114
- <x-card data-title="設定指南" data-icon="lucide:settings" data-href="/configuration">
115
- 學習如何透過編輯設定檔來微調文件的風格、受眾和語言。
82
+ <x-card data-title="發布您的文件" data-icon="lucide:rocket" data-href="/guides/publishing-your-docs">
83
+ 將您的文件發布到網路上,供您的團隊或大眾使用。
116
84
  </x-card>
117
- <x-card data-title="CLI 指令參考" data-icon="lucide:terminal" data-href="/cli-reference">
118
- 取得所有可用 `aigne doc` 指令及其選項的完整參考。
85
+ <x-card data-title="檢視設定" data-icon="lucide:settings" data-href="/configuration/initial-setup">
86
+ 檢視並修改在初始設定期間建立的 config.yaml 檔案,以調整您的偏好設定。
119
87
  </x-card>
120
88
  </x-cards>