https://github.com/danielberge/commit-message-generator
Generate commit messages from diff with GPT
https://github.com/danielberge/commit-message-generator
bash gpt-3 openai
Last synced: about 1 year ago
JSON representation
Generate commit messages from diff with GPT
- Host: GitHub
- URL: https://github.com/danielberge/commit-message-generator
- Owner: DanielBerge
- Created: 2023-03-25T16:28:10.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-05-02T09:47:00.000Z (about 3 years ago)
- Last Synced: 2025-05-05T21:15:27.908Z (about 1 year ago)
- Topics: bash, gpt-3, openai
- Language: Shell
- Homepage:
- Size: 12.7 KB
- Stars: 12
- Watchers: 1
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Git Commit Message Generator
This script generates commit messages using the OpenAI GPT-3.5-turbo model based on the provided Git diff. It prompts the user to confirm the commit with the generated message.
## Prerequisites
- [jq](https://stedolan.github.io/jq/)
- [curl](https://curl.se/)
- An OpenAI API key
## Setup
1. Clone this repository
2. Install `jq` and `curl` if you haven't already:
- For Ubuntu/Debian:
```
sudo apt-get install jq curl
```
- For macOS (using [Homebrew](https://brew.sh/)):
```
brew install jq curl
```
3. Set your OpenAI API key as an environment variable directly in your terminal:
```
export OPENAI_API_KEY=your_api_key_here
```