Skip to content

ssk090/ai-commit-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AI Commit Message Generator

AI Commit Message Generator is a tool that uses an AI model to generate commit messages based on the staged changes in your Git repository. It leverages the Ollama model to create concise, informative commit messages that follow best practices in version control.

git-commit-gen.mp4

Features

  • Generates commit messages using the Ollama AI model
  • Supports various commit message types (feat, fix, refactor, etc.)
  • Provides a detailed explanation of changes in bullet points
  • Focuses on major changes and uses technical, precise language
  • Interactive prompt to proceed with the commit, regenerate the message, or discard it

Installation

  1. Clone the repository:
    git clone https://github.com/ssk090/ai-commit-gen.git
    cd ai-commit-gen
  2. Install the dependencies:
    npm install

Usage

  1. Ensure you have staged changes in your Git repository:

    git add .
  2. Run the AI Commit Message Generator:

    node index.js
  3. Follow the interactive prompt to proceed with the commit, regenerate the message, or discard it.

    ✨ Generating commit message...
     --------------------------------------------------
    
     feat(package.json): update package.json with ai-commit-gen information
     - added new package name and version
     - updated scripts to include test command
     - set author and license details
     - impact: enables accurate dependency tracking for ai-commit-gen project
    
     Proceed to commit? [y(yes) | n(no) | r(regenerate)] ›
  4. Choose an action:

  • y or yes: Proceed with the commit
  • n or no: Discard the AI-generated commit message
  • r or regenerate: Regenerate the commit message

Configuration

  • The tool uses the following configuration files:
  • commands.js: Defines the shell commands used by the tool.
  • systemPrompt.js: Contains the system prompt used by the AI model to generate commit messages.
  • index.js: Main file that orchestrates the commit message generation process.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published