Skip to main content

AI-powered Git commit message generator

Project description

Git-wise

An AI-powered Git commit message generator that helps developers write meaningful and standardized commit messages.

PyPI version License: MIT

Welcome to Git-Wise

Welcome to Git-Wise, a project born from the realization that my commit skills weren't quite up to par while developing another product! 😎 After about 10 hours of development, we now have this version.

Git-Wise uses GPT to analyze your staged files, automatically generate commit messages, and submit them! It's designed to enhance your Git workflow and improve the quality of your commit history.

As the project is still in the development stage, there may be some issues. However, if you encounter any problems or have ideas for improvement, please feel free to reach out and contribute your code!

Fun fact: Every commit in this repository was crafted with the help of Git-Wise!🫡

Support the Project

If you find Git-Wise helpful... 🤔

Unfortunately, I currently don't have any overseas payment methods 🥹🥹🥹

(But your moral support is greatly appreciated! )

Stay Connected

Follow me on Twitter for updates and more:

Twitter Follow

Your feedback and contributions are what make open-source projects like Git-Wise thrive. Let's make commit messages great together!

Features

  • 🤖 AI-powered analysis of staged files to generate commit messages (currently using GPT-4O-mini)
  • 🌍 Support for generating commits in multiple languages
  • 🚀 Automatic commit submission
  • 📏 Adjustable commit message detail level

Installation

pip install git-wise

Quick Start

  1. Initialize git-wise:
git-wise init
  1. Generate a commit message:
git add .
git-wise start

Usage

Basic Commands

# Initialize or reconfigure Git-Wise
git-wise init

# Generate commit message
git-wise start

# Generate commit message with specific options
git-wise start --language en --detail brief --interactive

# Check Git-Wise configuration and environment
git-wise doctor

# Show current configuration
git-wise show-config

# Show staged changes
git-wise show-diff

# Update specific configuration settings
git-wise config --default-language
git-wise config --detail-level
git-wise config --api-key
git-wise config --model
git-wise config --interactive
git-wise config --unlimited-chunk

Configuration Options

  • Language: Select your preferred language for commit messages
  • Detail Level: Choose between brief, minimal, or detailed commit messages
  • API Key: Set your OpenAI API key
  • Model: Select the AI model to use
  • Interactive Mode: Enable or disable interactive commit creation
  • Unlimited Chunk: Enable or disable unlimited chunk mode(for large staged changes)

Examples

Detail Level

if you choose minimal: Minimal commit example

if you choose brief: Brief commit example

if you choose detailed: Detailed commit example

Development

Setup Development Environment

# Clone the repository
git clone https://github.com/creeponsky/git-wise.git
cd git-wise

# Create virtual environment
python -m venv venv
source venv/bin/activate  # or `venv\Scripts\activate` on Windows

# Install development dependencies
pip install -e "."

Running Tests

find a git repo you need to test, and run the following command:

cd /path/to/your/git/repo
git-wise init
git-wise start

Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments

  • OpenAI for providing the GPT API
  • The Python community for excellent tools and libraries

Support

Changelog

See CHANGELOG.md for all notable changes.

Security

For security issues, please refer to our Security Policy and report them privately as described there.

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_wise-0.1.4.tar.gz (19.6 kB view hashes)

Uploaded Source

Built Distribution

git_wise-0.1.4-py3-none-any.whl (19.3 kB view hashes)

Uploaded Python 3

Supported by

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