DEV Community

Saurav Panda
Saurav Panda

Posted on

Generate meaningful commit messages with Ollama and Kaizen

As developers, we've all faced the challenge of crafting meaningful commit messages while trying to maintain our coding momentum. Enter Kaizen-CLI, an innovative tool that leverages local Large Language Models (LLMs) to automatically generate high-quality commit messages based on your code changes.

The Power of AI in Your Git Workflow

Kaizen-CLI uses the Phi3 model, running locally through Ollama, to analyze your code diffs and generate contextually relevant commit messages. This approach not only saves time but also ensures consistency in your project history, making it easier for team members to understand code evolution.

Quick Setup Guide

  1. Install and run Ollama with the Phi3 model:
   ollama serve
Enter fullscreen mode Exit fullscreen mode
  1. Install Kaizen-CLI:
   pip install kaizen-cli
Enter fullscreen mode Exit fullscreen mode
  1. Configure Kaizen-CLI:
   kaizen-cli config add-model --name default --model ollama/phi3
Enter fullscreen mode Exit fullscreen mode
  1. Set up the Git hook:
   kaizen-cli hooks install prepare-commit-msg
Enter fullscreen mode Exit fullscreen mode

With these simple steps, you're ready to experience AI-powered commit messages!

How It Works

Kaizen analyzes the diff between your current code and the last commit, interprets the changes, and crafts a message that accurately describes your modifications. This process ensures that your commit history remains informative and easy to understand.

For a visual demonstration, check out our demo video: Kaizen-CLI Demo

Benefits of Using Kaizen-CLI

  • Time Efficiency: Eliminate the mental effort of composing commit messages.
  • Consistency: Maintain a standardized format across your project history.
  • Enhanced Clarity: AI-generated messages often capture nuances that humans might overlook.
  • Improved Focus: Stay in your coding flow without interruptions.

Supporting Open Source AI Development

Kaizen is an open-source project dedicated to enhancing developer productivity through AI. You can support our efforts by:

  1. Starring our repository: Kaizen on GitHub
  2. Contributing to the project
  3. Sharing Kaizen with your developer network

Embrace the Future of Development

By integrating tools like Kaizen into your workflow, you're stepping into a future where AI assists and enhances your development processes. This allows you to focus more on creating and less on documentation minutiae.

Give Kaizen-CLI a try today and experience a more streamlined, efficient Git workflow!

Top comments (0)