Skip to content

Commit

Permalink
‣ Improve readme-ai project documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
eli64s committed Sep 19, 2023
1 parent d6f373d commit 365ccb9
Show file tree
Hide file tree
Showing 3 changed files with 120 additions and 96 deletions.
7 changes: 4 additions & 3 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@ All notable changes to the *readme-ai* project will be documented in this file.

### 🧹 Chore

- Update README file with the following changes:
- Add [🔢 Configuration](https://github.com/eli64s/readme-ai/blob/main/README.md#-configuration) section to the README, which describes the configuration options available to the user.
- Update project roadmap and clean up prerequisites section for easier understanding and readability.
- Update README file to enhance project documentation.
- Add [Configuration](https://github.com/eli64s/readme-ai/blob/main/README.md#-configuration) section to provide context for customizing the tool.
- Simplify [Getting Started](https://github.com/eli64s/readme-ai/blob/main/README.md#-getting-started) section install and run instructions.
- Update [Roadmap](https://github.com/eli64s/readme-ai/blob/main/README.md#-roadmap) section with latest project goals.

---

Expand Down
207 changes: 115 additions & 92 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@

- [📖 Table of Contents](#-table-of-contents)
- [📍 Overview](#-overview)
- [🎯 *Motivation*](#-motivation)
- [⚠️ *Disclaimer*](#️-disclaimer)
- [👾 Demo](#-demo)
- [⚙️ Features](#️-features)
- [🤖 Demo](#-demo)
- [✨ Features](#-features)
- [🚀 Getting Started](#-getting-started)
- [✔️ Dependencies](#-dependencies)
- [📋 Dependencies](#-dependencies)
- [📂 Repository](#-repository)
- [🔐 OpenAI API](#-openai-api)
- [📦 Installation](#-installation)
- [🎮 Using *README-AI*](#-using-readme-ai)
- [🔑 OpenAI API](#-openai-api)
- [📦 Install](#-install)
- [🎮 Usage](#-usage)
- [🔡 Command-Line Arguments](#-command-line-arguments)
- [🛠 Configuration](#-configuration)
- [🪄 Running *README-AI*](#-running-readme-ai)
- [🧪 Running Tests](#-running-tests)
- [🔢 Configuration](#-configuration)
- [🛠 Future Development](#-future-development)
- [🛣 Roadmap](#-roadmap)
- [📒 Changelog](#-changelog)
- [🤝 Contributing](#-contributing)
- [📄 License](#-license)
Expand All @@ -55,33 +55,34 @@

## 📍 Overview

*README-AI* is a powerful, user-friendly command-line tool that generates extensive README markdown documents for your software and data projects. By providing a remote repository URL or path to your codebase, this tool generates documentation for your entire project, leveraging the capabilities of large language models and OpenAI's GPT APIs.
*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. *README-AI* is currently available as a Python library and Docker image.

#### 🎯 *Motivation*
**🎯 Motivation**

Simplifies the process of writing and maintaining high-quality project documentation. My aim for this project is to provide all skill levels a tool that improves their technical workflow, in an efficient and user-friendly manner. Ultimately, the goal of *README-AI* is to improve the adoption and usability of open-source projects, enabling everyone to better understand and use open-source tools.
#### ⚠️ *Disclaimer*
*README-AI* 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.

*README-AI* is currently under development and has an opinionated configuration and setup. While this tool 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. Ensure all content in your repository is free of sensitive information before executing.
**⚠️ Disclaimer**

Additionally, frequently monitor your API usage and costs by visiting the [OpenAI API Usage Dashboard](https://platform.openai.com/account/usage).
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. Additionally, ensure all content in your repository is free of sensitive information before executing, and remember to frequently monitor your API costs using the [OpenAI API Usage Dashboard.](https://platform.openai.com/account/usage)

---

## 👾 Demo
## 🤖 Demo

<a href="https://youtu.be/pl-VcVfGbbk">
<img src="https://raw.githubusercontent.com/eli64s/readme-ai/f0c5a038f63ae04b2d4452974676a92db42be8ce/examples/imgs/demo.png" alt="demo-video">
</a>

<!-- #### *🤖 Streamlit UI (experimental)*
<!--
### 🌊 Streamlit UI (experimental)
Try out *readme-ai* in your browser using this [link!](https://readme-ai.streamlit.app/)
> Try out the *readme-ai* app in your browser using this [link!](https://readme-ai.streamlit.app/)
-->

---

## ⚙️ Features
## Features

<h1 align="center">1.<br>👇<br><br>📑 Codebase Documentation</h1>
<table align="center">
Expand Down Expand Up @@ -217,23 +218,24 @@ Additionally, frequently monitor your API usage and costs by visiting the [OpenA

## 🚀 Getting Started

### ✔️ Dependencies
### 📋 Dependencies

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

Before you begin, ensure that you have the following prerequisites installed:
- *Python > 3.8*
- *Pip or Docker (recommended)*
- *OpenAI API paid account and api key (see setup instructions below)*
- *Python version 3.9 or higher*
- *Package manager (i.e. pip, conda, poetry) or Docker*
- *OpenAI API paid account and api key*

#### 📂 Repository

You'll need a URL link to your remote repository or the directory path to your local code repository. The following repository types are supported:
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
#### 🔑 OpenAI API

To use the *README-AI* app, you must create an OpenAI API account and generate an API key. The steps below outline this process:
An OpenAI API account and API key are needed to use *readme-ai*. The steps below outline this process:

<details closed><summary>OpenAI API User Guide</summary>

Expand All @@ -244,169 +246,189 @@ To use the *README-AI* app, you must create an OpenAI API account and generate a
5. Follow the instructions to create a new API key.
6. Copy the API key and keep it in a secure place.

</details>
<br>
**⚠️ Additional Notes**
- To maximize your experience using *readme-ai*, its recommended to set up a payment method with OpenAI.
- By doing so, you gain access to more powerful models like gpt-3.5-turbo.
- Without a payment method, your API usage will be restricted to the base gpt-3 models, potentially leading to less accurate README file generation and API exceptions occurring.
- The OpenAI API is **NOT** free and you will be charged for each request made, which can accumulate costs rapidly.
- Regularly monitor your API usage and costs by visiting the [OpenAI API Usage Dashboard.](https://platform.openai.com/account/usage)
- Also ensure your OpenAI account has sufficient credits to run the *readme-ai* application.
- README file generation should take under 1 minute. If *readme-ai* is running for longer than a few minutes, terminate the process immediately.

> **⚠️ Note**
>
> - To maximize your experience with README-AI, it is recommended to set up a payment method on OpenAI's website. By doing so, you gain access to more powerful language models like gpt-3.5-turbo. Without a payment method, your usage will be restricted to the base gpt-3 models. This limitation might lead to less precise README files or potential errors during the generation process.
>
> - When using a payment method, make sure you have sufficient credits to run the README-AI application. Additionally, remember to regularly monitor your API usage and costs by visiting the [OpenAI API Usage Dashboard](https://platform.openai.com/account/usage). Please note that this API is not free and you will be charged for each request made, which can accumulate rapidly.
>
> - The generation of the README.md file should take under 1 minute. If the program runs for more than a few minutes, terminate the process immediately.
</details>

---

### 📦 Installation
### 📦 Install

Use any of the following methods to install project dependencies.
*Using Pip*

Pip is the recommended installation method for most users. More details about the Python package can be found on [PyPI.](https://pypi.org/project/readmeai/)

> *Pip ([PyPI Package](https://pypi.org/project/readmeai/))* - recommended
```sh
pip install --upgrade readmeai
```

> *Docker ([Docker Hub](https://hub.docker.com/repository/docker/zeroxeli/readme-ai/general))*
*Using Docker*

Docker is recommended for users wanting to run *readme-ai* in a containerized environment. More details about the image can be found on [Docker Hub.](https://hub.docker.com/repository/docker/zeroxeli/readme-ai/general)

```sh
docker pull zeroxeli/readme-ai:latest
```

If you prefer to install the project dependencies locally, follow the steps below.

1. Clone the *readme-ai* repository to your machine.
<details><summary><i>Install Manually</i></summary>

1️⃣ Clone the readme-ai repository.
```sh
git clone https://github.com/eli64s/readme-ai
```

2. Navigate to the *readme-ai* directory.
2️⃣ Navigate to readme-ai directory.

```sh
cd readme-ai
```

3. Install the project dependencies using one of the following methods.

> *Bash*
3️⃣ Install dependencies using a method below.

*Using Bash*
```sh
bash setup/setup.sh
```

> *Conda*
*Using Conda*
```sh
conda create -n readmeai python=3.9 -y && \
conda activate readmeai && \
pip install -r requirements.txt
```

> *Poetry*
*Using Poetry*
```sh
poetry install
```

### 🎮 Using *README-AI*
</details>

---

### 🎮 Usage

Use the command-line to provide the OpenAI API key (if not already set) and specify an output path for your README file, along with the path to your local repository or remote code repository. You can also provide the output path in the [configuration file](./readmeai/conf/conf.toml)
#### 🔡 Command-Line Arguments

Command-Line Arguments:
To generate a *README.md* file, use the `readmeai` command in your terminal, along with the arguments below.

- `-k` or `--api-key`: Your OpenAI API key.
- `-o` or `--output`: The output path for your README.md file.
- `-r` or `--repository`: The URL or path to your code repository.
- `-t` or `--template`: The README template format to use. (coming soon!)
- `l` or `--language`: The language of text written in the README file (coming soon!)
| 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! |

Use any of the following methods to run the *readme-ai* CLI application.

> *Pip ([PyPI Package](https://pypi.org/project/readmeai/))* - recommended
#### 🛠 Configuration

To customize the README file generation process, you can modify the [configuration file](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/conf.toml). The file contains the following sections:

- [*api*](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/conf.toml#L2) - OpenAI language model API configuration settings.
- [*git*](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/conf.toml#L12) - Default git repository settings used if no repository is provided.
- [*paths*](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/conf.toml#L17) - Directory paths and files used by the *readme-ai* application.
- [*prompts*](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/conf.toml#L26) - Large language model prompts used to generate the README file.
- [*md*](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/conf.toml#L59) - Dynamic Markdown section code templates used to build the README file.

---

### 🪄 Running *README-AI*

*Using Pip*

```sh
# 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

# Or export your OpenAI API key as an environment variable
```
```sh
# 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
```

> *Docker ([Docker Hub](https://hub.docker.com/repository/docker/zeroxeli/readme-ai/general))*
*Using Docker*

```sh
# 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
```
```sh
# 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
```

> *Conda*
<details><summary><i>Run Manually</i></summary>

*Using Conda*
```sh
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
```

> *Poetry*
*Using Poetry*
```sh
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
```

</details>

---

### 🧪 Running Tests

Execute the following command to run the test suite.
Execute the test suite using command below.

```sh
bash scripts/test.sh
```

<p align="right">
<a href="#top"><b>🔝 Return </b></a>
</p>

---

## 🔢 Configuration

To customize the README file generation process, you can modify the [configuration file](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/conf.toml). The file contains the following sections:

- [*api*](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/conf.toml#L2) - OpenAI language model API configuration settings.
- [*git*](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/conf.toml#L12) - Default git repository settings used if no repository is provided.
- [*paths*](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/conf.toml#L17) - Directory paths and files used by the *readme-ai* application.
- [*prompts*](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/conf.toml#L26) - Large language model prompts used to generate the README file.
- [*md*](https://github.com/eli64s/readme-ai/blob/main/readmeai/conf/conf.toml#L59) - Dynamic Markdown section code templates used to build the README file.

---

## 🛠 Future Development
## 🛣 Roadmap

- [X] Distribute the *readme-ai* app as a Python library via [*PyPI*](https://pypi.org/project/readmeai/) and on [*Docker Hub*](https://hub.docker.com/repository/docker/zeroxeli/readme-ai/general).
- [ ] Integrate *readme-ai* with Streamlit to provide a user-friendly UI to generate README files.
- [X] Publish project as a Python library via PyPI and a Docker image on Docker Hub.
- [*PyPI - readmeai*](https://pypi.org/project/readmeai/)
- [*Docker Hub - readme-ai*](https://hub.docker.com/repository/docker/zeroxeli/readme-ai/general)
- [ ] 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).
- [ ] Create GitHub Actions script to automatically update your README file when new code is pushed.

---

## 📒 Changelog

[Changelog](./CHANGELOG.md)
[Changelog](https://github.com/eli64s/readme-ai/blob/main/CHANGELOG.md)

---

## 🤝 Contributing

[Contributing Guidelines](./CONTRIBUTING.md)
[Contributing Guidelines](https://github.com/eli64s/readme-ai/blob/main/CONTRIBUTING.md)

---

## 📄 License

[MIT](./LICENSE)
[MIT](https://github.com/eli64s/readme-ai/blob/main/LICENSE)

---

Expand All @@ -421,4 +443,5 @@ To customize the README file generation process, you can modify the [configurati
<a href="#top"><b>🔝 Return </b></a>
</p>


---
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "readmeai"
version = "0.3.030"
version = "0.3.032"
description = "🚀 Generate beautiful README files from the terminal. Powered by OpenAI's GPT LLMs 💫"
authors = ["Eli <[email protected]>"]
license = "MIT"
Expand Down

0 comments on commit 365ccb9

Please sign in to comment.