Skip to content

miasus-agentic/commit-msg-gen

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commit Message Generator

A CLI tool that analyzes your staged Git changes and generates conventional commit messages automatically.

Features

  • 🔍 Analyzes staged changes (additions, deletions, modifications)
  • 📝 Generates conventional commit messages (feat, fix, docs, refactor, etc.)
  • 🎯 Detects commit type based on file patterns and change context
  • 🚀 Simple CLI interface
  • 💡 Suggests scope based on modified files

Installation

pip install -r requirements.txt

Usage

Stage your changes and run:

python commit_gen.py

The tool will analyze your staged changes and suggest a commit message following the Conventional Commits specification.

Example Output

Analyzing staged changes...

Suggested commit message:
feat(auth): add user authentication middleware

Changes detected:
- Added: src/middleware/auth.py
- Modified: src/app.py
- Modified: requirements.txt

Commit Types

  • feat: New feature
  • fix: Bug fix
  • docs: Documentation changes
  • style: Code style changes (formatting, etc.)
  • refactor: Code refactoring
  • test: Adding or updating tests
  • chore: Maintenance tasks
  • perf: Performance improvements

How It Works

  1. Runs git diff --cached --stat to get staged changes
  2. Analyzes file paths and change patterns
  3. Determines appropriate commit type and scope
  4. Generates a descriptive commit message

License

MIT

About

CLI tool that analyzes staged Git changes and generates conventional commit messages automatically

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages