No project description provided
Project description
LLM Commit Generator
This blueprint guides you to easily generate AI-powered git commit messages based on your code changes. It uses local LLMs via Jan AI or Ollama to analyze git diffs and suggest concise, relevant commit messages.
📘 To explore this project further and discover other Blueprints, visit the Blueprints Hub.
👉 📖 For more detailed guidance on using this project, please visit our Docs here
Built with
- Python 3.10+
- Jan AI for a user-friendly local AI experience
- Open-source LLMs via Ollama as an alternative
- fzf for terminal UI
Quick-start
-
Make sure you have Git, Python 3.10+, and pip installed
-
Install the package:
pip install llm-commit-generator
-
Choose one of the following local inference options:
Option 1: Jan AI (Default)
- Install Jan AI and download a model (like Llama 3.1) through its interface
- Start the Jan AI application and ensure it's running
Option 2: Ollama
- Install Ollama and pull a model:
ollama pull llama3.1
-
After adding your changes to your git repo, run:
lcm
For Ollama, use:
lcm --ollama
How it Works
- The tool extracts your git diff (staged changes, or unstaged if no staged changes)
- Sends the diff to an AI model with a prompt to generate concise commit messages
- Presents you with message suggestions in a terminal UI using fzf
- After selecting a message, commits your changes with the selected message
Pre-requisites
-
System requirements:
- OS: Windows, macOS, or Linux
- Python 3.10 or higher
- Git
- fzf (for terminal UI)
- Jan AI or Ollama for local inference
-
Dependencies:
- Dependencies listed in
pyproject.toml
- Dependencies listed in
Troubleshooting
- If you get
fzf: command not found, install fzf: fzf installation guide - For Jan AI issues, ensure the Jan AI application is running
- For Ollama issues, ensure the Ollama service is running and your model is pulled
License
This project is licensed under the Apache 2.0 License. See the LICENSE file for details.
Contributing
Contributions are welcome! To get started, you can check out the CONTRIBUTING.md file.
Project details
Release history Release notifications | RSS feed
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 llm_commit_generator-0.1.1-py3-none-any.whl.
File metadata
- Download URL: llm_commit_generator-0.1.1-py3-none-any.whl
- Upload date:
- Size: 16.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3a62b9b3c7a32dd8ef69a9832cbfac83fff37dcd1513734c167b7a23cf152fd1
|
|
| MD5 |
293ec12e6f4d7c7668f03ce271ef4373
|
|
| BLAKE2b-256 |
b0d51de0cfa4229c192eb5b9a2a61985fd0c666250d44e39df02b55ac9d77db1
|