This repository showcases the use of OpenAI's GPT-3.5 language model for generating documentation for code automatically. The generated documentation is then turned into a "doc as code" site for easy access and sharing.
To use this repository, you will need to have the following:
.env file in the
root directory and adding the following line, you can rename the example.env:OPENAI_API_KEY=<your-api-key>
cd ./MKAutoDocs/
pip install -r requirements.txt
python Auto_Doc.py
This will use the GPT-3.5 language model to generate documentation for
your codebase and output the generated documentation as Markdown files
in the configured docs directory.
For example, to use MkDocs, run the following command in the root directory to preview the site:
mkdocs serve
Or use MkDocs, to build a site:
mkdocs build
This will generate a static website in the site directory,
which you can host on a server or a service like GitHub Pages.
If you want to host on GitHub Pages. You can set up github actions to autodeploy your doc as code site mkdocs how to or deploy manually using:
mkdocs gh-deploy
If you want to contribute to this repository, please feel free to open a pull request or an issue. We welcome any feedback, suggestions, or improvements to the code.
This repository is licensed under the MIT License. See the
LICENSE file for more information.