A CLI AI assistant that helps you write commit messages at the speed of light using locally run LLMs.
Install the latest version of commit-pal
from PyPI:
pip install commit-pal
cm --setup # Configure the style of the commit messages
- Ollama should be installed and running
- Pull and run a model to use with the library:
ollama run <model>
e.g.ollama run qwen2.5-coder:7b
- See Ollama.com for more information on the models available.
- We have seen the best performance with qwen2.5-coder:7b model so far.
By default, Ollama will run on localhost:11434
.
After staging your changes, run the following command to generate a commit message:
cm
The proposed commit message will be displayed in the terminal for you to review and confirm
Please follow the official installation guide to install Poetry, which will be used to manage dependencies and environments.
# Install dependencies
poetry install
# Activate Python Virtual Environment for Mac/Linux
eval "$(poetry env activate)"
# Activate Python Virtual Environment for Windows
.venv\Scripts\Activate.ps1
make lint
pip uninstall cm -y # Uninstall old version of commit-pal
pip install -e . -v # Install new version of commit-pal
cm # Run commit-pal
# Bump the semantic version in pyproject.toml before running this command
make publish