GitCommitX is a CLI tool that simplifies commit message writing using GPT-4o-mini. It automatically generates meaningful and structured commit message, help developers maintain a clean and consistent commit history.
- Install the required packages
pip install -r requirements.txt - Generate an OpenAI API key here
- Add the OpenAI API key into the
.env.devfile - Stage your changes using
git add <file>orgit add .or a GUI tool - Run the command to auto generate commit message
python -m gitcommitx.cli commit - Choose between auto-generating the commit message or manually assigning a type
- Review and approve the commit message before finalizing the commit
feat: Use feat when adding a new feature.
fix: Use fix when fixing a bug.
refactor: Use refactor when restructuring the code without adding new features.
docs: Use docs when modifying documentation files (.md) or comments only.
style: Use style when making formatting adjustments (e.g., PEP8 fixes, spacing, line breaks).
test: Use test when modifying test files.
chore: Use chore for build tools, Git hooks, scripts, or configuration files.
build: Use build for changes affecting environment setup, Docker, package managers (e.g., npm, pip).
ci: Use ci for modifications related to CI/CD configurations.
perf: Use perf when optimizing performance.
revert: Use revert when reverting a previous commit.
Scope should be based on the filename, not the folder structure.
Example:
gitcommitx/hooks.py → type(hooks): <description>
gitcommitx/config.js → type(config): <description>
database/models.ts → type(models): <description>
router/user.go → type(user): <description>
Permission is hereby granted, free of charge, to any individual obtaining a copy of this software and associated documentation files (the "Software"), to use the Software solely for personal, non-commercial purposes.
More License details can check here