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.
- Installation
- Prerequisites
- Usage
- API Key Configuration
- Roadmap
- Development Workflow
- Contributing
- License
Ensure you have Python 3.x installed. If not, download and install it from Python's official site.
- Clone the repository:
git clone https://github.com/krjordan/GitLexPy.git
cd GitLexPy
- Install the required dependencies:
pip install -r requirements.txt
To generate an AI-based commit message based on your git diff:
python3 gitlex.py --path /path/to/your/repo
--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:
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.
For GitLexPy
to work, you'll need an OpenAI API key.
- Sign up for an API key with OpenAI.
- 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.
Let's make your commit messages smarter and your Git workflow smoother. Here's a look into what we're planning for the future. Feedback, contributions, and suggestions are always welcome! Take a look at the ROADMAP
file for the deets!
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 torelease
for final testing. - Main: Once testing is complete and everything is stable,
release
is merged intomain
, triggering a deployment to PyPI via GitHub Actions.
Contributions are welcome! Whether it's bug reports, feature requests, or new integrations, we'd love to see what you can come up with. Check out the CONTRIBUTING
file for more details.
- Fork the repository.
- Make your changes on a new branch.
- Submit a pull request and describe your changes.
GitLexPy
is open-source software licensed under the MIT License. See the LICENSE
file for more details.