Skip to main content

This readme is generated by command:

gpt-readme --demand let user know gpt-readme is a shell command. use gpt-readme for the commandline usage, not the python call. You must detail commandline usage of gpt-readme. Detail the installation process. Let user know they can install gpt-readme from pip, or from source github repo gusye1234/gpt-readme --agree 

gpt-readme

Introduction

The gpt-readme module is designed to automate the generation of well-formatted README files for code repositories using OpenAI's language model. It streamlines the documentation process for developers by summarizing directories and files based on specified parameters, making it easier to create comprehensive documentation for projects.

Get Started

To install gpt-readme, you can choose one of the following methods:

Installation via pip

You can install gpt-readme directly from PyPI using pip:

pip install gpt-readme

Installation from Source

Alternatively, you can clone the GitHub repository and install it from source:

git clone https://github.com/gusye1234/gpt-readme.git
cd gpt-readme
pip install .

Command-line Usage

Once installed, you can use the gpt-readme command to generate a README file. Here is the command format:

gpt-readme --path <repo_path> --exts <extensions> --max_dir_entity <number> --language <lang> --model <model> --demand <requirements> --out <output_path> --cache <0 or 1> --agree

Options:

  • --path: Path to the repository.
  • --exts: File extensions to include.
  • --max_dir_entity: Maximum number of directory entities to process.
  • --language: Programming language of the code.
  • --model: OpenAI model to use.
  • --demand: Specific requirements for the README.
  • --out: Output path for the generated README.
  • --cache: Enable or disable caching (0 or 1).
  • --agree: Agreement flag for terms.

Feature

The gpt-readme module supports the following main features:

  • Directory Summarization: Recursively summarizes directories and files, providing an overview of the project structure.
  • File Summarization: Generates summaries for individual code files, enhancing the understanding of code functionality.
  • Customizable Output: Allows users to specify various parameters to tailor the README generation to their needs.

Use Cases

  • Developers looking to quickly generate documentation for their projects.
  • Teams needing consistent and structured README files for better collaboration.
  • Open-source contributors wanting to enhance the visibility and usability of their repositories.

Implementation

The gpt-readme module consists of several files, each serving distinct purposes:

  • setup.py: Configures the package and its dependencies.
  • gpt_readme/__init__.py: Initializes the package and imports the main functionality.
  • gpt_readme/__main__.py: Entry point for executing the application.
  • gpt_readme/constants.py: Contains constants and configurations for the module.
  • gpt_readme/dir_summary.py: Implements directory summarization using OpenAI's API.
  • gpt_readme/file_summary.py: Summarizes individual code files and caches results.
  • gpt_readme/llm.py: Provides an asynchronous interface to OpenAI's API.
  • gpt_readme/main.py: Implements the command-line tool for generating README files.
  • gpt_readme/prompts.py: Contains prompt templates for structured documentation.
  • gpt_readme/utils.py: Offers utility functions for various operations.

Acknowledgement

The gpt-readme module utilizes several third-party libraries:

  • openai: For interacting with OpenAI's API to generate text completions.
  • asyncio: For handling asynchronous operations within the module.
  • argparse: For parsing command-line arguments.
  • rich: For enhanced console output, providing a better user experience.

Thank you for using gpt-readme to simplify your README generation process!

Metadata

Release files for gpt-readme 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gpt-readme 0.1.2
File Size Uploaded
gpt_readme-0.1.2.tar.gz 12.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gpt-readme 0.1.2
File Interpreter ABI Platform
gpt_readme-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 24.6 kB

Release files / gpt_readme-0.1.2.tar.gz

Download URL gpt_readme-0.1.2.tar.gz
Size 12.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1c18163db792c4c11569a1ed4a939d18a8c641600561bfb4a2721ff3c9ceba2a
BLAKE2b-256 checksum
How to use checksums
2681ae6da2b9f05675962136156f4378330b24e49c072dcdb8d8b6157f888436
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / gpt_readme-0.1.2-py3-none-any.whl

Download URL gpt_readme-0.1.2-py3-none-any.whl
Size 12.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
461b0e8b415cdfec2d0ed586584d3de3775385dfb4e142dba46c9ead45e14662
BLAKE2b-256 checksum
How to use checksums
9136215951a83b942b0d71825237fb32be2a1cd07f9a693e05df12634868c745
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

1 release file

0.1.0

1 release file

0.0.5

1 release file

0.0.4

1 release file

0.0.3

1 release file

0.0.2

1 release file

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page