Skip to main content

Generate a README from your project files using Gemini Pro

Project description

Docufy: Automated README Generation with Gemini Pro

Docufy is a command-line tool designed to automatically generate comprehensive README files for your software projects using the power of Google's Gemini Pro model. It analyzes your project's source code and creates a well-structured README, saving you time and effort in documenting your work.

Installation

  1. Install the package:

    pip install docufy
    
  2. Set up your Gemini API key:

    You'll need a Google Gemini API key to use Docufy. You can provide it in one of two ways:

    • Using the --apikey flag when running Docufy.
    • Setting the GEMINI_API_KEY environment variable.

Usage

To generate a README for your project, run the following command:

docufy --path <project_path> --out <output_path> --apikey <your_api_key>
  • <project_path>: The path to your project's root directory.
  • <output_path>: The desired path for the generated README file (e.g., README.md). Defaults to README.md in the current directory if not provided.
  • <your_api_key>: Your Google Gemini API key.

Example:

docufy --path my_project --out README.md --apikey AIzaSy...

Optional Arguments:

  • --include <extensions>: Specify file extensions to include in the analysis (e.g., .py, .js). Defaults to .py. Use multiple --include flags to include multiple extensions.
  • --exclude <files/folders>: Specify files or folders to exclude from the analysis (e.g., __init__.py, tests/). Use multiple --exclude flags to exclude multiple files or folders.
  • --model <model_name>: Specify the Gemini model to use. Defaults to gemini-1.5-pro.

Features Overview

  • Automated README Generation: Generates a comprehensive README file based on your project's source code.
  • Gemini Pro Integration: Leverages the power of Google's Gemini Pro model for intelligent summarization and documentation.
  • Customizable Inclusion/Exclusion: Control which files and folders are included or excluded from the analysis.
  • .readmeignore Support: Uses a .readmeignore file (similar to .gitignore) to specify files and folders to exclude.
  • Clear and Concise Output: Generates a well-structured README in Markdown format.

File Structure Summary

  • docufy/generate_readme.py: Contains the core logic for generating the README file. This file handles file processing, summarization using Gemini Pro, and output formatting.
  • docufy/__init__.py: Defines the command-line interface using argparse and orchestrates the README generation process.

Configuration

The .readmeignore File

Docufy uses a .readmeignore file in your project's root directory to specify files and folders that should be excluded from the README generation process. The .readmeignore file follows the same syntax as .gitignore.

Example .readmeignore:

# Ignore dependency directories
node_modules/
.venv/

# Ignore log files
*.log

# Ignore test files
tests/

Docufy automatically creates a default .readmeignore file in your project's root directory if one doesn't exist. This file includes common exclusions like dependency directories, build outputs, and log files. You can customize this file to refine your exclusions.

Important Notes

  • Ensure your Gemini API key is properly configured.
  • The quality of the generated README depends on the clarity and structure of your source code.
  • Consider reviewing and editing the generated README to ensure accuracy and completeness.

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

docufy-1.1.0.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

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

docufy-1.1.0-py3-none-any.whl (6.0 kB view details)

Uploaded Python 3

File details

Details for the file docufy-1.1.0.tar.gz.

File metadata

  • Download URL: docufy-1.1.0.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for docufy-1.1.0.tar.gz
Algorithm Hash digest
SHA256 f13bd4bac1131ec024779736bc33280e16999b2c1a0f3969065969652ec8ded6
MD5 d50a4aeea1813e3b85074670fe5cfe87
BLAKE2b-256 e759fbb289a699cb75dea6e524a4b6ea882f84b702a0f4acdbc11908f4fbb8e0

See more details on using hashes here.

File details

Details for the file docufy-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: docufy-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 6.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.9

File hashes

Hashes for docufy-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4c7a6f6f19774c06e00a794fc68fb1a331e89e926602b4aac53d083e68e31fde
MD5 280dcb8966b792c4a258c18360d13ee7
BLAKE2b-256 17f953c698695358ca784911eb9bb8f89584e087f6d0abc00b80008c1e0d3d4c

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