- Local AI-Powered: Generates commit messages using a small LLM models locally
- Flexible Editing: Review and edit generated messages before committing
- Git Integration: Seamlessly works with your existing Git workflow
- Multiple Language Model Support: Option to choose different local AI models
- Ollama: Download and install ollama from offical website.
- RAM (minimum):
- 8GB for smaller models (<=3B parameters)
- 16GB for optimal performance
- GPU (Optional): Boosts performance, but not required
It is recommended to use a virtual environment.
pip install autocommitt
Check the installed version with:
pip list | grep autocommitt
If it's not latest, make sure to upgrade.
pip install -U autocommitt
-
Stage Your Changes
Stage the files you want to commit using Git:git add <files...>
-
Generate and Edit Commit Messages
Generate a commit message based on your staged changes:act gen
-
The tool generates a message and allows you to review and edit it before committing.
-
To automatically push the commit to the remote repository, use the
-p
or--push
flag:act gen -p
-
By default, AutoCommitt uses the deepseek-r1:1.5b
model to generate commit messages.
- To view the list of available models, run the following command:
act list
- To select and set a model as active:
act use <model_name>
Note: If the model is not already downloaded, this command will pull the model by running
ollama pull <model_name>
and set it as the default.
act rm <model_name>
Easily view recent commit messages using the his
command:
act his -n 5
- Flag Description:
-n
or--limit
: (Optional) Specify the number of recent commit messages to retrieve. If omitted, all commit messages will be displayed.
- Cross-Platform Support: Compatibility for MacOS.
- Git Hooks Integration: Compatible with pre-commit hooks
- Custom Templates: Support for user-defined commit message templates
We welcome contributions! To report bugs, fix issues, or add features, visit the Issues page. Please review our Contribution Guide for setup and contribution instructions.
We would like to express our gratitude to the following open-source projects that made AutoCommitt possible:
- Ollama - Enables local AI with large language models.
- Typer - A CLI builder by Sebastián Ramírez, powering our command-line interface.
Special thanks to the maintainers and contributors for their outstanding work!