Generate conventional commit messages using AI.
curl -fsSL https://devshub.ai/aicommit/install.sh | bashOr via GitHub:
curl -fsSL https://raw.githubusercontent.com/apertacodex/aicommit/main/install.sh | bashbrew tap apertacodex/aicommit
brew install aicommit# Download latest release
wget https://github.com/ApertaCodex/aicommit/releases/latest/download/aicommit_VERSION_all.deb
sudo dpkg -i aicommit_VERSION_all.deb
sudo apt-get install -f # Install dependenciessudo yum install https://github.com/ApertaCodex/aicommit/releases/latest/download/aicommit-VERSION-1.noarch.rpmgit clone https://github.com/ApertaCodex/aicommit.git
cd aicommit
./install.shSet your OpenAI API key:
export OPENAI_API_KEY='your-api-key-here'
echo 'export OPENAI_API_KEY="your-api-key-here"' >> ~/.bashrcInstall jq:
# Ubuntu/Debian
sudo apt-get install jq
# macOS
brew install jqaicommit # Commit and push (default)
aicommit -n / --no-push # Commit without pushing
aicommit -y / --yes # Auto-accept generated message
aicommit -c / --changelog # Update CHANGELOG.md with commit
aicommit -p groq # Select provider for this run
aicommit -p openai -m gpt-4o-mini # Override provider model
aicommit -y -n # Combine options
aicommit -c -y -n # All options together
# Also works as a git command
git aicommitThe tool analyzes your git changes, generates a conventional commit message, and lets you review, edit, or abort before committing.
The --changelog (or -c) flag automatically updates CHANGELOG.md following the Keep a Changelog format.
- After committing your changes, the tool parses the commit message
- Extracts the conventional commit type and description
- Updates
CHANGELOG.mdwith an entry in the "Unreleased" section - Amends the commit to include the changelog update
| Commit Type | Changelog Section |
|---|---|
feat |
Added |
fix |
Fixed |
docs, refactor, test, chore, style |
Changed |
Each entry includes the commit description and short hash:
- Add new user authentication feature (abc1234)# Make some changes
echo "new feature" > feature.txt
# Commit with changelog update
aicommit --changelog
# Your CHANGELOG.md will automatically include:
# ## [Unreleased]
#
# ### Added
# - Add new user authentication feature (abc1234)- If
CHANGELOG.mddoesn't exist, it will be created with the standard template - If
CHANGELOG.mdhas uncommitted changes, the update is skipped (commit still succeeds) - The changelog entry is added to the same commit (using
git commit --amend)
# Install BATS (Bash Automated Testing System)
git clone https://github.com/bats-core/bats-core.git
cd bats-core && sudo ./install.sh /usr/local
# Run tests
cd /path/to/aicommit
./tests/run-tests.shshellcheck aicommit install.sh scripts/*.shSee CONTRIBUTING.md for development guidelines and contribution process.
This project uses GitHub Actions for:
- Automated testing on every PR (shellcheck, integration tests, install validation)
- Automated releases on version tags
- Multi-platform package building (deb, rpm)
- Homebrew formula updates
See .github/workflows/ for workflow details.
MIT
Built with ❤️ by Moussa Mokhtari