commit-autosuggestions  by graykode

AI tool recommends commit messages

created 5 years ago
388 stars

Top 75.0% on sourcepulse

GitHubView on GitHub
Project Summary

This project provides an AI-powered tool to automatically generate Git commit messages based on code changes. It targets developers seeking to improve commit message quality and consistency, offering suggestions that can be adopted or refined.

How It Works

The system leverages CodeBERT, a pre-trained model that understands both programming and natural languages. It processes code differences (diffs) and uses a novel patch_type_embeddings mechanism to distinguish between added and deleted code lines. This allows for more contextually relevant commit message generation compared to models that only consider added code.

Quick Start & Requirements

  • Server: Run a Flask inference server using Docker. Requires nvidia-docker for GPU acceleration.
    • Python: docker run -it -d --gpus 0 -p 5000:5000 graykode/commit-autosuggestions:py
    • No GPU: Use commit_autosuggestions.ipynb with ngrok.
  • Client: Install via pip: pip install commit.
  • Configuration: Set the server endpoint: commit configure --endpoint <server_address>.
  • Usage: Generate suggestions with commit -f <diff_file>.
  • Dependencies: Python, Docker, Nvidia-docker (for GPU).

Highlighted Details

  • Supports Python and JavaScript with diff analysis; other languages are planned.
  • Trained on the CodeSearchNet dataset.
  • Offers fine-tuning for custom commit lint styles.
  • The underlying research is published in an ACL workshop.

Maintenance & Community

  • Primary author: Tae Hwan Jung (@graykode).
  • Development proceeds in version-specific branches, merging to master post-PyPI release.
  • Community contributions are welcomed.

Licensing & Compatibility

  • The repository does not explicitly state a license in the README.

Limitations & Caveats

  • Support for languages beyond Python and JavaScript is currently limited or not yet implemented.
  • The project relies on a separate inference server, adding an operational layer.
  • The README does not specify the license, which could impact commercial use or integration into closed-source projects.
Health Check
Last commit

2 years ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
2 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.