/PydocsAI

Automated README template generator that creates code documentation, badges, file tree, and more! Powered by OpenAI's language model API 🚀

Primary LanguagePython

PydocsAI

Automate README creation, code documentation, and more!

🏎💨 Powered by OpenAI's language model API and the tools listed below.

Markdown OpenAI Python Pandas HTML5 Anaconda Bash


🌊 Overview

PydocsAI is a Python package that provides an automated way to generate a README.md file and document your codebase. This package leverages OpenAI's GPT Davinci model to translate a given codebase to natural language, producing a structured project README template that includes codebase metadata and documentation.

The project is still under development and is opinionated in its setup, but it can be used as a starting point for projects that require documentation. The current version of PyDocsAI is limited to codebases written in Python.

🔮 Feautres

Badges

Analyzes your project's dependencies and requirements, displaying them as badges in the README's header section.

Example - Badges

header

Code Summary

This project leverages the base GPT Davinci model from OpenAI to translate a repository of Python code to documentaion.

Example - Docoumentation

body

Repository Tree

Creates a GitHub directory tree to display in your readme.

Example - Tree

body

README.md Creation

See this example markdown file that was generated by running this project for this repository.


🚀 Getting Started

GitHub Repository

Copy the url of your project's GitHub repository and update the code below from conf/conf.toml below.

# GitHub
[github]
url = "<INSERT-GITHUB-REPO>"

OpenAI API Key

OpenAI API Setup

Follow the steps below to create an OpenAI API key.

  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.

You can now use the OpenAI API key to integrate with OpenAI's language models in your projects.

Copy your your OpenAI API key and update the code below from scripts/run_main.sh below.

#!/bin/bash
set +x

export OPENAI_API_KEY="<OPENAI-API-KEY>"

🎯 Usage

# 1. Clone GitHub repository.
git clone https://github.com/eli64s/PydocsAI && cd PydocsAI

# 2. Setup conda environment.
make conda

# 3. Run PydocsAI.
bash scripts/run_model.sh

📍 Roadmap

  • [] Add compatability for additional file types.
  • [] Extend capabilities beyond code documentation.
  • [] Implement different configuration file templates.

🧩 Contributing

  • Contributing is welcomed, lets build!

🙏 Acknowledgments