A simple command-line interface Python project for generating documentation from Python code.
- Parses Python files to extract classes, functions, and methods.
- Generates Markdown documentation with summaries and code snippets.
- Supports configuration via
config.yaml. - Allows filtering for public methods and classes only.
- Opens the generated documentation file automatically (optional).
Install the required dependencies:
pip install -r .The backend for the cli can be found in the following repo: code_docgen_backend
Run the CLI to generate documentation:
mycli <path_to_python_project> --public-only --open-file<path_to_python_project>: Path to the Python project directory.--public-only: Only document public methods and classes (optional).--open-file: Open the generated documentation file after creation (optional).
You can customize the behavior of the CLI by editing the config.yaml file:
generation_prefix: "🚀 Generating documentation for repository: "
type_prefix: "✅ Completed Generating documentation for type: "
function_prefix: "✅ Completed Generating documentation for function: "
generation_suffix: "✅ Documentation generation completed successfully."
API_KEY: "your-api-key"
BACKEND_URL: "http://your-backend-url/api"
TAGS: ["python", "documentation"]To generate documentation for a project located in ./my_project, run:
mycli ./my_project --public-only --open-fileThis will create a generated_docs.md file in the specified directory.
This project is licensed under the MIT License. See the LICENSE file for details.