@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.
Files changed (47) hide show
  1. package/.aigne/doc-smith/config.yaml +1 -1
  2. package/.aigne/doc-smith/media-description.yaml +91 -0
  3. package/.aigne/doc-smith/upload-cache.yaml +6 -69
  4. package/.release-please-manifest.json +1 -1
  5. package/CHANGELOG.md +12 -0
  6. package/agents/clear/choose-contents.mjs +14 -1
  7. package/agents/clear/clear-media-description.mjs +129 -0
  8. package/agents/clear/index.yaml +3 -1
  9. package/agents/evaluate/code-snippet.mjs +28 -24
  10. package/agents/evaluate/document-structure.yaml +0 -4
  11. package/agents/evaluate/document.yaml +1 -5
  12. package/agents/generate/index.yaml +1 -0
  13. package/agents/init/index.mjs +10 -0
  14. package/agents/media/batch-generate-media-description.yaml +44 -0
  15. package/agents/media/generate-media-description.yaml +47 -0
  16. package/agents/media/load-media-description.mjs +238 -0
  17. package/agents/update/index.yaml +1 -0
  18. package/agents/utils/load-sources.mjs +103 -53
  19. package/aigne.yaml +6 -0
  20. package/assets/report-template/report.html +34 -34
  21. package/docs/configuration-initial-setup.md +74 -55
  22. package/docs/configuration.ja.md +59 -86
  23. package/docs/configuration.md +59 -86
  24. package/docs/configuration.zh-TW.md +59 -86
  25. package/docs/configuration.zh.md +59 -86
  26. package/docs/getting-started.ja.md +43 -24
  27. package/docs/getting-started.md +29 -10
  28. package/docs/getting-started.zh-TW.md +42 -23
  29. package/docs/getting-started.zh.md +39 -20
  30. package/docs/guides-cleaning-up.md +19 -18
  31. package/docs/guides-evaluating-documents.md +70 -29
  32. package/docs/guides-generating-documentation.md +59 -121
  33. package/docs/guides-interactive-chat.md +34 -26
  34. package/docs/guides-managing-history.md +18 -13
  35. package/docs/guides-publishing-your-docs.md +40 -35
  36. package/docs/guides-translating-documentation.md +39 -34
  37. package/docs/guides-updating-documentation.md +11 -9
  38. package/docs/overview.md +2 -2
  39. package/docs/release-notes.md +60 -27
  40. package/package.json +2 -1
  41. package/prompts/evaluate/document-structure.md +6 -7
  42. package/prompts/evaluate/document.md +16 -25
  43. package/prompts/media/media-description/system-prompt.md +35 -0
  44. package/prompts/media/media-description/user-prompt.md +8 -0
  45. package/utils/constants/index.mjs +0 -107
  46. package/utils/file-utils.mjs +41 -0
  47. package/media.md +0 -19
@@ -1,151 +1,89 @@
1
1
  # Generating Documentation
2
2
 
3
- This guide provides a systematic procedure for creating a complete set of documentation from your project's source files. The process is initiated using the `aigne doc generate` command, which analyzes your codebase, proposes a logical structure, and then writes the content for each document.
4
-
5
- This command is the primary tool for the initial creation of your documentation. For modifying documents after they have been created, refer to the [Updating Documentation](./guides-updating-documentation.md) guide.
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
- ## Step-by-Step Process
7
+ ## The Generation Process
88
8
 
89
- To generate your documentation, navigate to the root directory of your project in your terminal and follow these steps.
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. Run the Generate Command
11
+ ### Step 1: Initiate Generation
92
12
 
93
- Execute the `generate` command to begin the process. The tool will start by analyzing your project's files and structure.
13
+ To begin, navigate to your project's root directory in your terminal and execute the core command.
94
14
 
95
- ```bash Basic Generation Command
15
+ ```bash title="Terminal" icon=lucide:terminal
96
16
  aigne doc generate
97
17
  ```
98
18
 
99
- You can also use the aliases `gen` or `g` for brevity.
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
- ### 2. Review the Documentation Structure
21
+ ![Generate Documentation Dialog](https://docsmith.aigne.io/image-bin/uploads/d409b85c2c7760778c18251e06d997d9.png)
102
22
 
103
- After the analysis is complete, the tool will display the proposed documentation structure and prompt you for review:
23
+ ### Step 2: Code Analysis and Structure Planning
104
24
 
105
- ```
106
- Would you like to optimize the documentation structure?
107
- No, looks good
108
- Yes, optimize the structure (e.g. rename 'Getting Started' to 'Quick Start', move 'API Reference' before 'Configuration')
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
+ ![Reviewing the Documentation Structure](https://docsmith.aigne.io/image-bin/uploads/c530510525d8041c304d9c0258169904.png)
34
+
35
+ Examples of feedback you can provide:
110
36
 
111
- - **No, looks good**: Select this option to approve the proposed structure and proceed directly to content generation.
112
- - **Yes, optimize the structure**: Select this option to modify the plan. The tool will then ask for your feedback in an interactive loop. You can provide instructions in plain text, such as:
113
- - `Add a new document 'Troubleshooting'`
114
- - `Remove the 'Legacy Features' document`
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
- After each piece of feedback, the AI will revise the structure, and you can review it again. Press Enter without typing any feedback to exit the loop and approve the final structure.
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
- ### 3. Content Generation
44
+ ### Step 4: Content Creation
120
45
 
121
- Once the documentation structure is approved, DocSmith will begin generating the detailed content for each document in the plan. This process runs automatically, and its duration depends on the size and complexity of your project.
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
- Upon completion, the generated files will be saved to the output directory specified in your configuration (e.g., `./docs`).
48
+ ### Step 5: Completion
124
49
 
125
- ## Command Parameters
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
- The `generate` command accepts several optional parameters to control its behavior.
52
+ ![Documentation Generated Successfully](https://docsmith.aigne.io/image-bin/uploads/19c72054cd662d51259e8f668571891e.png)
128
53
 
129
- | Parameter | Description | Example |
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
- ### Example: Forcing a Complete Rebuild
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
- If you want to discard all previously generated documents and create a new set based on the current state of your code, use the `--forceRegenerate` flag.
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
- ```bash Forcing Regeneration
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
- ## Summary
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
- The `generate` command orchestrates the entire process of creating your initial project documentation. It combines automated code analysis with an interactive review process to produce a structured and relevant set of documents.
85
+ ## Summary
146
86
 
147
- After your documents are generated, you may want to:
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
- - [Update Documentation](./guides-updating-documentation.md): Make changes to specific documents.
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 for generating, modifying, and managing your documentation. Instead of running individual commands, you can describe what you need to do, and the assistant will guide you through the process, calling on the appropriate tools to complete the task.
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 simplifies the documentation workflow by handling the underlying commands for you. It is the recommended method for most interactions with the tool.
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 terminal:
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 will launch the assistant, and you can begin typing your requests.
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 include:
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
- Create a complete documentation structure and initial content by analyzing your project's source files.
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
- Regenerate specific sections or entire documents based on your feedback or changes in the source code.
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
- Translate existing documentation into multiple languages to reach a broader audience.
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
- Assist with publishing your documentation and managing team-based workflows.
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
- Within the chat, you can state your goal in plain language (e.g., "update the getting started guide") or invoke specific commands. The assistant understands the following core commands, which correspond to its specialized skills:
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 user feedback. |
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
- Here is a sample conversation to illustrate how the interactive assistant works.
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
- > Hello, I need to create documentation for a new project.
66
+ > I need to create documentation for my project located in the 'src' folder.
60
67
 
61
68
  AI Assistant:
62
- Of course. To get started, I need to analyze your project structure. Could you please provide the path to your source code directory?
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
- > ./src
75
+ > yes
66
76
 
67
77
  AI Assistant:
68
- Thank you. I will now analyze the files in ./src to propose a documentation structure. This may take a few moments...
78
+ (The proposed documentation structure is displayed here for your review.)
69
79
  ...
70
- I have analyzed your project and created a proposed structure. Would you like to review it before I proceed with generating the content? (yes/no)
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
- > yes
83
+ > continue
74
84
 
75
85
  AI Assistant:
76
- (Displays the proposed documentation structure for review)
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 is a powerful tool for managing your documentation in a guided, conversational manner. It streamlines complex tasks by handling the necessary steps and commands for you.
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 more detailed walkthrough of a specific workflow, see the [Generating Documentation](./guides-generating-documentation.md) guide.
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 during updates, and understand the evolution of your documents over time. This guide provides instructions on how to access and interpret this history.
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, you can use the `history view` command. This command displays a compact, one-line summary for each entry, similar to a version control log.
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 terminal:
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
- The `history` command also supports two aliases for the `view` subcommand: `log` and `list`. The following commands are equivalent and will produce the same output:
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 formatted to provide key information about each update at a glance. Each line represents a single update entry.
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
- Here is a breakdown of the format:
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 entries, a specific date is shown. |
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 feedback or summary message that was provided when the update was made. |
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 useful for tracking progress and reviewing past changes.
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
- Once you have generated your documentation, the next step is to publish it online, making it accessible to your audience. This guide provides a systematic overview of the publishing process using the `aigne doc publish` command.
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 primary command for making your documentation live is `aigne doc publish`. This command uploads your generated files to a web service, where they can be viewed in a browser.
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 shorter aliases:
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 you run the publish command for the first time, you will be presented with an interactive prompt to select your preferred publishing platform.
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
- ## Publishing Options
22
+ ![Publish Documentation Dialog](../assets/screenshots/doc-publish.png)
23
23
 
24
- You have several options for where to host your documentation. The interactive prompt will guide you through the selection.
24
+ ## Publishing Destinations
25
25
 
26
- ### 1. DocSmith Cloud (Free Hosting)
26
+ The tool provides several destinations for hosting your documentation. The interactive setup will present the following choices.
27
27
 
28
- This option publishes your documentation to `docsmith.aigne.io`, a free hosting service provided by AIGNE.
28
+ ### Option 1: DocSmith Cloud
29
29
 
30
- - **Use Case:** Ideal for open-source projects, personal blogs, or any scenario where public accessibility is desired without the need for custom infrastructure.
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
- ### 2. Your Existing Website
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
- This option allows you to publish the documentation to a website that you already own and manage.
36
+ ### Option 2: Your Existing Website
37
37
 
38
- - **Use Case:** Best for integrating documentation directly into an existing company website, product site, or personal domain. This method requires you to run your own instance of Discuss Kit.
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
- ### 3. New Website (Paid Service)
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
- If you do not have an existing website, this service helps you set up a new, dedicated site for your documentation.
47
+ ### Option 3: New Website
48
48
 
49
- - **Use Case:** Suitable for creating a professional, standalone documentation portal with a custom domain and hosting managed for you.
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
- ## Direct Publishing
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
- For automated workflows, such as CI/CD pipelines, or after you have completed the initial setup, you can bypass the interactive prompt by specifying the application URL directly.
55
+ ## Automated Publishing
56
56
 
57
- Use the `--appUrl` flag followed by your website's URL.
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
- ```bash
60
- # Example for a custom documentation site
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 successfully publish to a specific URL (either by selecting an option in the prompt or by using the `--appUrl` flag), DocSmith saves this URL in your local configuration. On subsequent runs, it will automatically publish to the saved URL without asking again.
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 you encounter an error message containing "401" or "403," it indicates that your authentication token is invalid or has expired. This can happen if permissions have changed or if the token is old.
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, you can clear all stored configuration and credentials by running the `clear` command:
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 clearing the configuration, run `aigne doc publish` again. You will be guided through the authentication and setup process as if it were the first time.
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.