gpt-commit is a tool that leverages OpenAI's language model to automatically generate commit messages or Agile stories from your git diffs.
To install and use gpt-commit, you need to have Python 3 and Git installed in your environment.
- Clone this repository
git clone https://github.com/yourusername/gpt-commit.git
cd gpt-commit
- Install the required Python libraries
pip install -r requirements.txt
- Set your OpenAI API key as an environment variable.
export OPENAI_API_KEY=yourapikey
The script requires an argument to determine the type of output. The choices are 'detailed_commit', 'brief_commit', and 'story'. If no argument is provided, it defaults to 'brief_commit'.
To use gpt-commit in your terminal, navigate to the directory of the git repository you want to generate a commit message or Agile story for and run the script.
gpt-commit.py --output_type output_type
Replace output_type with one of the following:
- 'detailed_commit' for a detailed commit message.
- 'brief_commit' for a brief commit message.
- 'story' for an Agile user story.
Yo! Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Create your Feature Branch (git checkout -b feature/AmazingFeature)
- Commit your Changes (git commit -m 'Add some AmazingFeature')
- Push to the Branch (git push origin feature/AmazingFeature)
- Open a Pull Request