ai-commit-sense is a lightning-fast, AI-powered CLI tool that automatically generates professional, Conventional Commit messages based on your staged Git changes. Designed for all developers, regardless of your tech stack.
👨💻 Developed with ❤️ by Dharam
Click on your Operating System to jump directly to the installation steps:
- 🌍 Language Agnostic: Works perfectly with MERN stack, Python, Java, Go, Android, iOS, and more.
- ⚡ Zero Dependencies: Distributed as a standalone executable. You do not need to install Node.js, Go, or Python to use it.
- 🔑 Bring Your Own Key (BYOK): Uses your own free Google Gemini API key. Saves it securely locally so you only enter it once. No subscription required!
- 🔒 Privacy First: Only sends your
git diff --stagedto the AI. Your actual source code files are never uploaded.
Setting up ai-commit-sense takes less than 30 seconds. Choose your OS below:
Open your terminal and run this single command to download and install the tool globally:
sudo curl -L https://github.com/Dharam-IN/ai-commit-sense/releases/latest/download/ai-commit-sense-mac -o /usr/local/bin/ai-commit-sense && sudo chmod +x /usr/local/bin/ai-commit-senseThat's it! You can now use the ai-commit-sense command from anywhere.
Open your terminal and run this single command:
sudo curl -L https://github.com/Dharam-IN/ai-commit-sense/releases/latest/download/ai-commit-sense-linux -o /usr/local/bin/ai-commit-sense && sudo chmod +x /usr/local/bin/ai-commit-senseThat's it! You can now use the ai-commit-sense command from anywhere.
For Windows, follow these simple steps:
-
📥 Download: Go to the Releases page and download the
ai-commit-sense-windows.exefile. -
✏️ Rename: Rename the downloaded file to just
ai-commit-sense.exe. -
⚙️ Set PATH: Move this
ai-commit-sense.exefile to a secure folder (e.g.,C:\Program Files\ai-commit-sense\). Then, add that folder's path to your system's Environment Variables (PATH).- (Not sure how to add to PATH? https://www.architectryan.com/2018/03/17/add-to-the-path-on-windows-10/)
-
Restart your terminal (Command Prompt or PowerShell).
Using the tool is incredibly simple and fits right into your daily workflow.
Step 1: Make some changes in your code and stage them as you normally do:
git add .Step 2: Instead of typing git commit -m "...", just run:
ai-commit-senseStep 3 (First time only): The tool will ask for your free Google Gemini API Key: https://aistudio.google.com/app/apikey
- Note: It will be securely saved in your home directory (
~/.ai-commit-sense.json), so you will never have to enter it again.
Step 4: The AI will instantly analyze your diff and suggest a clean, conventional commit message. Press y to accept and automatically commit!
-
Changing your API Key: If your key expires or you entered the wrong one, simply delete the hidden config file from your home directory and run the tool again.
-
Mac/Linux:
rm ~/.ai-commit-sense.json -
Windows:
del %USERPROFILE%\.ai-commit-sense.json
-
If you find this tool helpful, don't forget to give it a ⭐ on GitHub!