Skip to main content

๐Ÿš€ Automated README file generation in the terminal. Powered by GPT ๐Ÿช

Project description


README-AI

โ—ฆ Generate beautiful and informative README files

โ—ฆ Developed with OpenAI's GPT language model APIs


Markdown OpenAI Python pytest Docker actions

pypi-version pypi-python-version pypi-downloads github-license

๐Ÿ“– Table of Contents


๐Ÿ“ Overview

README-AI is a powerful command-line tool that generates robust README.md files for your software and data projects. By simply providing a remote repository URL or path to your codebase, this tool auto-generates documentation for your entire project, leveraging the capabilities OpenAI's GPT language model APIs.

๐ŸŽฏ Motivation

Simplifies the process of writing and maintaining high-quality project documentation, enhancing developer productivity and workflow. The ultimate goal of readme-ai is to improve the adoption and usability of open-source software, enabling all skill levels to better understand complex codebases and easily use open-source tools.

โš ๏ธ Disclaimer

This project is currently under development and has an opinionated configuration. While readme-ai provides an excellent starting point for documentation, its important to review all text generated by the OpenAI API to ensure it accurately represents your codebase.


๐Ÿค– Demos

โ–บ Command-Line Interface


cli-demo

โ˜ Streamlit Community Cloud


streamlit-demo


๐Ÿ“ฆ Features

1.
๐Ÿ‘‡

๐Ÿ“ƒ Codebase Documentation

โ—ฆ Code Summaries

  • Code summaries are generated for each file using OpenAI's GPT engine
  • The file column text is hyperlinked to its GitHub.
code-summaries

โ’‰
๐Ÿ‘‡

๐ŸŽ– Badges

โ—ฆ Introduction and Project Badges

  • The OpenAI API is prompted to create a 1-sentence phrase describing your project.
  • Project dependencies and metadata are visualized using Shields.io badges.
badges

โ’Š
๐Ÿ‘‡

๐Ÿงš Prompted Text Generation

โ—ฆ Overview and Features Table

  • These sections are generated using detailed prompts passed to the LLM, embedded with project metadata.
feature-table

โ’‹
๐Ÿ‘‡

๐ŸŒฒ Repository Tree

repository-tree

โ’Œ
๐Ÿ‘‡

๐Ÿ”ง Dynamic Usage Instructions

โ—ฆ Install, Run, and Test

  • Creates instructions for installation, running, and testing your project.
  • Instructions are dynamically generated based on the language of your codebase.
usage-instructions

โ’
๐Ÿ‘‡

๐Ÿ“ Contributing Guidelines & more!

contributing-guide

โ’Ž
๐Ÿ‘‡

๐Ÿช„ Example Output Files

Output File Repository Languages
1๏ธโƒฃ readme-python.md readme-ai Python
2๏ธโƒฃ readme-typescript.md chatgpt-app-react-typescript TypeScript, React
3๏ธโƒฃ readme-javascript.md assistant-chat-gpt-javascript JavaScript, React
4๏ธโƒฃ readme-kotlin.md file.io-android-client Kotlin, Java, Android
5๏ธโƒฃ readme-rust-c.md rust-c-app C, Rust
6๏ธโƒฃ readme-go.md go-docker-app Go
7๏ธโƒฃ readme-java.md java-minimal-todo Java
8๏ธโƒฃ readme-fastapi-redis.md async-ml-inference Python, FastAPI, Redis
9๏ธโƒฃ readme-mlops.md mlops-course Python, Jupyter
๐Ÿ”Ÿ readme-pyflink.md flink-flow PyFlink

โ’
๐Ÿ‘‡

๐ŸŽจ Custom README templates coming soon!

โ€ฃ Developing a feature that allows users to select from a variety of README formats and styles.

โ€ฃ Templates will focus on use-cases such as web development, data, machine learning, minimal, and more!

๐Ÿ” Return


๐Ÿ‘ฉโ€๐Ÿ’ป Usage

Dependencies

Please ensure you have the following dependencies installed on your system:

  • Python version 3.9 or higher
  • Package manager (i.e. pip, conda, poetry) or Docker
  • OpenAI API paid account and API key

Repository

A remote repository URL or path to your local project's directory is needed to use readme-ai. The following repository types are currently supported:

  • GitHub
  • GitLab
  • File System

OpenAI API

An OpenAI API account and API key are needed to use readme-ai. The steps below outline this process:

๐Ÿ” OpenAI API - Setup Instructions
  1. Go to the OpenAI website.
  2. Click the "Sign up for free" button.
  3. Fill out the registration form with your information and agree to the terms of service.
  4. Once logged in, click on the "API" tab.
  5. Follow the instructions to create a new API key.
  6. Copy the API key and keep it in a secure place.
โš ๏ธ OpenAI API - Cautionary Guidelines
  1. Review Sensitive Information: Before running the application, ensure that all content in your repository is free of sensitive information. Please note that readme-ai does not filter out sensitive data from the README file, and it does not modify any files in your repository.

  2. API Usage Costs: The OpenAI API is not free, and you will be charged for each request made. Costs can accumulate rapidly, so it's essential to be aware of your usage. You can monitor your API usage and associated costs by visiting the OpenAI API Usage Dashboard.

  3. Paid Account Recommended: Setting up a paid account with OpenAI is highly recommended to avoid potential issues. Without a payment method on file, your API usage will be restricted to base GPT-3 models. This limitation can result in less accurate README file generation and may lead to API errors due to request limits.

  4. Runtime Considerations: README file generation typically takes less than a minute. If the process exceeds a few minutes (e.g., 3 minutes), it's advisable to terminate readme-ai to prevent extended processing times.


๐Ÿ›  Installation

Using Pip

Pip is the recommended installation method for most users.

pip install --upgrade readmeai

Using Docker

Docker is recommended for users wanting to run the application in a containerized environment.

docker pull zeroxeli/readme-ai:latest

Manually Install

1๏ธโƒฃ Clone the readme-ai repository.

git clone https://github.com/eli64s/readme-ai

2๏ธโƒฃ Navigate to readme-ai directory.

cd readme-ai

3๏ธโƒฃ Install dependencies using a method below.

Using Bash

bash setup/setup.sh

Using Conda

conda create -n readmeai python=3.9 -y && \
conda activate readmeai && \
pip install -r requirements.txt

Using Poetry

poetry install

โš™๏ธ Configuration


Command-Line Arguments

To generate a README.md file, use the readmeai command in your terminal, along with the arguments below.

Short Flag Long Flag Description Status
-k --api-key Your OpenAI API key. Required
-o --output The output path for your README.md file. Required
-r --repository The URL or path to your code repository. Required
-t --template The README template format to use. (coming soon!) Coming Soon!
-l --language The language of text written in the README file. Coming Soon!

Custom Settings

To customize the README file generation process, you can modify the following sections of the configuration file:

  • api - OpenAI language model API configuration settings.
  • git - Default git repository settings used if no repository is provided.
  • paths - Directory paths and files used by the readme-ai application.
  • prompts - Large language model prompts used to generate the README file.
  • md - Dynamic Markdown section code templates used to build the README file.

๐Ÿš€ Running README-AI


Using Streamlit

Use the app directly in your browser via Streamlit Community Cloud.


Using Pip

# Option 1: Run readmeai command with all required command-line arguments.
readmeai --api-key "YOUR_API_KEY" --output readme-ai.md --repository https://github.com/eli64s/readme-ai
# Option 2: Run readmeai command with OpenAI API key set as environment variable.
export OPENAI_API_KEY="YOUR_API_KEY"
readmeai -o readme-ai.md -r https://github.com/eli64s/readme-ai

Using Docker

# Option 1: Run Docker container with all required command-line arguments.
docker run -it \
-e OPENAI_API_KEY="YOUR_API_KEY" \
-v "$(pwd)":/app zeroxeli/readme-ai:latest \
readmeai -o readme-ai.md -r https://github.com/eli64s/readme-ai
# Option 2: Run Docker container with OpenAI API key set as environment variable.
export OPENAI_API_KEY="YOUR_API_KEY"
docker run -it \
-e OPENAI_API_KEY=$OPENAI_API_KEY \
-v "$(pwd)":/app zeroxeli/readme-ai:latest \
readmeai -o readme-ai.md -r https://github.com/eli64s/readme-ai

Manually Run

Using Conda

conda activate readmeai
export OPENAI_API_KEY="YOUR_API_KEY"
python readmeai/main.py -o readme-ai.md -r https://github.com/eli64s/readme-ai

Using Poetry

poetry shell
export OPENAI_API_KEY="YOUR_API_KEY"
poetry run python readmeai/main.py -o readme-ai.md -r https://github.com/eli64s/readme-ai

๐Ÿงช Tests

Execute the test suite using the command below.

bash scripts/test.sh

๐Ÿ›ฃ Roadmap

  • Publish project as a Python library via PyPI and a Docker image on Docker Hub.
  • Integrate and deploy app with Streamlit to provide a simple user-interface for using the tool.
  • Develop GitHub Actions script to automatically update the README file when new code is pushed.
  • Design README output templates for a variety of use-cases (i.e. data, web-dev, minimal, etc.)
  • Add support for generating README files in any language (i.e. CN, ES, FR, JA, KO, RU).

๐Ÿ“’ Changelog

Changelog


๐Ÿค Contributing

Contributing Guidelines


๐Ÿ“„ License

MIT


๐Ÿ‘ Acknowledgments

Badges

๐Ÿ” Return


Project details


Release history Release notifications | RSS feed

Download files

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

Source Distribution

readmeai-0.3.57.tar.gz (87.8 kB view hashes)

Uploaded Source

Built Distribution

readmeai-0.3.57-py3-none-any.whl (85.8 kB view hashes)

Uploaded Python 3

Supported by

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