No more headaches with commit messages.
AI-Commit is a command line tool that uses OpenAI's language generation capabilities to generate conventional commit messages for your Git repositories.
To use AI-Commit, you need to obtain an API key from OpenAI and set it as the value of the OPENAI_API_KEY environment variable.
Note: Using AI-Commit will result in charges from OpenAI for API usage, so be sure to understand their pricing model before use.
There are two ways to install AI-Commit:
go install github.com/nguyenvanduocit/ai-commit@latest
You can download prebuilt binaries for Linux, macOS, and Windows from the releases page
- Stage the changes you want to commit in Git.
- Run
ai-commit
command. - The tool will generate a commit message and print it to the console.
- Now you can chat with the AI to adjust the commit message. Press ctrl + c to stop.
- Finally, select the type of commit.
It's recommended to make multiple small commits, commit more often.
Adjustment must be a list of adjectives to describe the commit message. Default adjustment is "short, simple, and clear"
- Auto split changes in to multiple commits.
- Detect commit type.
- Auto tags??
AI-Commit is released under the MIT license. See LICENSE for more information.
Contributions are welcome! Please read the contribution guidelines first.