@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,151 +1,89 @@
|
|
|
1
1
|
# Generating Documentation
|
|
2
2
|
|
|
3
|
-
This guide provides a
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
### The Generation Workflow
|
|
8
|
-
|
|
9
|
-
The `generate` command executes a sequence of automated steps to build your documentation. The process is designed to be interactive, allowing you to review and approve the proposed structure before content is written.
|
|
10
|
-
|
|
11
|
-
```d2
|
|
12
|
-
direction: down
|
|
13
|
-
|
|
14
|
-
start: {
|
|
15
|
-
label: "Start"
|
|
16
|
-
shape: oval
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
run_command: {
|
|
20
|
-
label: "Run 'aigne doc generate'"
|
|
21
|
-
shape: rectangle
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
check_config: {
|
|
25
|
-
label: "Configuration file exists?"
|
|
26
|
-
shape: diamond
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
interactive_setup: {
|
|
30
|
-
label: "Guide through interactive setup"
|
|
31
|
-
shape: rectangle
|
|
32
|
-
tooltip: "If .aigne/doc-smith/config.yaml is not found, an interactive setup is triggered."
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
propose_structure: {
|
|
36
|
-
label: "Analyze project and propose document structure"
|
|
37
|
-
shape: rectangle
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
review_structure: {
|
|
41
|
-
label: "User reviews the proposed structure"
|
|
42
|
-
shape: rectangle
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
user_approve: {
|
|
46
|
-
label: "Approve structure?"
|
|
47
|
-
shape: diamond
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
provide_feedback: {
|
|
51
|
-
label: "Provide feedback to refine structure"
|
|
52
|
-
shape: rectangle
|
|
53
|
-
tooltip: "User can request changes like renaming, adding, or removing sections."
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
generate_content: {
|
|
57
|
-
label: "Generate content for all documents"
|
|
58
|
-
shape: rectangle
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
end: {
|
|
62
|
-
label: "End"
|
|
63
|
-
shape: oval
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
start -> run_command
|
|
67
|
-
run_command -> check_config
|
|
68
|
-
check_config -> interactive_setup: {
|
|
69
|
-
label: "No"
|
|
70
|
-
}
|
|
71
|
-
interactive_setup -> propose_structure
|
|
72
|
-
check_config -> propose_structure: {
|
|
73
|
-
label: "Yes"
|
|
74
|
-
}
|
|
75
|
-
propose_structure -> review_structure
|
|
76
|
-
review_structure -> user_approve
|
|
77
|
-
user_approve -> provide_feedback: {
|
|
78
|
-
label: "No"
|
|
79
|
-
}
|
|
80
|
-
provide_feedback -> review_structure
|
|
81
|
-
user_approve -> generate_content: {
|
|
82
|
-
label: "Yes"
|
|
83
|
-
}
|
|
84
|
-
generate_content -> end
|
|
85
|
-
```
|
|
3
|
+
This guide provides a step-by-step process for creating a new set of documentation for your project using the `generate` command. This is the primary command used to transform your source files into a structured set of documents from start to finish.
|
|
4
|
+
|
|
5
|
+
The generation process is designed to be systematic and interactive, ensuring the final output meets your project's specific needs.
|
|
86
6
|
|
|
87
|
-
##
|
|
7
|
+
## The Generation Process
|
|
88
8
|
|
|
89
|
-
|
|
9
|
+
When you run `aigne doc generate`, the tool follows a methodical process to create your documentation. Here is a breakdown of each step.
|
|
90
10
|
|
|
91
|
-
### 1
|
|
11
|
+
### Step 1: Initiate Generation
|
|
92
12
|
|
|
93
|
-
|
|
13
|
+
To begin, navigate to your project's root directory in your terminal and execute the core command.
|
|
94
14
|
|
|
95
|
-
```bash
|
|
15
|
+
```bash title="Terminal" icon=lucide:terminal
|
|
96
16
|
aigne doc generate
|
|
97
17
|
```
|
|
98
18
|
|
|
99
|
-
|
|
19
|
+
This single command initiates the entire documentation creation workflow. If it's your first time running the command, you will be guided through an interactive setup process.
|
|
100
20
|
|
|
101
|
-
|
|
21
|
+

|
|
102
22
|
|
|
103
|
-
|
|
23
|
+
### Step 2: Code Analysis and Structure Planning
|
|
104
24
|
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
25
|
+
First, DocSmith analyzes your source code to understand its structure, components, and relationships. Based on this analysis, it proposes an initial documentation structure. This plan organizes topics into a logical hierarchy, which may include sections like "Getting Started," "Guides," and "API Reference," tailored to your project's content.
|
|
26
|
+
|
|
27
|
+
### Step 3: Interactive Structure Review
|
|
28
|
+
|
|
29
|
+
After the initial structure is planned, you will be prompted to review it in the terminal. This is a critical step that allows you to refine the organization of your documents before the content is written.
|
|
30
|
+
|
|
31
|
+
You can either approve the structure as is or provide feedback in plain language to make changes.
|
|
32
|
+
|
|
33
|
+

|
|
34
|
+
|
|
35
|
+
Examples of feedback you can provide:
|
|
110
36
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
- `Move 'Installation' to the top of the structure`
|
|
37
|
+
* Rename a section (e.g., change "Getting Started" to "Quick Start").
|
|
38
|
+
* Add a new document for "Troubleshooting."
|
|
39
|
+
* Remove a document that is not needed.
|
|
40
|
+
* Reorder sections to place "API Reference" before "Configuration."
|
|
116
41
|
|
|
117
|
-
|
|
42
|
+
The tool will apply your feedback and present the updated structure for another review. You can repeat this process until the structure aligns perfectly with your requirements.
|
|
118
43
|
|
|
119
|
-
###
|
|
44
|
+
### Step 4: Content Creation
|
|
120
45
|
|
|
121
|
-
Once the
|
|
46
|
+
Once you approve the final structure, DocSmith proceeds to generate the detailed content for each document. It reads the relevant source files and writes clear explanations, code examples, and descriptions for every planned section. This process is executed for all documents in the approved plan.
|
|
122
47
|
|
|
123
|
-
|
|
48
|
+
### Step 5: Completion
|
|
124
49
|
|
|
125
|
-
|
|
50
|
+
When the process is complete, you will see a confirmation message indicating that the documentation has been generated successfully. The output files will be located in the directory specified in your configuration (the default is `./docs`).
|
|
126
51
|
|
|
127
|
-
|
|
52
|
+

|
|
128
53
|
|
|
129
|
-
|
|
130
|
-
|---|---|---|
|
|
131
|
-
| `--forceRegenerate` | Rebuilds all documentation from scratch, ignoring any existing structure or content. This is useful when you want a complete reset. | `aigne doc generate --forceRegenerate` |
|
|
132
|
-
| `--feedback` | Provides initial text-based instructions to guide the AI during the structure generation phase, before the interactive review starts. | `aigne doc generate --feedback "Add more API examples"` |
|
|
133
|
-
| `--glossary` | Specifies a glossary file (e.g., `glossary.md`) to ensure consistent use of terminology throughout the documentation. | `aigne doc generate --glossary @/path/to/glossary.md` |
|
|
54
|
+
## Command Options
|
|
134
55
|
|
|
135
|
-
|
|
56
|
+
You can modify the behavior of the `generate` command by using optional flags. These flags provide more control over the generation process.
|
|
136
57
|
|
|
137
|
-
|
|
58
|
+
| Option | Description |
|
|
59
|
+
| --------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
|
60
|
+
| `--forceRegenerate` | Re-creates all documentation from scratch, ignoring any existing files. This is useful if you have made significant changes to your source code or want a completely fresh build. |
|
|
61
|
+
| `--glossary <path>` | Specifies a glossary file (e.g., `--glossary @glossary.md`). This ensures that technical terms are defined and used consistently across all generated documents. |
|
|
138
62
|
|
|
139
|
-
|
|
63
|
+
### Example Usage
|
|
64
|
+
|
|
65
|
+
Here are a few examples demonstrating how to use the command with its options.
|
|
66
|
+
|
|
67
|
+
**Standard Generation**
|
|
68
|
+
This is the most common use case for creating your initial set of documents.
|
|
69
|
+
```bash title="Terminal" icon=lucide:terminal
|
|
70
|
+
aigne doc generate
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Forced Regeneration**
|
|
74
|
+
Use this command when you need to discard all existing documents and rebuild them entirely.
|
|
75
|
+
```bash title="Terminal" icon=lucide:terminal
|
|
140
76
|
aigne doc generate --forceRegenerate
|
|
141
77
|
```
|
|
142
78
|
|
|
143
|
-
|
|
79
|
+
**Using a Glossary**
|
|
80
|
+
To ensure consistent terminology, provide a path to your glossary file.
|
|
81
|
+
```bash title="Terminal" icon=lucide:terminal
|
|
82
|
+
aigne doc generate --glossary @./glossary.md
|
|
83
|
+
```
|
|
144
84
|
|
|
145
|
-
|
|
85
|
+
## Summary
|
|
146
86
|
|
|
147
|
-
|
|
87
|
+
You have now learned the complete process for generating documentation from your project's source files. This workflow involves initiating the command, interactively reviewing the proposed structure, and allowing the tool to write the content.
|
|
148
88
|
|
|
149
|
-
|
|
150
|
-
- [Translate Documentation](./guides-translating-documentation.md): Translate your content into other languages.
|
|
151
|
-
- [Publishing Your Docs](./guides-publishing-your-docs.md): Make your documentation available online.
|
|
89
|
+
After generating your documents, your next steps might be to [update specific documents](./guides-updating-documentation.md) with new information or [publish your documentation](./guides-publishing-your-docs.md) to make it accessible to your audience.
|
|
@@ -1,85 +1,93 @@
|
|
|
1
1
|
# Interactive Chat
|
|
2
2
|
|
|
3
|
-
The interactive chat assistant provides a conversational interface
|
|
3
|
+
The interactive chat assistant provides a conversational command-line interface to manage all aspects of your documentation lifecycle. It interprets natural language instructions to execute commands for document generation, updates, translation, and publishing.
|
|
4
4
|
|
|
5
|
-
This approach
|
|
5
|
+
This guided approach removes the need to memorize individual commands and options, making it the recommended method for most documentation tasks.
|
|
6
6
|
|
|
7
7
|
## Starting the Chat Assistant
|
|
8
8
|
|
|
9
|
-
To begin an interactive session, run the `chat` command from your
|
|
9
|
+
To begin an interactive session, run the `chat` command from your project's root directory:
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
12
|
aigndoc chat
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
This
|
|
15
|
+
This command launches the assistant and presents a prompt, ready to receive your instructions.
|
|
16
16
|
|
|
17
17
|
## Core Capabilities
|
|
18
18
|
|
|
19
|
-
The chat assistant is designed to handle the entire documentation lifecycle. Its primary functions
|
|
19
|
+
The chat assistant is designed to handle the entire documentation lifecycle. Its primary functions are based on a set of specialized skills that it can call upon based on your requests.
|
|
20
20
|
|
|
21
21
|
<x-cards data-columns="2">
|
|
22
22
|
<x-card data-title="Generate Documentation" data-icon="lucide:file-plus-2">
|
|
23
|
-
|
|
23
|
+
Creates a complete documentation structure and initial content by analyzing your project's source code.
|
|
24
24
|
</x-card>
|
|
25
25
|
<x-card data-title="Refine and Update" data-icon="lucide:edit">
|
|
26
|
-
|
|
26
|
+
Modifies specific documents or sections based on your feedback or changes in the source code.
|
|
27
27
|
</x-card>
|
|
28
28
|
<x-card data-title="Translate Content" data-icon="lucide:languages">
|
|
29
|
-
|
|
29
|
+
Translates existing documentation into multiple supported languages to reach a broader audience.
|
|
30
30
|
</x-card>
|
|
31
31
|
<x-card data-title="Publish and Manage" data-icon="lucide:upload-cloud">
|
|
32
|
-
|
|
32
|
+
Guides you through the process of publishing your documentation and managing team-based workflows.
|
|
33
33
|
</x-card>
|
|
34
34
|
</x-cards>
|
|
35
35
|
|
|
36
|
+
## How It Works
|
|
37
|
+
|
|
38
|
+
You can interact with the assistant in two ways:
|
|
39
|
+
|
|
40
|
+
1. **Natural Language**: State your goal in plain language. The assistant will identify the correct tool and guide you through the required steps. For example, you can type "update the getting started guide" or "I need to translate my docs into French."
|
|
41
|
+
2. **Direct Commands**: You can also type specific commands directly into the chat prompt to initiate a task, such as `generate` or `publish`.
|
|
42
|
+
|
|
36
43
|
## Available Commands
|
|
37
44
|
|
|
38
|
-
|
|
45
|
+
The assistant understands a set of core commands that correspond to its specialized skills. You can invoke these directly or describe a task that requires them.
|
|
39
46
|
|
|
40
47
|
| Command | Description |
|
|
41
48
|
| :--- | :--- |
|
|
42
|
-
| `generate` | Starts the process of creating a new documentation structure from source files. |
|
|
43
|
-
| `update` | Modifies existing documents based on code changes or
|
|
49
|
+
| `generate` | Starts the process of creating a new documentation structure from your source files. |
|
|
50
|
+
| `update` | Modifies existing documents based on code changes or specific feedback. |
|
|
44
51
|
| `translate` | Translates documents into one or more supported languages. |
|
|
45
52
|
| `publish` | Publishes your documentation to make it accessible online. |
|
|
46
53
|
| `init` | Guides you through creating an initial configuration file for the project. |
|
|
47
54
|
| `clear` | Removes generated files, configurations, and cached data. |
|
|
48
55
|
| `prefs` | Manages your saved preferences for document generation. |
|
|
49
56
|
| `evaluate` | Assesses the quality and completeness of your generated documentation. |
|
|
50
|
-
| `history` | Shows the history of updates made to your documentation. |
|
|
51
|
-
| `exit` | Ends the interactive chat session. |
|
|
57
|
+
| `history` | Shows the history of updates and changes made to your documentation. |
|
|
58
|
+
| `exit` | Ends the interactive chat session and returns you to the standard terminal prompt. |
|
|
52
59
|
|
|
53
60
|
## Example Interaction
|
|
54
61
|
|
|
55
|
-
|
|
62
|
+
The following is a sample conversation that illustrates a typical workflow for generating new documentation.
|
|
56
63
|
|
|
57
64
|
```text
|
|
58
65
|
You:
|
|
59
|
-
>
|
|
66
|
+
> I need to create documentation for my project located in the 'src' folder.
|
|
60
67
|
|
|
61
68
|
AI Assistant:
|
|
62
|
-
|
|
69
|
+
Understood. I will start the documentation generation process for the directory './src'.
|
|
70
|
+
First, I will analyze your project to propose a documentation structure. This may take a few moments...
|
|
71
|
+
...
|
|
72
|
+
Analysis complete. I have created a proposed structure. Would you like to review it before I generate the content? (yes/no)
|
|
63
73
|
|
|
64
74
|
You:
|
|
65
|
-
>
|
|
75
|
+
> yes
|
|
66
76
|
|
|
67
77
|
AI Assistant:
|
|
68
|
-
|
|
78
|
+
(The proposed documentation structure is displayed here for your review.)
|
|
69
79
|
...
|
|
70
|
-
|
|
80
|
+
You can request changes, such as 'add a guide for API authentication' or 'remove the section on deployment'. If the structure is correct, simply type 'continue'.
|
|
71
81
|
|
|
72
82
|
You:
|
|
73
|
-
>
|
|
83
|
+
> continue
|
|
74
84
|
|
|
75
85
|
AI Assistant:
|
|
76
|
-
|
|
77
|
-
...
|
|
78
|
-
Please review the structure above. You can ask me to add, remove, or modify any part of it.
|
|
86
|
+
Great. I will now proceed with generating the content for each document. This may take a few minutes.
|
|
79
87
|
```
|
|
80
88
|
|
|
81
89
|
## Summary
|
|
82
90
|
|
|
83
|
-
The interactive chat assistant
|
|
91
|
+
The interactive chat assistant provides a structured and guided method for managing your documentation. It consolidates the functionality of all individual commands into a single, conversational interface, ensuring a consistent and straightforward workflow.
|
|
84
92
|
|
|
85
|
-
For a
|
|
93
|
+
For a detailed walkthrough of creating your first set of documents using the assistant, please proceed to the [Generating Documentation](./guides-generating-documentation.md) guide.
|
|
@@ -1,41 +1,46 @@
|
|
|
1
1
|
# Managing History
|
|
2
2
|
|
|
3
|
-
AIGNE DocSmith maintains a chronological log of all updates made to your documentation. This feature allows you to track changes, review feedback provided
|
|
3
|
+
AIGNE DocSmith maintains a chronological log of all updates made to your documentation. This feature allows you to track changes, review the feedback provided for each update, and observe the evolution of your documents over time. This guide provides instructions on how to access and interpret this history log.
|
|
4
4
|
|
|
5
5
|
## Viewing Update History
|
|
6
6
|
|
|
7
|
-
To view the log of all documentation updates,
|
|
7
|
+
To view the log of all documentation updates, use the `history view` command. This command displays a compact, one-line summary for each entry, formatted similarly to a version control log.
|
|
8
8
|
|
|
9
|
-
Execute the following command in your
|
|
9
|
+
Execute the following command in your project's root directory:
|
|
10
10
|
|
|
11
11
|
```bash Viewing History icon=material-symbols:history
|
|
12
12
|
aigne history view
|
|
13
13
|
```
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
For convenience, the `history` command also supports two aliases for the `view` subcommand: `log` and `list`. The following commands are equivalent to the one above and will produce the identical output:
|
|
16
16
|
|
|
17
17
|
```bash
|
|
18
18
|
aigne history log
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
```bash
|
|
19
22
|
aigne history list
|
|
20
23
|
```
|
|
21
24
|
|
|
25
|
+
If no updates have been made yet, the tool will display the message: `No update history found`.
|
|
26
|
+
|
|
22
27
|
### Understanding the History Output
|
|
23
28
|
|
|
24
|
-
The output of the `history view` command is
|
|
29
|
+
The output of the `history view` command is structured to provide key information about each update in a concise format. Each line in the log represents a single update event.
|
|
25
30
|
|
|
26
|
-
|
|
31
|
+
The format is composed of the following components:
|
|
27
32
|
|
|
28
33
|
| Component | Description |
|
|
29
34
|
| :--- | :--- |
|
|
30
|
-
| **Short Hash** | An 8-character unique identifier generated from the timestamp of the update. |
|
|
31
|
-
| **Date** | A relative timestamp indicating when the update occurred (e.g., "5 minutes ago", "2 days ago"). For older
|
|
35
|
+
| **Short Hash** | An 8-character unique identifier generated from the timestamp of the update. This hash is deterministic, meaning the same timestamp will always produce the same hash. |
|
|
36
|
+
| **Date** | A relative timestamp indicating when the update occurred (e.g., "5 minutes ago", "2 days ago"). For entries older than one week, a specific date is shown. |
|
|
32
37
|
| **Operation** | The type of action performed, such as `generate_document` or `update_document_detail`. |
|
|
33
|
-
| **Document Path** | The path of the specific document that was modified, if the operation targeted a single file. This is enclosed in parentheses. |
|
|
34
|
-
| **Feedback** | The
|
|
38
|
+
| **Document Path** | The path of the specific document that was modified, if the operation targeted a single file. This is enclosed in parentheses for clarity. |
|
|
39
|
+
| **Feedback** | The summary message or feedback that was provided when the update was executed. |
|
|
35
40
|
|
|
36
|
-
### Example
|
|
41
|
+
### Example Output
|
|
37
42
|
|
|
38
|
-
Below is a sample output from running the `aigne history view` command.
|
|
43
|
+
Below is a sample output from running the `aigne history view` command. This example illustrates how different operations are recorded in the log.
|
|
39
44
|
|
|
40
45
|
```bash
|
|
41
46
|
📜 Update History
|
|
@@ -45,4 +50,4 @@ a3b1c9d2 1 day ago update_document_detail (/overview): Refined the introduction
|
|
|
45
50
|
f8d2e0c3 3 days ago generate_document (/guides/managing-history): Initial generation of the history management guide.
|
|
46
51
|
```
|
|
47
52
|
|
|
48
|
-
This log provides a clear and orderly record of your documentation's modification history, which is
|
|
53
|
+
This log provides a clear and orderly record of your documentation's modification history, which is an effective tool for tracking progress and reviewing past changes.
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
# Publishing Your Docs
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
After generating your documentation, the next step is to make it accessible online. This guide provides a systematic procedure for publishing your documentation using the `aigne doc publish` command.
|
|
4
4
|
|
|
5
5
|
## The Publish Command
|
|
6
6
|
|
|
7
|
-
The
|
|
7
|
+
The `aigne doc publish` command uploads your generated documentation files to a web service, making them available to your audience through a web browser.
|
|
8
8
|
|
|
9
|
-
You can execute the command using its full name or its
|
|
9
|
+
You can execute the command using its full name or one of its aliases for convenience.
|
|
10
10
|
|
|
11
|
-
```bash
|
|
11
|
+
```bash Command Execution icon=lucide:terminal
|
|
12
12
|
# Full command
|
|
13
13
|
aigne doc publish
|
|
14
14
|
|
|
@@ -17,62 +17,67 @@ aigne doc pub
|
|
|
17
17
|
aigne doc p
|
|
18
18
|
```
|
|
19
19
|
|
|
20
|
-
When
|
|
20
|
+
When this command is run for the first time, it initiates an interactive prompt to guide you through selecting a publishing platform.
|
|
21
21
|
|
|
22
|
-
|
|
22
|
+

|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
## Publishing Destinations
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
The tool provides several destinations for hosting your documentation. The interactive setup will present the following choices.
|
|
27
27
|
|
|
28
|
-
|
|
28
|
+
### Option 1: DocSmith Cloud
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
- **Cost:** Free.
|
|
32
|
-
- **Outcome:** Your documents will be publicly available at a URL provided upon successful publication.
|
|
30
|
+
This option publishes your documentation to `docsmith.aigne.io`, a free hosting service.
|
|
33
31
|
|
|
34
|
-
|
|
32
|
+
* **Intended Use**: This method is suitable for open-source projects or any documentation that is intended for public access.
|
|
33
|
+
* **Cost**: Free.
|
|
34
|
+
* **Outcome**: Your documentation will be publicly available at a URL provided after the publishing process is complete.
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
### Option 2: Your Existing Website
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
- **Cost:** Requires your own hosting infrastructure.
|
|
40
|
-
- **Setup:**
|
|
41
|
-
1. Select this option in the prompt.
|
|
42
|
-
2. You will be asked to enter the URL of your website (e.g., `https://docs.your-company.com`).
|
|
43
|
-
3. To set up your own documentation website, you can get a Discuss Kit instance from the official store: [https://www.web3kit.rocks/discuss-kit](https://www.web3kit.rocks/discuss-kit).
|
|
38
|
+
This option allows you to publish documentation to a website you already own and manage. It requires you to operate your own instance of Discuss Kit.
|
|
44
39
|
|
|
45
|
-
|
|
40
|
+
* **Intended Use**: This is for integrating documentation directly into an existing company website, product portal, or personal domain.
|
|
41
|
+
* **Requirements**: You must have your own hosting infrastructure and a running instance of Discuss Kit.
|
|
42
|
+
* **Procedure**:
|
|
43
|
+
1. Select the "Your existing website" option from the interactive prompt.
|
|
44
|
+
2. When prompted, enter the full URL of your website (e.g., `https://docs.your-company.com`).
|
|
45
|
+
3. To set up your own documentation website, you can obtain a Discuss Kit instance from the official store: [https://www.web3kit.rocks/discuss-kit](https://www.web3kit.rocks/discuss-kit). Discuss Kit is a non-open-source service that provides the necessary backend for hosting.
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
### Option 3: New Website
|
|
48
48
|
|
|
49
|
-
|
|
50
|
-
- **Cost:** This is a paid service.
|
|
51
|
-
- **Process:** The command will guide you through the necessary steps to deploy and configure a new Discuss Kit instance. If you have started this process before, you will also see an option to resume your previous setup.
|
|
49
|
+
This option assists you in setting up a new, dedicated website for your documentation.
|
|
52
50
|
|
|
53
|
-
|
|
51
|
+
* **Intended Use**: This is for users who need a standalone documentation portal but do not have an existing website.
|
|
52
|
+
* **Cost**: This is a paid service.
|
|
53
|
+
* **Procedure**: The command-line interface will guide you through the process of deploying and configuring a new Discuss Kit instance. If you have previously started this process, an option to resume the setup will also be available.
|
|
54
54
|
|
|
55
|
-
|
|
55
|
+
## Automated Publishing
|
|
56
56
|
|
|
57
|
-
|
|
57
|
+
For automated environments, such as a Continuous Integration/Continuous Deployment (CI/CD) pipeline, you can bypass the interactive prompt by specifying the destination URL directly.
|
|
58
58
|
|
|
59
|
-
|
|
60
|
-
|
|
59
|
+
Use the `--appUrl` flag with the command to define the publishing target.
|
|
60
|
+
|
|
61
|
+
```bash Direct Publishing Example icon=lucide:terminal
|
|
61
62
|
aigne doc publish --appUrl https://docs.your-company.com
|
|
62
63
|
```
|
|
63
64
|
|
|
64
|
-
Once you
|
|
65
|
+
Once you publish to a specific URL for the first time (either through the interactive prompt or the `--appUrl` flag), the tool saves this URL to your local configuration file. Subsequent executions of `aigne doc publish` will automatically use the saved URL, streamlining the update process.
|
|
65
66
|
|
|
66
67
|
## Troubleshooting
|
|
67
68
|
|
|
68
69
|
### Authorization Errors
|
|
69
70
|
|
|
70
|
-
If
|
|
71
|
+
If the publishing process fails with an error message that includes "401" or "403," it signifies an issue with your authentication token. The token may be invalid, expired, or lack the required permissions.
|
|
71
72
|
|
|
72
|
-
To resolve this,
|
|
73
|
+
To resolve this, reset your local configuration and credentials by running the `clear` command:
|
|
73
74
|
|
|
74
|
-
```bash
|
|
75
|
+
```bash Clear Configuration icon=lucide:terminal
|
|
75
76
|
aigne doc clear
|
|
76
77
|
```
|
|
77
78
|
|
|
78
|
-
After
|
|
79
|
+
After the command completes, run `aigne doc publish` again. You will be prompted to re-authenticate and configure your publishing destination.
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
After successfully publishing your documentation, you may need to update it as your project evolves. For instructions on this process, please see the [Updating Documentation](./guides-updating-documentation.md) guide.
|