gcommit-ai

0.1.1 • Public • Published

gcommit-ai

npm version license

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 .gcommitrc or environment variables
  • 🖥️ Cross-platform (Windows, macOS, Linux)
  • ⚡ Optional --auto flag 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 --auto

Installation

npm i -g gcommit-ai

Configuration

First-time users will be prompted for an OpenAI API key:

gcommit config

or 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_KEY
  • GCOMMIT_MODEL
  • GCOMMIT_LANG
  • GCOMMIT_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 info

Contribution

  1. Fork the repo and create a feature branch.
  2. Run npm install and npm run build.
  3. 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

Readme

Keywords

none

Package Sidebar

Install

npm i gcommit-ai

Weekly Downloads

125

Version

0.1.1

License

MIT

Unpacked Size

30.2 kB

Total Files

20

Last publish

Collaborators

  • kingsley_developer