Skip to main content

Generate comprehensive README files for your project via LLM

Project description

Quill: README Generator

Quill is a command-line tool that uses LLMs to generate comprehensive README.md files for your projects. The README you're reading right now was generated using Quill!

Technologies Used

  • Python: The primary programming language.
  • Google Gemini: The large language model used for README generation.
  • Repopack: For efficient codebase packaging.
  • Rich: For enhanced console output and progress display.
  • Python-dotenv: For loading environment variables from a .env file.

Prerequisites

  • Python 3.9 or higher: Ensure you have a compatible Python version installed.
  • Google Cloud Platform Project and Gemini API Key: You need a GCP project and an active Gemini API key. Instructions on how to obtain one are available on the Google Cloud Platform documentation. See the Configuration section below for details on how to set this up.
  • pip: Python's package installer.

Installation

Standard Installation

You can install Quill directly from PyPI:

pip install quill

Development Installation

If you want to contribute or modify the code:

  1. Clone the repository:

    git clone https://github.com/usedispatch/Quill.git
    cd Quill
    
  2. Create a virtual environment (recommended):

    python3 -m venv venv
    source venv/bin/activate  # On Linux/macOS
    venv\Scripts\activate    # On Windows
    
  3. Install in development mode:

    pip install -e .
    

Configuration

Before using Quill, you need to set your Google Gemini API key. Create a .env file in your project directory and add your API key:

GEMINI_API_KEY=your_gemini_api_key

You can also optionally configure these environment variables for customization:

  • GEMINI_MODEL: The Gemini model to use (default: gemini-pro).
  • DEFAULT_OUTPUT: The default name for the Repopack output file (default: repopack-output.txt).
  • DEFAULT_README: The default name for the generated README file (default: README.md).
  • GENERATION_TEMPERATURE: Controls the randomness of the LLM's output (default: 0.7). A higher value (closer to 1.0) will result in more creative and unpredictable outputs; a lower value (closer to 0.0) will make the output more deterministic.
  • MAX_OUTPUT_TOKENS: Limits the maximum number of tokens in the generated README (default: 8192).

Usage

Quill is used via the command line. The basic usage is:

quill <directory> [-o <output_file>] [-r <readme_file>] [-k] [--temp-dir <temp_dir>] [--verbose]
  • <directory>: The path to the directory containing your project's codebase (defaults to the current directory).
  • -o <output_file>: Specifies the name of the Repopack output file (optional).
  • -r <readme_file>: Specifies the name of the generated README file (optional).
  • -k: Keeps the Repopack output file after generating the README (optional).
  • --temp-dir <temp_dir>: Specifies a custom temporary directory (optional).
  • --verbose: Enables verbose logging (optional).

Example:

To generate a README for the current directory, saving the Repopack output as my_repo.txt and the README as MY_README.md, run:

quill -o my_repo.txt -r MY_README.md

Project Structure

Quill/
├── src/
│   └── quill/
│       ├── logger/
│       │   ├── __init__.py
│       │   └── logger.py
│       ├── __init__.py
│       ├── __main__.py
│       ├── cli.py
│       ├── config.py
│       ├── generator.py
│       └── utils.py
├── tests/
│   └── conftest.py
├── LICENSE
├── pyproject.toml
├── requirements-dev.txt
├── requirements.txt
└── setup.py
  • src/: Contains the source code for the Quill application.
  • tests/: Contains unit tests for the project.
  • LICENSE: The project's license file.
  • pyproject.toml: Project metadata and build system configuration.
  • requirements.txt: Project dependencies.
  • requirements-dev.txt: Development dependencies.
  • setup.py: Setup script for installing the package.

Contributing Guidelines

(This section would be populated based on any contributing guidelines found within the codebase, but none were provided in the input.)

License Information

This project is licensed under the MIT License - see the LICENSE file for details.

Error Messages

  • ValueError: GEMINI_API_KEY not found in environment variables: This error occurs if the GEMINI_API_KEY environment variable is not set. Make sure you have configured your Gemini API key as described in the Configuration section.
  • RuntimeError: Repopack CLI not found...: This indicates that Repopack is not installed. Install it using pip install repopack.
  • RuntimeError: Repopack command failed...: This means there was an error running the Repopack command. Check the verbose logs for more details.
  • RuntimeError: Failed to generate README...: This indicates a failure in the LLM generation process. Check the verbose logs for potential errors and retry. There could be issues with your Gemini API Key or network connectivity.
  • FileNotFoundError: Directory not found... or FileNotFoundError: File not found...: Check if the specified directory or file exists.

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

quill-1.0.0.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

quill-1.0.0-py3-none-any.whl (11.0 kB view details)

Uploaded Python 3

File details

Details for the file quill-1.0.0.tar.gz.

File metadata

  • Download URL: quill-1.0.0.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.0 Darwin/23.5.0

File hashes

Hashes for quill-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b42a913fd7ff2d90ce5b1401bf1e97578e40363fc57753380041caf8ce85a8ea
MD5 09d5d61c1c07e28fde8ad3ad2155553c
BLAKE2b-256 469ed1fbb57f5be40297bc88873b89f8ca10956e843808a3a63ab096dd324aa6

See more details on using hashes here.

File details

Details for the file quill-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: quill-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 11.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.5 CPython/3.13.0 Darwin/23.5.0

File hashes

Hashes for quill-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 410beb71c39539e755991c0e1f599a963872a360a7271d86a7e03bb0b7865bec
MD5 2d8c42144e9cddb13b26380355e177d1
BLAKE2b-256 b6bea499375a81567bdb00b887ecc0b28adaa4ca424b7a29741cb0bc6588c3ae

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