This project uses the Gemini API to automatically generate documentation for various types of projects. It intelligently determines the project type (backend, frontend, mobile) and formats the documentation accordingly.
-
Installation:
pip install -e .
-
Configuration: Configure your Gemini API key using the command:
python -m autodoc.config
Alternatively, you can set the
GEMINI_API_KEY
environment variable. -
Generating Documentation:
autodoc [output_file]
This will generate documentation in
README.md
by default. You can specify a different output file as shown. For detailed documentation including all file contents add the-v
flag :autodoc -v [output_file]
Additional guidance for the documentation can be added with the
--guidance
flag:autodoc --guidance "This is a python backend" "The main function is located in main.py" [output_file]
The generated documentation will include:
-
Project Overview: A brief summary of the project's purpose and functionality.
-
Core Technologies: Shields.io badges indicating the key technologies and frameworks used.
-
Specifics based on project type:
- Backend Projects: Important accessible routes, valid HTTP methods (GET, POST, etc.), required and optional parameters. Example cURL commands demonstrating usage.
- Frontend Projects: The UI framework used, a list of accessible pages, and frequently reused components.
- Mobile Apps: Installed packages, accessible screens, and any significant logic functions.
The generated documentation will be a comprehensive Markdown file suitable for inclusion in a project repository.