Skip to main content

Project logo

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

  1. Make sure you have Git, Python 3.10+, and pip installed

  2. Install the package:

    pip install llm-commit-generator
    
  3. 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
    
  4. After adding your changes to your git repo, run:

    lcm
    

    For Ollama, use:

    lcm --ollama
    

How it Works

  1. The tool extracts your git diff (staged changes, or unstaged if no staged changes)
  2. Sends the diff to an AI model with a prompt to generate concise commit messages
  3. Presents you with message suggestions in a terminal UI using fzf
  4. 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

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.

Metadata

Release files for llm-commit-generator 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for llm-commit-generator 0.1.3
File Size Uploaded Provenance
llm_commit_generator-0.1.3.tar.gz 283.9 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for llm-commit-generator 0.1.3
File Interpreter ABI Platform
llm_commit_generator-0.1.3-py3-none-any.whl Python 3 none any Details

Total release size: 299.9 kB

Release files / llm_commit_generator-0.1.3.tar.gz

Download URL llm_commit_generator-0.1.3.tar.gz
Size 283.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d12102e47812228b0e6e91a212fc0eb4f4cea86f54ade2069219b17dfc988df2
BLAKE2b-256 checksum
How to use checksums
50affbf78831141e30ce9cf0af76a00907aab98d32c3371aa2695199d41145b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Release files / llm_commit_generator-0.1.3-py3-none-any.whl

Download URL llm_commit_generator-0.1.3-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f95cb07c70728844a8d4d785a609f8b766fb30b7662d577beeb1bbb10a12d08
BLAKE2b-256 checksum
How to use checksums
91e437f155eec62d28bf5c878073d64fa00bca031c380cb1bd6d22a049a5c899
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.11.3

Security for llm-commit-generator 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.3 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page