AiDocument 0.0.20
dotnet tool install --global AiDocument --version 0.0.20
dotnet new tool-manifest # if you are setting up this repo dotnet tool install --local AiDocument --version 0.0.20
#tool dotnet:?package=AiDocument&version=0.0.20
nuke :add-package AiDocument --version 0.0.20
🧠🤖 AI-powered XML documentation generator for .NET projects. Leveraging OpenAI's API, this tool analyzes your code and generates meaningful, human-readable XML documentation with the help of advanced AI.
[!CAUTION] This project is in beta. It will reach General Availability (GA) with the first major release (v1.0).
What this tool does
dotnet-aidocument
analyzes your .NET project using Microsoft.CodeAnalysis.CSharp to identify undocumented members and uses the OpenAI API to generate meaningful XML documentation for them. This tool simplifies and accelerates the process of maintaining high-quality, human-readable documentation.
Requirements
Getting started
This repository is available on NuGet under the name AiDocument.
Installation
- Install the tool globally or for a specific project/repository.
dotnet tool install -g AiDocument
Move to the desired project folder.
Run the documentation generator.
dotnet-aidocument generate
Sequence of Execution
Here’s a flow diagram showing the sequence of execution of the prepare-commit-msg
hook and its integration with dotnet-aicommitmessage
to generate commit messages using the OpenAI API:
sequenceDiagram
participant User
participant Tool
participant OpenAI API
participant .NET Project
User->>Tool: Run command (generate)
Tool->>Project: Analyze undocumented members
Tool->>OpenAI API: Request documentation
OpenAI API-->>Tool: Return generated documentation
Tool-->>User: Output generated XML documentation
Commands
This tool provides several commands to simplify and customize the documentation process:
Command | Description |
---|---|
generate |
Analyzes the project and generates XML documentation for all undocumented members. |
set-settings |
Sets the OpenAI API key and configuration options. |
export-docs |
Exports the generated XML documentation to a specific folder or location. |
help |
Displays information about the available commands. |
version |
Displays the tool's version information. |
Example workflow
Here’s an example of how to use dotnet-aidocument
:
Analyze the codebase for undocumented members:
dotnet-aidocument generate
Export the generated XML documentation:
dotnet-aidocument export-docs -o ./docs/xml
Debug
To debug and review the OpenAI responses during the documentation generation, use the -D
flag. This will create a debug.json
file with the API response data.
Running in debug mode
dotnet-aidocument generate -D
Example output
Below is an example of the generated XML documentation:
/// <summary>
/// Calculates the sum of two integers.
/// </summary>
/// <param name="a">The first integer.</param>
/// <param name="b">The second integer.</param>
/// <returns>The sum of the two integers.</returns>
public int Add(int a, int b) { return a + b; }
Contributing
Contributions are welcome! Feel free to submit issues, feature requests, or pull requests to help improve dotnet-aidocument
.
License
This project is licensed under the MIT License.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net8.0 is compatible. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 is compatible. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
This package has no dependencies.
Version | Downloads | Last updated |
---|---|---|
0.0.20 | 52 | 2/17/2025 |
0.0.19 | 52 | 2/10/2025 |
0.0.18 | 54 | 2/3/2025 |
0.0.17 | 51 | 1/27/2025 |
0.0.16 | 41 | 1/27/2025 |
0.0.15 | 42 | 1/20/2025 |
0.0.14 | 39 | 1/20/2025 |
0.0.13 | 46 | 1/20/2025 |
0.0.12 | 32 | 1/13/2025 |
0.0.11 | 35 | 1/13/2025 |
0.0.10 | 32 | 1/13/2025 |
0.0.9 | 35 | 1/13/2025 |
0.0.8 | 34 | 1/13/2025 |
0.0.7 | 68 | 1/6/2025 |
0.0.6 | 61 | 1/6/2025 |
0.0.5 | 61 | 12/30/2024 |
0.0.4 | 64 | 12/30/2024 |
0.0.3 | 66 | 12/26/2024 |
0.0.2 | 69 | 12/9/2024 |
0.0.1 | 69 | 12/3/2024 |