Package Exports
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (gpt-auto-commit) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
GPT Auto Commit
A cute little CLI tool that uses openai/gpt-5-mini to ✨automatically✨ generate commit messages.
Features
- One command, instant commit messages
- Edit a message in interactive mode
- Only checks staged changes
- Follows Conventional Commits to make you look good
- Clean, colorful CLI for smooth workflow
- Progress bars so you're never left hanging
Installation
npm install -g gpt-auto-commit
API Key & Pricing
This tool requires an OpenAI API key to function. Here's what you need to know:
- Sign up for an OpenAI account
- Create a new API key
Also just a heads up that this does cost money:
Setup
Before using the tool, you gotta configure your OpenAI API key:
gpt-auto-commit config --key YOUR_OPENAI_API_KEY
# or use the shorthand
gpc config --key YOUR_OPENAI_API_KEY
Model Configuration
You can also configure which OpenAI model to use. The default is gpt-4o-mini
(cheapest option), but you can change it:
# Set a different model
gpc config --model gpt-4o
gpc config --model gpt-3.5-turbo
# Set both API key and model at once
gpc config --key YOUR_API_KEY --model gpt-4o
# View current configuration
gpc config
Available models:
A list of models can be found here.
Usage
Quick Commit (Recommended)
Run gpc
in your git repository to automatically generate and commit your changes:
gpc
This will:
- Analyze your staged changes
- Generate a commit message
- Automatically commit with the generated message
Interactive Mode
If you want to review or edit the commit message before committing:
gpc generate
This will:
- Generate a commit message
- Give you options to:
- Press
c
to commit as is - Press
e
to edit the message - Press
q
to quit without committing
- Press
Commands
All commands can be used with either gpt-auto-commit
or the shorthand gpc
:
gpc
- Quick generate and commit (default)gpc generate
- Interactive mode with edit optionsgpc config --key <key>
- Set your OpenAI API keygpc config --model <model>
- Set your OpenAI modelgpc config
- View current configurationgpc --help
- Show help information