Skip to main content

Generate concise Git commit messages using local LLMs via Ollama

Project description

🔥 git-smart-commit

AI-powered Git commit assistant powered by Ollama (local LLMs)

git-smart-commit helps developers write clear, concise, and contextual commit messages using AI — right from your terminal. It runs entirely offline by leveraging Ollama to use local large language models like phi3, mistral, etc.


🚀 Why Use This?

Writing high-quality Git commit messages is crucial for:

  • Understanding why a change was made (not just what changed)
  • Keeping a clean, readable Git history
  • Making code reviews easier and faster
  • Improving team collaboration and onboarding

But let’s be honest:
Most of us settle for “fix”, “update”, or “final changes 😬”.

🤖 Enter git-smart-commit

This tool scans your staged Git diff and uses a local AI model to generate a meaningful commit message — helping you follow best practices with minimal effort.


🧠 How It Works

  1. You stage changes using git add
  2. Run git-smart-commit
  3. It extracts your git diff --cached
  4. Sends the diff to a local LLM via Ollama
  5. Generates a clear, short commit message
  6. You review it:
    • ✅ Accept it
    • ❌ Provide feedback and regenerate
  7. It commits using your selected message

🖥️ Installation

Requires Python 3.7+ and Ollama installed

1. Install the CLI

pip install git-smart-commit

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

git_smart_commit-0.1.3.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

git_smart_commit-0.1.3-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file git_smart_commit-0.1.3.tar.gz.

File metadata

  • Download URL: git_smart_commit-0.1.3.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.1

File hashes

Hashes for git_smart_commit-0.1.3.tar.gz
Algorithm Hash digest
SHA256 71b384d6d92a797c025055506970bd5e418a3fdca6a9a1ddd613411cce80c575
MD5 ff403573e2ccbdf4725d949ad9b91871
BLAKE2b-256 3192b9960b69365249846f373c5a1177d2eab4d7f5318a4eaa2fcaa8e62d77cd

See more details on using hashes here.

File details

Details for the file git_smart_commit-0.1.3-py3-none-any.whl.

File metadata

File hashes

Hashes for git_smart_commit-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9a840da9e5a0fc88e10802fa69792c2218c418020745b2da96fe92a1130b2c1b
MD5 1d34f7cafb4cdf692c3678f6fed29ef9
BLAKE2b-256 b1d5b74689178ed7d01cfe5f4be438cde00c808a6e88c83f75a9792ce22782cf

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page