Skip to main content

A tool for generating documentation

Project description

Docgenie: Generate Documentation from Code

Docgenie is a command-line tool that leverages the power of large language models (LLMs) to automatically generate comprehensive documentation for your code.

Getting Started

  1. Installation:

    pip install docgenie
    
  2. Initialize Configuration:

    docgenie init
    

    The init command guides you through setting up a docgenie.config.json file. This file stores your project's configuration, including:

    • Root directory: The base directory of your project.
    • Agent: The LLM model to use for generating documentation.
    • Rules: A set of rules defining the types of documentation to generate, the specific directories to process, and other customization options.
  3. Generate Documentation:

    docgenie build
    

    This command uses the information in docgenie.config.json to analyze your code and generate documentation in the specified output formats.

Usage Examples

Basic Usage

The following example demonstrates generating general documentation for a project within the my-project directory:

# Initialize configuration
docgenie init

# Modify docgenie.config.json to include:
# - Root directory: my-project
# - Agent: gemini-1.5-flash
# - Rules:
#   - type: general
#     dir: .
#     include: *.py, *.js, *.ts
#     exclude: *test.py, *test.js
#     output: docs
#     depth: 3
#     format: markdown

# Build documentation
docgenie build

Advanced Usage

Docgenie offers various options for customizing your documentation generation:

  • Document Types: Generate different types of documentation like README files, API specifications, model explanations, and general overview documentation.
  • File Inclusion and Exclusion: Control which files are included or excluded from documentation generation using patterns.
  • Output Formats: Choose output formats like Markdown, HTML, and plain text.
  • Custom Prompts: Add additional prompts to guide the LLM for specific documentation needs.

Code Structure

The Docgenie project has the following code structure:

  • docgenie: The main package containing core functionality:
    • cli: Command-line interface for interacting with Docgenie.
    • main: Main execution logic for documentation generation.
    • model: Abstraction layer for different LLM models.
    • prompts: Prompt templates for generating various types of documentation.
    • utils: Helper functions for file handling, pattern matching, and language-specific import analysis.
  • docgenie.config.json: Configuration file for project settings.

Contributing

Contributions to Docgenie are welcome! Please feel free to open issues or submit pull requests.

License

Docgenie is licensed under the MIT License.

The documentation is generated using AI by docgenie. If you found any issues, please report them to the team.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

docgenie-0.0.1.tar.gz (8.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

docgenie-0.0.1-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file docgenie-0.0.1.tar.gz.

File metadata

  • Download URL: docgenie-0.0.1.tar.gz
  • Upload date:
  • Size: 8.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.0 Windows/10

File hashes

Hashes for docgenie-0.0.1.tar.gz
Algorithm Hash digest
SHA256 c0927a2806bb97ba8f050fd67e60262dda7a78d7d7be0ba4af5025c98c4fbd2d
MD5 b417d2a3df3a6b191f70110bb0ef00a1
BLAKE2b-256 a933e01d08dec278e64913477fdaedff4053526eb80e1cabba6e54f2bc1ae8bf

See more details on using hashes here.

File details

Details for the file docgenie-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: docgenie-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 11.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.9.0 Windows/10

File hashes

Hashes for docgenie-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e1e0b61197e388c0e7589df2f4882f512c0fd283a109c58cbe03d24642e896b8
MD5 e725c5a1ac85402d6d6873d759a05234
BLAKE2b-256 936767853e9961b2e84264ccd933c17e4e51a1c7a918483a988cd42d0071f040

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page