CommitAI is a tool designed to generate concise and engaging commit messages for your staged git changes using OpenAI's GPT-3.5 Turbo. It also provides options for semantic commit messages and custom prompts.
- ⚡️ Written in pure bash, which means it's fast and lightweight
- 🚗 Generate commit messages based on staged git changes
- 🎤 Supports semantic commit messages
- 🧩 Custom prompt support
- 🤼♂️ Interactive commit message confirmation and editing
To install CommitAI, simply run the following command:
curl https://raw.githubusercontent.com/gabedemattos/CommitAI/main/commitai.sh -o commitai.sh && bash <(curl -s https://raw.githubusercontent.com/gabedemattos/CommitAI/main/install.sh)
commitai [options]
Option | Description |
---|---|
-h or --help |
Show help |
-s or --semantic |
Generate a semantic commit message |
-p or --prompt |
Use a custom prompt |
commitai
commitai -s
Example output:
feat(commitai.sh): Add capability to add commit message.
commitai -p "Generate a funny and witty commit message for the following code changes: "
Example output:
"Committing AI..because why not? 😜🤖"
- Add ability to customize existing prompts
- Add ability to save custom prompts
- Add GPT-4 optional support
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.