This script helps you create a detailed commit message with AI.
- To use it, download the script and give it executable permissions
chmod +x aicommit
and move it to/usr/local/bin
, you can dosudo mv aicommit /usr/local/bin
- You would also require a Gemini API key, you can generate one from here https://aistudio.google.com/apikey
- After getting the key, you need to export it, so for that in MacOS, you can open the file
vim ~/.zprofile
and addexport GEMINI_API_KEY="your-api-key"
at the bottom and save it - Now, when you are in the repository directory and want to make a commit, simply type
aicommit
in the terminal and it would add all the files, generate a commit message and push your code to your branch.
If you don't have GPG keys setup, you might want to remove -S
from the commit command if you face and error.