# README-AI

<img src="https://img.icons8.com/?size=512&id=55494&format=png" width="100" /><img src="https://img.icons8.com/?size=512&id=kTuxVYRKeKEY&format=png" width="100" />

Auto-generate informative `README.md` files using GPT language model APIs 👾

[![GitHub Workflow Status (with event)](https://img.shields.io/github/actions/workflow/status/eli64s/readme-ai/.github%2Fworkflows%2Frelease-pipeline.yml?logo=GitHub&label=cicd&color=c125ff)](https://github.com/eli64s/readme-ai/actions)
[![Codecov](https://img.shields.io/codecov/c/github/eli64s/readme-ai?logo=codecov&color=c125ff)](https://app.codecov.io/gh/eli64s/readme-ai)
[![PyPI version](https://img.shields.io/pypi/v/readmeai?color=c125ff)](https://badge.fury.io/py/readmeai)
[![PyPI python versions](https://img.shields.io/pypi/pyversions/readmeai.svg?color=c125ff)](https://pypi.python.org/pypi/readmeai/)
![License: MIT](https://img.shields.io/github/license/eli64s/readme-ai?color=c125ff)

---

## 🔗 Quick Links
- [README-AI](#readme-ai)
  - [🔗 Quick Links](#-quick-links)
  - [📍 Overview](#-overview)
  - [🤖 Demo](#-demo)
  - [🔮 Features](#-features)
    - [Customizable Header](#customizable-header)
  - [🚀 Getting Started](#-getting-started)
    - [⚙️ Installation](#️-installation)
    - [👩‍💻 Running *README-AI*](#-running-readme-ai)
    - [🧪 Tests](#-tests)
    - [🧩 Configuration](#-configuration)
      - [CLI Options](#cli-options)
      - [Custom Settings](#custom-settings)
  - [🛠 Project Roadmap](#-project-roadmap)
  - [📒 Changelog](#-changelog)
  - [🤝 Contributing](#-contributing)
  - [📄 License](#-license)
  - [👏 Acknowledgments](#-acknowledgments)

---

## 📍 Overview

***Objective***

Developer tool that automatically generates detailed `README.md` files using GPT language model APIs. Simply provide a repository URL or local directory path to your code, and readme-ai handles the rest!

***Motivation***

Streamlines documentation creation and maintenance, enhancing developer productivity. <em>README-AI</em> aims to enable all skill levels, across all domains, to better understand, use, and contribute to open-source projects.<br>

> [!IMPORTANT]
>
> <em>README-AI</em> is currently under development with an opinionated configuration and setup. It is vital to review all text generated by the LLM APIs to ensure it accurately represents your project.

---

## 🤖 Demo

Standard CLI usage from the terminal with an OpenAI API key.

[readmeai-cli-demo](https://github.com/eli64s/readme-ai/assets/43382407/ff5b3db8-a400-4031-86fc-a28f8a0469e2)

You can also run the readme-ai without an API key, passing the `--offline` flag to the CLI.

[readmeai-cli-offline-demo](https://github.com/eli64s/readme-ai/assets/43382407/a508ab17-6fcf-4de5-9239-fc4055d11d62)

> [!TIP]
>
> Offline mode is useful for quickly generating a boilerplate README without incurring API costs. See an example README file generated in offline mode [here](https://github.com/eli64s/readme-ai/blob/main/examples/markdown/readme-offline.md).

<!--
**Streamlit Web App**: Run <em>readme-ai</em> directly in your browser with Streamlit, no installation required!

[readmeai-streamlit-demo](https://github.com/eli64s/readme-ai/blob/main/examples/markdown/readme-offline.md)
-->

---

## 🔮 Features

README-AI is built with flexibility in mind, allowing users to customize various aspects of the README file using CLI options and configuration settings. Currently, 4 pieces of information used in the output file are generated using GPT language model APIs.

- Project slogan phrase that is displayed in the header.
- Codebase file summaries displayed in markdown tables.
- Overview section that highlights the project's value proposition.
- Features table that provides technical details about the codebase.

All other content is extracted from processing and analyzing repository metadata, configuration settings, and templates.

### Customizable Header

The header section is built using repository metadata and includes the following details.
- **Badges**: Svg icons representing project metadata, provided by [shields.io](https://shields.io/) and [skill-icons](https://github.com/tandpfun/skill-icons).
- **Project Logo**: Select a project logo from the default set, or provide your own link.
- **Project Slogan**: Catch phrase describing your project generated using OpenAI's API.
- **Table of Contents/Quick Links**: Links to the different sections of the README file.

Examples of different header configurations generated by readme-ai are shown below.

<table>
  <tr>
    <td align="center"><img src="https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/images/header-default.png" alt="default" width="400"/><br><code>--badges flat --image blue</code></td>
    <td align="center"><img src="https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/images/header-offline.png" alt="offline" width="400"/><br><code>--badges for-the-badge --image black --offline</code></td>
  </tr>
  <tr>
    <td align="center"><img src="https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/images/header-java.png" alt="java" width="400"/><br><code>--align left --badges flat-square --image black</code></td>
    <td align="center"><img src="https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/images/header-kotlin.png" alt="kotlin" width="400"/><br><code>--badges plastic --image blue</code></td>
  </tr>
  <tr>
    <td align="center"><img src="https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/images/header-skills-light.png" alt="skill-icons" width="400"/><br><code>--badges skills-light --image blue</code></td>
    <td align="center"><img src="https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/images/header-gradient.png" alt="gradient" width="400"/><br><code>--badges flat-square --image gradient</code></td>
  </tr>
</table>

For more information about the header section, see the [Configuration](#-configuration) section below.
<br><br>
<details closed><summary>📑 Codebase Documentation</summary>
<br>
<table>
    <tr>
        <td><b>Repository Structure</b><br><p>A directory tree structure is generated using pure Python (<a href="https://github.com/eli64s/readme-ai/blob/main/readmeai/markdown/tree.py">readmeai.markdown.tree.py</a>) and visualized in your README.</p></td>
    </tr>
    <tr>
        <td align="center"><img src="https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/images/code-directory-tree.png" alt="tree" width="700" /></td>
    </tr>
    <tr>
        <td style="padding-top:20px;">Codebase Summaries</b>
        <br><p>File summaries are generated using OpenAI's API, grouped by directory, and inserted into markdown tables.</p></td>
    </tr>
    <tr>
        <td align="center"><img src="https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/images/code-summary-table.png" alt="summaries" width="700" /></td>
    </tr>
</table>
</details>

<details closed><summary>🧩 Overview & Features Table</summary>
<br>
The overview and features table sections are generated using OpenAI's API and markdown templates. Prompts are embedded with your repository's metadata to generate content that is relevant to your project.
<br><br>
<table>
    <tr>
        <td><b>Overview</b><br><p>High-level introduction of the repository, focused on the project's value proposition and use-case, rather than technical aspects.</p></td>
    </tr>
    <tr>
        <td ><img src="https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/images/overview.png" alt="overview" width="700" /></td>
    </tr>
    <tr>
        <td style="padding-top:20px;"><b>Features Table</b><br><p>Detailed overview of the technical components of the codebase, including the architecture, dependencies, testing, and more.</p></td>
    </tr>
    <tr>
        <td><img src="https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/images/features-table.png" alt="features-table" width="700" /></td>
    </tr>
</table>
</details>

<details closed><summary>🚀 Dynamic Getting Started Instructions</summary>
<br>
<table>
    <tr>
        <td><b>Getting Started</b><br><p>This tool generates instructions for installing, running, and testing your project. These steps are created by identifying the dependencies and languages used in the codebase, and referring to our <a href="https://github.com/eli64s/readme-ai/blob/main/readmeai/settings/language_setup.toml">language_setup.toml</a> configuration file.</p></td>
    </tr>
    <tr>
        <td><img src="https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/images/getting-started.png" alt="getting-started" width="700" /></td>
    </tr>
</table>
</details>

<details closed><summary>🤝 Contributing Guidelines, License, & More</summary>
<br>
<table>
    <tr>
        <td><b>Common README Sections</b><br><p>The remaining sections of the README is generated from a template, including common sections such as project roadmap, contributing guidelines, license, and acknowledgements.</p></td>
    </tr>
    <tr>
        <td><img src="https://raw.githubusercontent.com/eli64s/readme-ai/main/examples/images/contributing.png" alt="contributing" width="700" /></td>
    </tr>
</table>
</details>

<details closed><summary>🧪 Templates</summary>
<br>This feature is currently under development. The template system will allow users to generate README files in different flavors, such as AI/ML, data science, web development, etc.
<table>
    <tr>
        <td>
        <h3>AI/ML README Template</h3>
        <ul>
        <li><strong><a href="#overview">Overview</a></strong>: Summary of the projects' objectives, scope, and expected outcomes.</li>
        <li><strong><a href="#project-structure">Project Structure</a></strong>: Overview of the organization of the projects and their main components.</li>
        <li><strong><a href="#data-collection-and-preprocessing">Data Preprocessing</a></strong>: Data sources, collection methods, and types of data</li>
        <li><strong><a href="#feature-engineering">Feature Engineering</a></strong>: Importance of feature engineering and its impact on model performance.</li>
        <li><strong><a href="#model-architecture-and-development">Model Architecture and Development</a></strong>: Model selection, dev strategies, and implemented algorithms.</li>
        <li><strong><a href="#training-and-validation">Training and Validation</a></strong>: Info on model training procedures, hyperparameter tuning, and validation strategies.</li>
        <li><strong><a href="#testing-and-evaluation">Testing and Evaluation</a></strong>: Model testing results, performance analysis, and comparison with benchmarks.</li>
        <li><strong><a href="#deployment-and-integration">Deployment and Integration</a></strong>: Integration with other systems, APIs, and user interfaces</li>
        <li><strong><a href="#usage-and-maintenance">Usage and Maintenance</a></strong>: User guide on how to use the deployed models and interfaces.</li>
        <li><strong><a href="#results-and-discussion">Results and Discussion</a></strong>: Implications, limitations, and future work.</li>
        <li><strong><a href="#ethical-considerations">Ethical Considerations</a></strong>: Ethical aspects, data privacy, and fairness in model predictions.</li>
        <li><strong><a href="#contributing">Contributing</a></strong>: Procedures for submitting contributions, reporting issues, and proposing enhancements.</li>
        <li><strong><a href="#acknowledgements">Acknowledgements</a></strong>: References to resources, libraries, and frameworks used.</li>
        <li><strong><a href="#license">License</a></strong>: Explanation of usage rights, restrictions, and attribution requirements.</li>
        </ul>
        </td>
    </tr>
</table>
</details>

<details closed><summary>💥 Examples</summary>
<br>
<table>
    <thead>
        <tr>
            <th></th>
            <th>Output File</th>
            <th>Repository</th>
            <th>Languages</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>1️⃣</td>
            <td><a href="https://github.com/eli64s/readme-ai/blob/main/examples/markdown/readme-python.md">readme-python.md</a></td>
            <td><a href="https://github.com/eli64s/readme-ai">readme-ai</a></td>
            <td>Python</td>
        </tr>
        <tr>
            <td>2️⃣</td>
            <td><a href="https://github.com/eli64s/readme-ai/blob/main/examples/markdown/readme-typescript.md">readme-typescript.md</a></td>
            <td><a href="https://github.com/Yuberley/ChatGPT-App-React-Native-TypeScript">chatgpt-app-react-typescript</a></td>
            <td>TypeScript, React</td>
        </tr>
        <tr>
            <td>3️⃣</td>
            <td><a href="https://github.com/eli64s/readme-ai/blob/main/examples/markdown/readme-javascript.md">readme-javascript.md</a></td>
            <td><a href="https://github.com/idosal/assistant-chat-gpt-javascript">(repository deleted)</a></td>
            <td>JavaScript, React</td>
        </tr>
        <tr>
            <td>4️⃣</td>
            <td><a href="https://github.com/eli64s/readme-ai/blob/main/examples/markdown/readme-kotlin.md">readme-kotlin.md</a></td>
            <td><a href="https://github.com/rumaan/file.io-Android-Client">file.io-android-client</a></td>
            <td>Kotlin, Java, Android</td>
        </tr>
        <tr>
            <td>5️⃣</td>
            <td><a href="https://github.com/eli64s/readme-ai/blob/main/examples/markdown/readme-rust-c.md">readme-rust-c.md</a></td>
            <td><a href="https://github.com/DownWithUp/CallMon">rust-c-app</a></td>
            <td>C, Rust</td>
        </tr>
        <tr>
            <td>6️⃣</td>
            <td><a href="https://github.com/eli64s/readme-ai/blob/main/examples/markdown/readme-go.md">readme-go.md</a></td>
            <td><a href="https://github.com/olliefr/docker-gs-ping">go-docker-app</a></td>
            <td>Go</td>
        </tr>
        <tr>
            <td>7️⃣</td>
            <td><a href="https://github.com/eli64s/readme-ai/blob/main/examples/markdown/readme-java.md">readme-java.md</a></td>
            <td><a href="https://github.com/avjinder/Minimal-Todo">java-minimal-todo</a></td>
            <td>Java</td>
        </tr>
        <tr>
            <td>8️⃣</td>
            <td><a href="https://github.com/eli64s/readme-ai/blob/main/examples/markdown/readme-fastapi-redis.md">readme-fastapi-redis.md</a></td>
            <td><a href="https://github.com/FerrariDG/async-ml-inference">async-ml-inference</a></td>
            <td>Python, FastAPI, Redis</td>
        </tr>
        <tr>
            <td>9️⃣</td>
            <td><a href="https://github.com/eli64s/readme-ai/blob/main/examples/markdown/readme-mlops.md">readme-mlops.md</a></td>
            <td><a href="https://github.com/GokuMohandas/mlops-course">mlops-course</a></td>
            <td>Python, Jupyter</td>
        </tr>
        <tr>
            <td>🔟</td>
            <td><a href="https://github.com/eli64s/readme-ai/blob/main/examples/markdown/readme-pyflink.md">readme-pyflink.md</a></td>
            <td><a href="https://github.com/eli64s/flink-flow">flink-flow</a></td>
            <td>PyFlink</td>
        </tr>
    </tbody>
</table>
</details>

---

## 🚀 Getting Started

***Prerequisites***

Ensure that you have the following dependencies installed on your system.
- Python 3.9, 3.10, 3.11, or 3.12
- Package manager or container runtime (pip, docker, conda, etc.)
- OpenAI API account and API key (Additional API endpoints coming soon!)

***Code Repository***

A remote repository URL or local directory path to your project is required to generate a README file. The following repository sources are currently supported.
- GitHub
- GitLab
- Bitbucket
- File System

***OpenAI API***

An OpenAI API account and API key are needed to use *readme-ai*. The following steps outline the process.

<details closed><summary>🔐 OpenAI API Account Setup</summary>

1. Go to the [OpenAI website](https://platform.openai.com/).
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.

</details>

Additionally, it is essential to understand the potential risks and costs associated with using LLM APIs.

> [!WARNING]
>
> Please review the following information before using *readme-ai*.
>
> 1. **Review Sensitive Information**: Before running <em>readme-ai</em>, ensure all content in your repository is free of sensitive information. This tool does not remove sensitive data from your codebase, nor from the output README.
>
> 2. **API Usage Costs**: The OpenAI API is not free and costs can accumulate quickly! You will be charged for each request made by readme-ai. Be sure to monitor API usage costs using the [OpenAI API Usage Dashboard](https://platform.openai.com/account/usage).

---

### ⚙️ Installation

Using `pip`
```sh
pip install readmeai
```

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

Using `conda`
```sh
conda install -c conda-forge readmeai
```

Alternatively, clone the readme-ai repository and build from source.

```sh
git clone https://github.com/eli64s/readme-ai && \
cd readme-ai
```

Then use one of the methods below to install the project's dependencies (Bash, Conda, Pipenv, or Poetry).

Using `bash`
```sh
bash setup/setup.sh
```

Using `pipenv`
```sh
pipenv install && \
pipenv shell
```

Using `poetry`
```sh
poetry install && \
poetry shell
```

---

### 👩‍💻 Running *README-AI*

Before running the application, ensure that you have an OpenAI API key and that it is set as an environment variable.

On `Linux` or `MacOS`
```sh
export OPENAI_API_KEY=YOUR_API_KEY
```

On `Windows`
```sh
set OPENAI_API_KEY=YOUR_API_KEY
```

Use one of the methods below to run the application (Pip, Docker, Conda, Streamlit, etc).

Using `pip`
```sh
readmeai --repository https://github.com/eli64s/readme-ai
```

Using `docker`

```sh
docker run -it \
-e OPENAI_API_KEY=$OPENAI_API_KEY \
-v "$(pwd)":/app zeroxeli/readme-ai:latest \
-r https://github.com/eli64s/readme-ai
```

Using `conda`
```sh
readmeai -r https://github.com/eli64s/readme-ai
```

Using `streamlit`

[![Streamlit App](https://static.streamlit.io/badges/streamlit_badge_black_white.svg)](https://readmeai.streamlit.app/)

> [!NOTE]
>
> The web app is hosted on <a href="https://streamlit.io/">Streamlit Community Cloud</a>, a free service for sharing Streamlit apps. Thus, the app may be unstable or unavailable at times. See the <a href="https://github.com/eli64s/readme-ai-streamlit">readme-ai-streamlit</a> repository for more details.

<details closed><summary>Alternatively, run the application locally from the cloned repository.</summary><br>

Using `pipenv`
```sh
pipenv shell && \
python3 -m readmeai.cli.commands -o readme-ai.md -r https://github.com/eli64s/readme-ai
```

Using `poetry`
```sh
poetry shell && \
poetry run python3 -m readmeai.cli.commands -o readme-ai.md -r https://github.com/eli64s/readme-ai
```

</details>

See the [Configuration](#-configuration) section below for the complete list of CLI options and settings.

---

### 🧪 Tests

Use [`pytest`](https://docs.pytest.org/en/7.1.x/contents.html) to run the default test suite.
```sh
make test
```

Use [`nox`](https://nox.thea.codes/en/stable/) to run the test suite against multiple Python versions including `(3.9, 3.10, 3.11, 3.12)`.
```sh
nox -f noxfile.py
```

---

### 🧩 Configuration

Run the `readmeai` command in your terminal with the following options to tailor your README file.

#### CLI Options

| Flag (Long/Short) | Default | Description | Type | Status |
|-------------------|---------|-------------|------|--------|
| `--align`/`-a` | `center` | Set header text alignment (`left`, `center`). | String | Optional |
| `--api-key`/`-k` | `OPENAI_API_KEY` env var | Your GPT model API key. | String | Optional |
| `--badges`/`-b` | `flat` | Badge style options for your README file. | String | Optional |
| `--emojis`/`-e` | `False` | Add emojis to section header tiles. | Boolean | Optional |
| `--image`/`-i` | `blue` | Project logo image displayed in README header. | String | Optional |
| `--max-tokens` | `3999` | Max number of tokens that can be generated. | Integer | Optional |
| `--model`/`-m` | `gpt-3.5-turbo` | Select GPT model for content generation. | String | Optional |
| `--offline` | `False` | Generate a README without an API key. | Boolean | Optional |
| `--output`/`-o` | `readme-ai.md` | README output file name. | Path/String | Optional |
| `--repository`/`-r` | None | Repository URL or local path. | URL/String | Required |
| `--temperature`/`-t` | `1.0` | LLM API creativity level. | Float | Optional |
| `--template` | None | Choose README template. | String | <em>WIP</em> |
| `--language`/`-l` | `English (en)` | Language for content. | String | <em>WIP</em> |

<sub><em>WIP</em> = work in progress, or feature currently under development.<br>For additional command-line information, run <code>readmeai --help</code> in your terminal for more details about each option.</sub><br>

**Badge Icons**

Select your preferred badge icon style for your README file using the `--badges` flag. The following options are currently supported.

| Badge | Preview |
|------------------|----------|
| `flat`           | ![flat](https://img.shields.io/badge/Python-3776AB.svg?&style=flat&logo=Python&logoColor=white) |
| `flat-square`    | ![flat-square](https://img.shields.io/badge/Python-3776AB.svg?&style=flat-square&logo=Python&logoColor=white) |
| `for-the-badge`  | ![for-the-badge](https://img.shields.io/badge/Python-3776AB.svg?&style=for-the-badge&logo=Python&logoColor=white) |
| `plastic`        | ![plastic](https://img.shields.io/badge/Python-3776AB.svg?&style=plastic&logo=Python&logoColor=white) |
| `skills`          | [![Skills](https://skillicons.dev/icons?i=py)](https://skillicons.dev) |
| `skills-light`    | [![Skills-Light](https://skillicons.dev/icons?i=py&theme=light)](https://skillicons.dev) |
| `social`         | ![social](https://img.shields.io/badge/Python-3776AB.svg?&style=social&logo=Python&logoColor=white) |

<br>

**Project Logo**

Select an image to display in your README header section using the `--image` flag. The following options are currently supported.

| Image | Preview |
|----------------|-------|
| `custom`       | Provide a custom image URL. |
| `black`  | <img src="https://img.icons8.com/external-tal-revivo-regular-tal-revivo/96/external-readme-is-a-easy-to-build-a-developer-hub-that-adapts-to-the-user-logo-regular-tal-revivo.png" width="100" height="100" alt="readme-blue"> |
| `blue`      | <img src="https://raw.githubusercontent.com/PKief/vscode-material-icon-theme/ec559a9f6bfd399b82bb44393651661b08aaf7ba/icons/folder-markdown-open.svg" width="100" height="100" alt="default"> |
| `gradient`     | <img src="https://img.icons8.com/nolan/96/markdown.png" width="100" height="100" alt="gradient"> |
| `purple`       | <img src="https://img.icons8.com/external-tal-revivo-duo-tal-revivo/100/external-markdown-a-lightweight-markup-language-with-plain-text-formatting-syntax-logo-duo-tal-revivo.png" width="100" height="100" alt="purple"> |
| `yellow`       | <img src="https://img.icons8.com/pulsar-color/96/markdown.png" width="100" height="100" alt="yellow"> |

#### Custom Settings

The readme-ai tool is designed with flexibility in mind, allowing users to configure various aspects of its operation through a series of models and settings. The [configuration file](https://github.com/eli64s/readme-ai/blob/main/readmeai/settings/config.toml) covers aspects such as language model settings, git host providers, repository details, markdown templates, and more.

<details closed><summary>🔠 Configuration Models</summary>
<br>

<!--
# README-AI Configuration and Settings

This documentation provides an overview of the configuration and settings for the README.ai CLI tool. It details various data models and functions that are used to configure the tool, making it adaptable for different environments and use cases.
-->

***GitService Enum***

- **Purpose**: Defines Git service details.
- **Attributes**:
  - `LOCAL`, `GITHUB`, `GITLAB`, `BITBUCKET`: Enumerations for different Git services.
  - `host`: Service host URL.
  - `api_url`: API base URL for the service.
  - `file_url`: URL format for accessing files in the repository.

***BadgeOptions Enum***

- **Purpose**: Provides options for README file badge icons.
- **Options**: `FLAT`, `FLAT_SQUARE`, `FOR_THE_BADGE`, `PLASTIC`, `SKILLS`, `SKILLS_LIGHT`, `SOCIAL`.

***ImageOptions Enum***

- **Purpose**: Lists CLI options for README file header images.
- **Options**: `CUSTOM`, `BLACK`, `BLUE`, `GRADIENT`, `PURPLE`, `YELLOW`.

***CliSettings***

- **Purpose**: Defines CLI options for the application.
- **Fields**:
  - `emojis`: Enables or disables emoji usage.
  - `offline`: Indicates offline mode operation.

***FileSettings***

- **Purpose**: Configuration for various file paths used in the application.
- **Fields**: `dependency_files`, `identifiers`, `ignore_files`, `language_names`, `language_setup`, `output`, `shields_icons`, `skill_icons`.

***GitSettings***

- **Purpose**: Manages repository settings and validations.
- **Fields**:
  - `repository`: The repository URL or path.
  - `source`: The source of the Git repository.
  - `name`: The name of the repository.

***LlmApiSettings***

- **Purpose**: Holds settings for OpenAI's LLM API.
- **Fields**: `content`, `endpoint`, `encoding`, `model`, `rate_limit`, `temperature`, `tokens`, `tokens_max`.

***MarkdownSettings***

- **Purpose**: Contains Markdown templates for different sections of a README.
- **Fields**: Templates for aligning text, badges, headers, images, features, getting started, overview, tables of contents, etc.

***PromptSettings***

- **Purpose**: Configures prompts for OpenAI's LLM API.
- **Fields**: `features`, `overview`, `slogan`, `summaries`.

***AppConfig***

- **Purpose**: Nested model encapsulating all application configurations.
- **Fields**: `cli`, `files`, `git`, `llm`, `md`, `prompts`.

***AppConfigModel***

- **Purpose**: Pydantic model for the entire application configuration.
- **Sub-models**: `AppConfig`.

***ConfigHelper***

- **Purpose**: Assists in loading additional configuration files.
- **Methods**: `load_helper_files` to load configuration from different files.

***Functions***

***`_get_config_dict`***

- **Purpose**: Retrieves configuration data from TOML files.
- **Parameters**:
  - `handler`: Instance of `FileHandler`.
  - `file_path`: Path to the configuration file.

***`load_config`***

- **Purpose**: Loads the main configuration file.
- **Parameters**:
  - `path`: Path to the configuration file.
- **Returns**: An instance of `AppConfig`.

***`load_config_helper`***

- **Purpose**: Loads multiple configuration helper files.
- **Parameters**:
  - `conf`: An instance of `AppConfigModel`.
- **Returns**: An instance of `ConfigHelper`.

***Usage***

The configurations are loaded using the `load_config` function, which parses a TOML file into the `AppConfigModel`. This model is then used throughout the application to access various settings. Additional helper files can be loaded using `ConfigHelper`, which further enriches the application's configuration context.

</details>

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

---

## 🛠 Project Roadmap

- [X] Publish readme-ai CLI as a Python package on PyPI.
  - [*PyPI Package*](https://pypi.org/project/readmeai/)
- [X] Containerize the readme-ai CLI as a Docker image via Docker Hub.
  - [*Docker Hub Image*](https://hub.docker.com/repository/docker/zeroxeli/readme-ai/general)
- [X] Serve the readme-ai CLI as a web app, deployed on Streamlit Community Cloud.
  - [*Streamlit Web Application*](https://readmeai.streamlit.app/)
- [ ] Integrate singular interface for all LLM API providers (Anthropic, Cohere, Gemini, etc.)
- [ ] Design template system to give users a variety of README document flavors (ai, data, web, etc.)
- [ ] Develop robust documentation generation process that can extend to full project docs (i.e. Sphinx, MkDocs, 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 README file content on repository push.

---

## 📒 Changelog

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

---

## 🤝 Contributing

- [Discussions](https://github.com/eli64s/readme-ai/discussions)
- [Open an Issue](https://github.com/eli64s/readme-ai/issues)
- [Contributing Guidelines](https://github.com/eli64s/readme-ai/blob/main/CONTRIBUTING.md)

---

## 📄 License

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

---

## 👏 Acknowledgments

*Badges*
  - [Shields.io](https://shields.io/)
  - [Aveek-Saha/GitHub-Profile-Badges](https://github.com/Aveek-Saha/GitHub-Profile-Badges)
  - [Ileriayo/Markdown-Badges](https://github.com/Ileriayo/markdown-badges)
  - [tandpfun/skill-icons](https://github.com/tandpfun/skill-icons)


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

---
