A git prepare-commit-msg hook that automatically generates commit messages using OpenAI language models.
gptcommit is a Git hook tool that automatically generates commit messages by analyzing code changes with OpenAI's language models. It solves the problem of writing repetitive, descriptive commit messages by using AI to create clear summaries of staged diffs. The tool integrates seamlessly into the Git workflow, running during the prepare-commit-msg phase.
Developers and teams who want to maintain consistent, descriptive commit histories without manual effort, particularly those already using Git and comfortable with CLI tools.
Developers choose gptcommit because it eliminates the cognitive load of writing commit messages while ensuring quality documentation. Its configurability, support for multiple languages, and cost-awareness make it a practical addition to development workflows.
A git prepare-commit-msg hook for authoring commit messages with LLMs.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Acts as a prepare-commit-msg hook that automatically generates messages during normal git commit workflow, minimizing disruption to developer habits.
Configurable output in languages like English, Chinese, and Japanese via locale codes, making it accessible for international teams.
Defaults to economical OpenAI models and includes explicit guidance on reducing token usage to help manage expenses, as detailed in the FAQ.
Supports custom models, API endpoints, proxies, and environment variables through TOML files, allowing adaptation to various setups.
Requires an OpenAI API key and incurs per-token charges that can accumulate with frequent commits or large diffs, a concern highlighted in the cost reduction section.
Installation via Rust's cargo or Homebrew, plus API key management, adds steps compared to simpler Git tools, which might deter quick adoption.
Cannot generate messages without internet access since it relies on external AI services, hindering use in disconnected or air-gapped environments.