gcommit-ai
v0.2.0
Published
AI-powered conventional commit message generator CLI tool
Downloads
12
Maintainers
Readme
gcommit-ai
AI-powered conventional commit message generator for your Git workflow.
Features
- 📑 Reads staged or unstaged Git changes
- 🤖 Uses OpenAI GPT models to craft concise conventional commit messages
- 💾 Configuration via
.gcommitrcor environment variables - 🖥️ Cross-platform (Windows, macOS, Linux)
- ⚡ Optional
--autoflag to commit with the generated message automatically
Demo
# Generate a commit message from your changes
npx gcommit
# Generate and commit in one shot
npx gcommit --autoInstallation
npm i -g gcommit-aiConfiguration
First-time users will be prompted for an OpenAI API key:
gcommit configor create a .gcommitrc (in project root or home directory):
{
"openai_api_key": "sk-...",
"model": "gpt-4o-mini",
"language": "en",
"auto_commit": false
}Environment variables are also supported:
OPENAI_API_KEYGCOMMIT_MODELGCOMMIT_LANGGCOMMIT_AUTO_COMMIT
Usage
gcommit # Generate a commit message
gcommit --auto # Generate and commit
gcommit config # Configure API key and preferences
gcommit --help # CLI help
gcommit --version # Version infoContribution
- Fork the repo and create a feature branch.
- Run
npm installandnpm run build. - Submit a pull request with a clear description.
Roadmap
- Multi-language support
- Support for other LLM providers (Anthropic, Mistral)
- Commit message templates/presets
- VS Code extension
License
MIT © 2025 Your Name
Acknowledgements
- OpenAI – language models
- Simple Git – Git integration
