A command-line tool that generates commit messages from Git diffs using Ollama's llama3.2 model running locally on http://localhost:11434
. The script automates dependency installation, model setup, and commit message generation, making it seamless for Linux users.
Clone or Download the Project:
git clone https://github.com/yourusername/ollamacommit.git cd ollamacommit
Ensure Ollama is Installed:
Run the Installation Script:
./install.sh
llama3.2
model, sets up a virtual environment in venv/
, and installs required Python packages (requests
, langchain
, langchain_ollama
).(Optional) Add to PATH:
ollamacommit
globally without specifying the path, add the bin/
directory to your PATH:
export PATH=$PATH:/path/to/ollamacommit/bin
~/.bashrc
or ~/.zshrc
for persistence.Ensure Ollama is Running:
Start your local Ollama server:
ollama serve
Verify it's running at http://localhost:11434
.
Stage Changes:
git add .
Generate and Commit:
Run the tool:
./bin/ollamacommit
ollamacommit
git diff --cached
.python3
and pip
are installed on your system. Use pip3
if necessary.llama3.2
model is downloaded automatically if not present.http://localhost:11434
, and that changes are staged with git add
.This setup provides an efficient way to automate commit message generation with minimal setup on Linux.
To remove the tool and its components:
Run the uninstallation script:
./uninstall.sh
The script will:
If you added the bin directory to PATH, remember to remove it from your ~/.bashrc
or ~/.zshrc
.
install.sh
: Installation script that sets up dependencies and environment.uninstall.sh
: Script to clean up installed components.bin/ollamacommit
: Main executable script for generating and managing commit messages.src/generate_message.py
: Python module that handles LLM integration and message generation.venv/
: Virtual environment directory (created during installation).{{ Add license information here if applicable }}
There are no datasets linked
There are no models linked
There are no datasets linked
There are no models linked