@aigne/doc-smith 0.8.12-beta.3 → 0.8.12-beta.5
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 +9 -6
- package/.aigne/doc-smith/output/structure-plan.json +123 -109
- package/.aigne/doc-smith/upload-cache.yaml +48 -0
- package/.github/workflows/publish-docs.yml +4 -7
- package/.release-please-manifest.json +1 -1
- package/CHANGELOG.md +20 -0
- package/agents/clear/choose-contents.mjs +22 -5
- package/agents/clear/clear-auth-tokens.mjs +2 -4
- package/agents/clear/clear-deployment-config.mjs +49 -0
- package/agents/clear/clear-document-config.mjs +2 -5
- package/agents/clear/clear-document-structure.mjs +2 -6
- package/agents/clear/clear-generated-docs.mjs +0 -1
- package/agents/generate/check-need-generate-structure.mjs +15 -60
- package/agents/generate/document-structure-tools/generate-sub-structure.mjs +131 -0
- package/agents/generate/generate-structure-without-tools.yaml +65 -0
- package/agents/generate/generate-structure.yaml +7 -1
- package/agents/generate/index.yaml +0 -3
- package/agents/generate/update-document-structure.yaml +3 -0
- package/agents/generate/user-review-document-structure.mjs +7 -5
- package/agents/init/index.mjs +15 -15
- package/agents/publish/publish-docs.mjs +130 -111
- package/agents/translate/index.yaml +1 -1
- package/agents/update/batch-generate-document.yaml +1 -1
- package/agents/update/batch-update-document.yaml +1 -1
- package/agents/update/check-document.mjs +4 -19
- package/agents/update/user-review-document.mjs +4 -3
- package/agents/utils/load-sources.mjs +54 -151
- package/agents/utils/transform-detail-datasources.mjs +14 -18
- package/aigne.yaml +2 -0
- package/biome.json +1 -1
- package/docs/_sidebar.md +13 -15
- package/docs/configuration-initial-setup.ja.md +179 -0
- package/docs/configuration-initial-setup.md +179 -0
- package/docs/configuration-initial-setup.zh-TW.md +179 -0
- package/docs/configuration-initial-setup.zh.md +179 -0
- package/docs/configuration-managing-preferences.ja.md +100 -0
- package/docs/configuration-managing-preferences.md +100 -0
- package/docs/configuration-managing-preferences.zh-TW.md +100 -0
- package/docs/configuration-managing-preferences.zh.md +100 -0
- package/docs/configuration.ja.md +68 -184
- package/docs/configuration.md +62 -178
- package/docs/configuration.zh-TW.md +70 -186
- package/docs/configuration.zh.md +67 -183
- package/docs/getting-started.ja.md +46 -78
- package/docs/getting-started.md +46 -78
- package/docs/getting-started.zh-TW.md +47 -79
- package/docs/getting-started.zh.md +47 -79
- package/docs/guides-cleaning-up.ja.md +50 -0
- package/docs/guides-cleaning-up.md +50 -0
- package/docs/guides-cleaning-up.zh-TW.md +50 -0
- package/docs/guides-cleaning-up.zh.md +50 -0
- package/docs/guides-evaluating-documents.ja.md +66 -0
- package/docs/guides-evaluating-documents.md +66 -0
- package/docs/guides-evaluating-documents.zh-TW.md +66 -0
- package/docs/guides-evaluating-documents.zh.md +66 -0
- package/docs/guides-generating-documentation.ja.md +149 -0
- package/docs/guides-generating-documentation.md +149 -0
- package/docs/guides-generating-documentation.zh-TW.md +149 -0
- package/docs/guides-generating-documentation.zh.md +149 -0
- package/docs/guides-interactive-chat.ja.md +85 -0
- package/docs/guides-interactive-chat.md +85 -0
- package/docs/guides-interactive-chat.zh-TW.md +85 -0
- package/docs/guides-interactive-chat.zh.md +85 -0
- package/docs/guides-managing-history.ja.md +51 -0
- package/docs/guides-managing-history.md +51 -0
- package/docs/guides-managing-history.zh-TW.md +51 -0
- package/docs/guides-managing-history.zh.md +51 -0
- package/docs/guides-publishing-your-docs.ja.md +78 -0
- package/docs/guides-publishing-your-docs.md +78 -0
- package/docs/guides-publishing-your-docs.zh-TW.md +78 -0
- package/docs/guides-publishing-your-docs.zh.md +78 -0
- package/docs/guides-translating-documentation.ja.md +95 -0
- package/docs/guides-translating-documentation.md +95 -0
- package/docs/guides-translating-documentation.zh-TW.md +95 -0
- package/docs/guides-translating-documentation.zh.md +95 -0
- package/docs/guides-updating-documentation.ja.md +77 -0
- package/docs/guides-updating-documentation.md +77 -0
- package/docs/guides-updating-documentation.zh-TW.md +77 -0
- package/docs/guides-updating-documentation.zh.md +77 -0
- package/docs/guides.ja.md +32 -0
- package/docs/guides.md +32 -0
- package/docs/guides.zh-TW.md +32 -0
- package/docs/guides.zh.md +32 -0
- package/docs/overview.ja.md +39 -60
- package/docs/overview.md +39 -60
- package/docs/overview.zh-TW.md +39 -60
- package/docs/overview.zh.md +39 -60
- package/docs/release-notes.ja.md +255 -0
- package/docs/release-notes.md +255 -0
- package/docs/release-notes.zh-TW.md +255 -0
- package/docs/release-notes.zh.md +255 -0
- package/package.json +4 -2
- package/prompts/common/document/content-rules-core.md +1 -0
- package/prompts/common/document-structure/document-structure-rules.md +8 -9
- package/prompts/common/document-structure/output-constraints.md +1 -1
- package/prompts/structure/document-rules.md +8 -2
- package/prompts/structure/generate/system-prompt.md +27 -2
- package/prompts/structure/generate/user-prompt.md +18 -0
- package/prompts/structure/update/system-prompt.md +12 -0
- package/prompts/structure/update/user-prompt.md +3 -0
- package/tests/agents/clear/choose-contents.test.mjs +8 -4
- package/tests/agents/generate/check-need-generate-structure.test.mjs +53 -63
- package/tests/agents/generate/document-structure-tools/generate-sub-structure.test.mjs +277 -0
- package/tests/agents/init/init.test.mjs +18 -18
- package/tests/agents/publish/publish-docs.test.mjs +79 -0
- package/tests/agents/update/check-document.test.mjs +7 -67
- package/tests/agents/utils/load-sources.test.mjs +90 -90
- package/tests/agents/utils/transform-detail-datasources.test.mjs +153 -196
- package/tests/utils/file-utils.test.mjs +309 -1
- package/utils/auth-utils.mjs +9 -3
- package/utils/constants/index.mjs +3 -1
- package/utils/file-utils.mjs +315 -0
- package/utils/utils.mjs +89 -50
- package/docs/advanced-how-it-works.ja.md +0 -101
- package/docs/advanced-how-it-works.md +0 -101
- package/docs/advanced-how-it-works.zh-TW.md +0 -101
- package/docs/advanced-how-it-works.zh.md +0 -101
- package/docs/advanced-quality-assurance.ja.md +0 -92
- package/docs/advanced-quality-assurance.md +0 -92
- package/docs/advanced-quality-assurance.zh-TW.md +0 -92
- package/docs/advanced-quality-assurance.zh.md +0 -92
- package/docs/advanced.ja.md +0 -20
- package/docs/advanced.md +0 -20
- package/docs/advanced.zh-TW.md +0 -20
- package/docs/advanced.zh.md +0 -20
- package/docs/changelog.ja.md +0 -486
- package/docs/changelog.md +0 -486
- package/docs/changelog.zh-TW.md +0 -486
- package/docs/changelog.zh.md +0 -486
- package/docs/cli-reference.ja.md +0 -311
- package/docs/cli-reference.md +0 -311
- package/docs/cli-reference.zh-TW.md +0 -311
- package/docs/cli-reference.zh.md +0 -311
- package/docs/configuration-interactive-setup.ja.md +0 -138
- package/docs/configuration-interactive-setup.md +0 -138
- package/docs/configuration-interactive-setup.zh-TW.md +0 -138
- package/docs/configuration-interactive-setup.zh.md +0 -138
- package/docs/configuration-language-support.ja.md +0 -64
- package/docs/configuration-language-support.md +0 -64
- package/docs/configuration-language-support.zh-TW.md +0 -64
- package/docs/configuration-language-support.zh.md +0 -64
- package/docs/configuration-llm-setup.ja.md +0 -56
- package/docs/configuration-llm-setup.md +0 -56
- package/docs/configuration-llm-setup.zh-TW.md +0 -56
- package/docs/configuration-llm-setup.zh.md +0 -56
- package/docs/configuration-preferences.ja.md +0 -144
- package/docs/configuration-preferences.md +0 -144
- package/docs/configuration-preferences.zh-TW.md +0 -144
- package/docs/configuration-preferences.zh.md +0 -144
- package/docs/features-generate-documentation.ja.md +0 -95
- package/docs/features-generate-documentation.md +0 -95
- package/docs/features-generate-documentation.zh-TW.md +0 -95
- package/docs/features-generate-documentation.zh.md +0 -95
- package/docs/features-publish-your-docs.ja.md +0 -130
- package/docs/features-publish-your-docs.md +0 -130
- package/docs/features-publish-your-docs.zh-TW.md +0 -130
- package/docs/features-publish-your-docs.zh.md +0 -130
- package/docs/features-translate-documentation.ja.md +0 -90
- package/docs/features-translate-documentation.md +0 -90
- package/docs/features-translate-documentation.zh-TW.md +0 -90
- package/docs/features-translate-documentation.zh.md +0 -90
- package/docs/features-update-and-refine.ja.md +0 -142
- package/docs/features-update-and-refine.md +0 -142
- package/docs/features-update-and-refine.zh-TW.md +0 -143
- package/docs/features-update-and-refine.zh.md +0 -142
- package/docs/features.ja.md +0 -62
- package/docs/features.md +0 -62
- package/docs/features.zh-TW.md +0 -62
- package/docs/features.zh.md +0 -62
|
@@ -1,120 +1,88 @@
|
|
|
1
1
|
# はじめに
|
|
2
2
|
|
|
3
|
-
このガイドでは、AIGNE DocSmith
|
|
3
|
+
このガイドでは、AIGNE DocSmithをインストールし、最初のドキュメントセットを生成するためのステップバイステップの手順を説明します。このプロセスは分かりやすく設計されており、短時間で完了できます。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 前提条件
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
インストールを進める前に、お使いのシステムが以下の要件を満たしていることを確認してください。
|
|
8
8
|
|
|
9
|
-
|
|
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
|
-
**
|
|
12
|
-
1. [Node.js ダウンロードページ](https://nodejs.org/en/download) から Windows インストーラー (`.msi`) をダウンロードします。
|
|
13
|
-
2. インストーラーを実行し、セットアップウィザードの指示に従います。
|
|
11
|
+
* **APIキー**: 開始にあたりAPIキーは不要です。デフォルトでは、DocSmithはAIによる生成のためにAIGNE Hubサービスを使用します。これにより、直接的な設定なしで様々な大規模言語モデルを利用できます。
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
## インストール
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
このツールは、AIGNEコマンドラインインターフェース(CLI)の一部として配布されています。
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
# Homebrew がまだインストールされていない場合はインストールします
|
|
21
|
-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
17
|
+
### ステップ1:AIGNE CLIをインストールする
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
brew install node
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
または、[Node.js ウェブサイト](https://nodejs.org/) から直接 macOS インストーラー (`.pkg`) をダウンロードすることもできます。
|
|
28
|
-
|
|
29
|
-
**Linux**
|
|
19
|
+
システムにAIGNE CLIをグローバルにインストールするには、ターミナルで以下のコマンドを実行します。
|
|
30
20
|
|
|
31
|
-
|
|
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
|
-
|
|
25
|
+
このコマンドはパッケージをダウンロードしてインストールし、どのディレクトリからでも`aigne`コマンドを利用できるようにします。
|
|
41
26
|
|
|
42
|
-
|
|
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
|
-
|
|
29
|
+
インストールが完了したら、ドキュメンテーションツールのヘルプコマンドを実行して確認します。
|
|
50
30
|
|
|
51
|
-
```bash
|
|
52
|
-
|
|
53
|
-
npm --version
|
|
31
|
+
```bash title="インストールの確認"
|
|
32
|
+
aigne doc --help
|
|
54
33
|
```
|
|
55
34
|
|
|
56
|
-
|
|
35
|
+
このコマンドにより、利用可能なDocSmithのコマンドとオプションのリストが表示され、インストールが成功したことを確認できます。
|
|
57
36
|
|
|
58
|
-
|
|
37
|
+
## 最初のドキュメントを生成する
|
|
59
38
|
|
|
60
|
-
|
|
61
|
-
npm install -g @aigne/cli
|
|
62
|
-
```
|
|
39
|
+
以下の手順に従って、プロジェクトを分析し、完全なドキュメントセットを生成します。
|
|
63
40
|
|
|
64
|
-
|
|
41
|
+
### ステップ1:プロジェクトディレクトリに移動する
|
|
65
42
|
|
|
66
|
-
|
|
67
|
-
aigne doc --help
|
|
68
|
-
```
|
|
43
|
+
ターミナルを開き、`cd`コマンドを使用して、ドキュメントを作成したいプロジェクトのルートにカレントディレクトリを変更します。
|
|
69
44
|
|
|
70
|
-
|
|
45
|
+
```bash title="ディレクトリの変更" icon=mdi:folder-open
|
|
46
|
+
cd /path/to/your/project
|
|
47
|
+
```
|
|
71
48
|
|
|
72
|
-
|
|
49
|
+
### ステップ2:生成コマンドを実行する
|
|
73
50
|
|
|
74
|
-
|
|
51
|
+
主要な`generate`コマンドを実行します。この単一のコマンドが、ドキュメント作成プロセス全体を処理します。
|
|
75
52
|
|
|
76
|
-
```bash
|
|
53
|
+
```bash title="生成コマンドの実行"
|
|
77
54
|
aigne doc generate
|
|
78
55
|
```
|
|
79
56
|
|
|
80
|
-
|
|
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
|
-
|
|
63
|
+
セットアップが完了すると、DocSmithは自動的に以下のアクションを実行します。
|
|
95
64
|
|
|
96
|
-
|
|
65
|
+
1. **コードベースの分析**: ソースファイルをスキャンして、プロジェクトの構造とロジックを理解します。
|
|
66
|
+
2. **構造の計画**: セクションやトピックを含む、ドキュメントの論理的な計画を作成します。
|
|
67
|
+
3. **コンテンツの生成**: 分析と設定に基づいてドキュメントのコンテンツを記述します。
|
|
97
68
|
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
## ステップ4:出力の確認
|
|
101
|
-
|
|
102
|
-
生成プロセスが完了すると、ターミナルに確認メッセージが表示され、ドキュメントが正常に作成されたことが示されます。新しいドキュメントは、セットアップ時に指定した出力ディレクトリにあります。デフォルト設定を使用した場合は、`.aigne/doc-smith/docs` にあります。
|
|
103
|
-
|
|
104
|
-

|
|
69
|
+
完了すると確認メッセージが表示され、生成されたファイルはセットアップ時に指定された出力ディレクトリ(例:`.aigne/doc-smith/docs`)に配置されます。
|
|
105
70
|
|
|
106
71
|
## 次のステップ
|
|
107
72
|
|
|
108
|
-
|
|
73
|
+
最初のドキュメントセットの生成が成功しました。ドキュメントを管理し、強化するための一般的な次のステップは以下の通りです。
|
|
109
74
|
|
|
110
|
-
<x-cards>
|
|
111
|
-
<x-card data-title="
|
|
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="
|
|
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="
|
|
118
|
-
|
|
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>
|
package/docs/getting-started.md
CHANGED
|
@@ -1,120 +1,88 @@
|
|
|
1
1
|
# Getting Started
|
|
2
2
|
|
|
3
|
-
This guide provides a step-by-step
|
|
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
|
-
##
|
|
5
|
+
## Prerequisites
|
|
6
6
|
|
|
7
|
-
Before
|
|
7
|
+
Before proceeding with the installation, ensure your system meets the following requirements:
|
|
8
8
|
|
|
9
|
-
|
|
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
|
-
**
|
|
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
|
-
|
|
13
|
+
## Installation
|
|
16
14
|
|
|
17
|
-
The
|
|
15
|
+
The tool is distributed as part of the AIGNE command-line interface (CLI).
|
|
18
16
|
|
|
19
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
25
|
+
This command downloads and installs the package, making the `aigne` command available from any directory.
|
|
41
26
|
|
|
42
|
-
|
|
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,
|
|
29
|
+
After the installation is complete, verify it by running the help command for the documentation tool:
|
|
50
30
|
|
|
51
|
-
```bash
|
|
52
|
-
|
|
53
|
-
npm --version
|
|
31
|
+
```bash title="Verify Installation"
|
|
32
|
+
aigne doc --help
|
|
54
33
|
```
|
|
55
34
|
|
|
56
|
-
|
|
35
|
+
This command should display a list of available DocSmith commands and options, confirming that the installation was successful.
|
|
57
36
|
|
|
58
|
-
|
|
37
|
+
## Generating Your First Documents
|
|
59
38
|
|
|
60
|
-
|
|
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
|
-
|
|
41
|
+
### Step 1: Navigate to Your Project Directory
|
|
65
42
|
|
|
66
|
-
|
|
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
|
-
|
|
45
|
+
```bash title="Change Directory" icon=mdi:folder-open
|
|
46
|
+
cd /path/to/your/project
|
|
47
|
+
```
|
|
71
48
|
|
|
72
|
-
|
|
49
|
+
### Step 2: Run the Generate Command
|
|
73
50
|
|
|
74
|
-
|
|
51
|
+
Execute the primary `generate` command. This single command handles the entire documentation creation process.
|
|
75
52
|
|
|
76
|
-
```bash
|
|
53
|
+
```bash title="Run Generate Command"
|
|
77
54
|
aigne doc generate
|
|
78
55
|
```
|
|
79
56
|
|
|
80
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
63
|
+
Once the setup is complete, DocSmith will perform the following actions automatically:
|
|
95
64
|
|
|
96
|
-
|
|
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
|
-
|
|
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
|
-

|
|
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.
|
|
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="
|
|
112
|
-
|
|
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="
|
|
115
|
-
|
|
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="
|
|
118
|
-
|
|
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
|
-
|
|
3
|
+
本指南提供安裝 AIGNE DocSmith 並產生第一份文件的逐步流程。整個過程設計得簡單明瞭,可以快速完成。
|
|
4
4
|
|
|
5
|
-
##
|
|
5
|
+
## 前提條件
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
在進行安裝之前,請確保您的系統符合以下要求:
|
|
8
8
|
|
|
9
|
-
|
|
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
|
-
**
|
|
12
|
-
1. 從 [Node.js 下載頁面](https://nodejs.org/en/download) 下載 Windows 安裝程式 (`.msi`)。
|
|
13
|
-
2. 執行安裝程式並依照設定精靈中的提示操作。
|
|
11
|
+
* **API 金鑰**:開始時不需要任何 API 金鑰。預設情況下,DocSmith 使用 AIGNE Hub 服務進行 AI 驅動的生成,讓您無需直接設定即可使用各種大型語言模型。
|
|
14
12
|
|
|
15
|
-
|
|
13
|
+
## 安裝
|
|
16
14
|
|
|
17
|
-
|
|
15
|
+
此工具作為 AIGNE 命令列介面 (CLI) 的一部分進行分發。
|
|
18
16
|
|
|
19
|
-
|
|
20
|
-
# 如果尚未安裝 Homebrew,請先安裝
|
|
21
|
-
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
|
|
17
|
+
### 步驟 1:安裝 AIGNE CLI
|
|
22
18
|
|
|
23
|
-
|
|
24
|
-
brew install node
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
或者,您也可以直接從 [Node.js 網站](https://nodejs.org/) 下載 macOS 安裝程式 (`.pkg`)。
|
|
28
|
-
|
|
29
|
-
**Linux**
|
|
19
|
+
若要在您的系統上全域安裝 AIGNE CLI,請在終端機中執行以下指令:
|
|
30
20
|
|
|
31
|
-
|
|
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
|
-
|
|
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
|
-
|
|
29
|
+
安裝完成後,請執行文件工具的說明指令來進行驗證:
|
|
50
30
|
|
|
51
|
-
```bash
|
|
52
|
-
|
|
53
|
-
npm --version
|
|
31
|
+
```bash title="驗證安裝"
|
|
32
|
+
aigne doc --help
|
|
54
33
|
```
|
|
55
34
|
|
|
56
|
-
|
|
35
|
+
此指令應會顯示可用的 DocSmith 指令與選項列表,確認安裝成功。
|
|
57
36
|
|
|
58
|
-
|
|
37
|
+
## 產生您的第一份文件
|
|
59
38
|
|
|
60
|
-
|
|
61
|
-
npm install -g @aigne/cli
|
|
62
|
-
```
|
|
39
|
+
請依照以下步驟分析您的專案並產生一套完整的文件。
|
|
63
40
|
|
|
64
|
-
|
|
41
|
+
### 步驟 1:導覽至您的專案目錄
|
|
65
42
|
|
|
66
|
-
|
|
67
|
-
aigne doc --help
|
|
68
|
-
```
|
|
43
|
+
開啟您的終端機,並使用 `cd` 指令將目前目錄切換到您想要建立文件的專案根目錄。
|
|
69
44
|
|
|
70
|
-
|
|
45
|
+
```bash title="切換目錄" icon=mdi:folder-open
|
|
46
|
+
cd /path/to/your/project
|
|
47
|
+
```
|
|
71
48
|
|
|
72
|
-
|
|
49
|
+
### 步驟 2:執行產生指令
|
|
73
50
|
|
|
74
|
-
|
|
51
|
+
執行主要的 `generate` 指令。這個單一指令會處理整個文件建立過程。
|
|
75
52
|
|
|
76
|
-
```bash
|
|
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
|
-
|
|
63
|
+
設定完成後,DocSmith 將自動執行以下操作:
|
|
97
64
|
|
|
65
|
+
1. **分析程式碼庫**:掃描您的原始檔案以了解專案的結構和邏輯。
|
|
66
|
+
2. **規劃結構**:為文件建立一個邏輯計畫,包含章節和主題。
|
|
67
|
+
3. **產生內容**:根據分析和您的設定撰寫文件內容。
|
|
98
68
|
|
|
69
|
+
完成後,將會出現一則確認訊息,且產生的檔案將位於設定時指定的輸出目錄中(例如 `.aigne/doc-smith/docs`)。
|
|
99
70
|
|
|
100
|
-
##
|
|
71
|
+
## 接下來呢?
|
|
101
72
|
|
|
102
|
-
|
|
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="
|
|
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="
|
|
118
|
-
|
|
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>
|