smart-git-commit
Version:
AI-powered smart commit message generator for Git diffs.
68 lines (40 loc) • 1.32 kB
Markdown
# smart-git-commit
> **AI-powered commit message generator for your Git diffs.**
> Smart, concise, Conventional Commits ready.
## 📦 Installation
```bash
npm install -g smart-git-commit
```
## Usage
```bash
git add .
smart-git-commit
```
It will analyze your staged changes and suggest a commit message like:
```bash
💡 Suggested commit message:
feat(auth): added JWT validation middleware
Use this message? (Y/n)
```
## OpenAI API Key Required
This CLI uses OpenAI's API to generate commit message suggestions.
You need an OpenAI API Key to use AI-powered suggestions.
### First-time Setup:
When you run it the first time, it will ask for your API Key and save it securely.
If you don't want to use AI suggested feature just put anything in place of the keys
## To manually set or update API Key:
```bash
smart-git-commit config --api-key
```
> Note: This only supports OpenAI API Keys (https://platform.openai.com/api-keys) for AI suggestions.
> More update coming soon
### ✨ Features
- AI/Smart Commit Suggestions using OpenAI.
- Conventional Commit Format (feat(scope): message, fix(scope): message).
- Supports manual edit flow.
- API Key management.
- Works with staged git diffs only (git add . required).
- other flags coming soon
### 📄 License
MIT © 2025 Raushan Raj