A CLI tool written in Go that uses OpenAI's GPT-4 to generate meaningful git commit messages based on staged changes. This tool streamlines your development workflow by suggesting commit messages that accurately describe code modifications.
- Automatically generate commit messages using OpenAI's GPT-4 model.
- Reads code changes and provides concise, descriptive commit messages.
- Configurable through a YAML file and environment variables.
- Clone the repository:
git clone https://github.com/yourusername/ai-git-commit.git
- Change to the project directory
cd ai-git-commit
- Install dependencies
go mod tidy
- Install the app
./install.sh (chmod +x ./install.sh if necessary.)
- Create a config.yml file in the root of the project with the following structure:
openai: api_key: "YOUR_OPENAI_API_KEY" model: "gpt-4" max_tokens: 100
- Alternatively, you can set an environment variable API_KEY.