Metadata-Version: 2.1
Name: GitLexPy
Version: 0.1.0
Summary: A Python package for generating commit messages using OpenAI
Home-page: https://github.com/krjordan/GitLexPy
Author: Ryan Jordan
Author-email: ryan@ryanjordan.me
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: gitpython
Requires-Dist: openai
Requires-Dist: argparse


# GitLexPy 🚀✨

Generate intelligent commit messages for your Git changes using AI. GitLex uses OpenAI's GPT models to craft meaningful commit messages based on your code diffs.

## Table of Contents

- [Installation](#installation)
- [Prerequisites](#prerequisites)
- [Usage](#usage)
- [API Key Configuration](#api-key-configuration)
- [Development Workflow](#development-workflow)
- [Contributing](#contributing)
- [License](#license)

### Prerequisites

Ensure you have Python 3.x installed. If not, download and install it from Python's official site.

## Installation 📦

1. Clone the repository:

```bash
git clone https://github.com/krjordan/GitLexPy.git
cd GitLexPy
```

2. Install the required dependencies:

```bash
pip install -r requirements.txt
```

## Usage 🚀

To generate an AI-based commit message based on your git diff:

```bash
python3 gitlex.py --path /path/to/your/repo
```

#### Arguments:

`--path` (optional): Path to git repository. Default is the current directory.
If you want to check if your OpenAI API key is already stored and know where it is stored:

```bash
python3 gitlex.py --check-key
```

**Note:** The tool will prompt you for the OpenAI API key if it's not found in the configuration file. Your API key will be stored locally in the `.gitlex-config.json` file.

## API Key Configuration 🔑

For `GitLexPy` to work, you'll need an OpenAI API key. 

1. [Sign up](https://beta.openai.com/signup/) for an API key with OpenAI.
2. Once you've obtained your key, run `GitLex` for the first time, and it will prompt you to enter it. Your key will be stored locally and securely in `.gitlex-config.json` for future use. 

> ⚠️ **Note:** Never share your API key or commit it directly to your codebase.

## Development Workflow 🛠

We follow the gitflow workflow. Here's a quick breakdown:

- **Develop**: This is the main development branch where all the changes are merged into.
- **Release**: When `develop` is stable and ready for a release, it's branched to `release` for final testing.
- **Main**: Once testing is complete and everything is stable, `release` is merged into `main`, triggering a deployment to PyPI via GitHub Actions.

## Contributing 🤝

Contributions are welcome! Whether it's bug reports, feature requests, or new integrations, we'd love to see what you can come up with.

1. Fork the repository.
2. Make your changes on a new branch.
3. Submit a pull request and describe your changes.

## License 📄

`GitLexPy` is open-source software licensed under the MIT License. See the `LICENSE` file for more details.
