CLI utility that generates commit messages using AI
Project description
Commit Maker

All commits in the repository are generated by this program
This CLI utility automatically creates meaningful git commit messages using local models via ollama/Mistral AI API based on the output of git status and git diff commands. It is implemented as a single file for easy conversion into an executable.
Features
- Automatically generates meaningful commit messages in Russian
- Interactive confirmation before creating a commit
- Works with both existing and new Git repositories
- Uses local models/Mistral AI API to generate commit messages based on repository changes
Requirements
- Git installed on your system
- Mistral API key (for using Mistral AI API)
- Ollama installed on your system (for using local models)
Getting a Mistral AI API Key
To get a key, go to the Mistral console website Mistral and create an API key. You need a Mistral account to do this.
Installing Ollama
To install ollama, go to the Ollama website and choose the method suitable for your system.
Installation
From Source
When installing from source, use the -e flag to always have the latest version of the utility after git pull without reinstallation!
git clone https://github.com/Sashayerty/commit_maker
cd ./commit_maker
# Windows
pip install -r requirements.txt
# Linux/MacOS
pip3 install -r requirements.txt
Setting Up Environment Variables
After installing the utility, you must add the MISTRAL_API_KEY environment variable.
Windows
- Open Command Prompt as Administrator
- Set the Mistral API key:
setx MISTRAL_API_KEY "your_api_key_here"
- Restart your terminal/IDE to apply the changes
Linux/macOS
- Open the terminal
- Add to your shell configuration file (
~/.bashrc,~/.zshrc, or~/.bash_profile):export MISTRAL_API_KEY="your_api_key_here"
- Reload the configuration:
source ~/.bashrc # or whichever file you edited
Usage
commit_maker [OPTION] [VALUE]
Usage Examples
-h, --help - display help
-l, --local-models - use local models
-m, --max-symbols - limit the length of the commit message
-M, --model - specify which local model to use (with -l)
-d, --dry-run - display the message based on staged changes without creating a commit
-t, --temperature - model temperature when creating the message
-e, --exclude - files to ignore when creating the commit message
-w, --wish - wishes/edits for the message
-L, --language - change language of commits
-V, --version - show version
- Use local models, limit commit message length to 300 characters, use qwen2.5:12b
commit_maker -l -m 300 -M qwen2.5:12b
- Use Mistral, temperature 1.3, dry run
commit_maker -t 1.3 -d
- Local models, interactive model selection
commit_maker -l - Local models, message length 100 characters, ignore
uv.lock, wish "Mention the README.md change"commit_maker -l -m 100 -e "./uv.lock" -w "Mention the README.md change"
Notes
- To view all possible script execution options, add the
--helpflag - The script will show the generated commit message before creating it
- You can regenerate the message by pressing
rwhen prompted for confirmation - By default, messages are generated in Russian (can be changed in the script)
License
Commit Maker is licensed under MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file commit_maker-0.3.0-py3-none-any.whl.
File metadata
- Download URL: commit_maker-0.3.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0a25c6e4389d62a4ac0201ed4319718e642c88e18fa3d7c2a8674469bded1dd6
|
|
| MD5 |
d5df0405aded02e07a98988d27f3f3bc
|
|
| BLAKE2b-256 |
05c9656260a0b38663a70e9742c6cf3a5bde37a0cfd87f5d28a4a9765b558d8a
|