https://github.com/laststance/git-gpt-commit
An AI-powered Git extension that generates commit messages using OpenAI's gpt-4-turbo-preview, streamlining the commit process and improving developer productivity.
https://github.com/laststance/git-gpt-commit
git npm-package openai-api
Last synced: 6 months ago
JSON representation
An AI-powered Git extension that generates commit messages using OpenAI's gpt-4-turbo-preview, streamlining the commit process and improving developer productivity.
- Host: GitHub
- URL: https://github.com/laststance/git-gpt-commit
- Owner: laststance
- Created: 2023-09-09T13:04:11.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-15T11:30:10.000Z (almost 2 years ago)
- Last Synced: 2024-11-29T08:46:56.088Z (over 1 year ago)
- Topics: git, npm-package, openai-api
- Language: JavaScript
- Homepage:
- Size: 7.22 MB
- Stars: 3
- Watchers: 2
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
> [!WARNING]
> Latest version not working at the time. Please download `v0.9.10`
Git GPT Commit
An AI-powered Git extension that generates commit messages using OpenAI's models,
streamlining the commit process and improving developer productivity.
📺 [Demo Video](https://www.youtube.com/watch?v=-0iVFHxXawo)
📖 [v0.9.0 Release Post](https://dev.to/malloc007/ive-just-released-git-gpt-commit-v090-13of)
## Installation
There are two ways to install the Git extension: using npm or manual installation.
- **Step1:** run the following command:
```bash
npm install -g @laststance/git-gpt-commit@0.9.10
```
- **Step2:** add your OpenAI API key using the `git gpt open-api-key`
```bash
git gpt open-api-key
```

---
Select `Add or update API key` from the menu and enter your API key when prompted. Your key will be securely stored in your user configuration.
- **Step3:** commit your changes with `git gpt commit`
```bash
git add --all
git gpt commit // generate commit message with AI
```
✅ You've completed all setup!
### Available Commands
- **Commit with AI-generated message**
```bash
git gpt commit
```
Generates a commit message based on your staged changes.
- **Select AI Model**
```bash
git gpt model
```
Choose from available models (gpt-4o, gpt-3.5-turbo-instruct, gpt-4-turbo, gpt-4).
- **Change Commit Message Language**
```bash
git gpt lang
```
Select the language for commit messages (English, Spanish, Japanese, French, German, Italian, Korean, Chinese, Dutch, Russian, Portuguese).
- **Toggle Commit Prefix**
```bash
git gpt prefix
```
Enable/disable conventional commit prefixes (feat:, fix:, chore:, etc.).
- **Manage OpenAI API Key**
```bash
git gpt open-api-key
```
Add, update, display, or delete your stored OpenAI API key.
- **Show Current Configuration**
```bash
git gpt config
```
Display your current settings (model, language, prefix status, API key).
### Configuration
Your settings are stored in `~/.git-gpt-commit-config.json` and automatically loaded when you use the extension. You can manage your configuration through the commands above or directly edit this file.
## Credits
> Original package doesn't work due to config mistake 'package.json'. https://github.com/nooqta/git-commit-gpt
> Therefore I fix it and added some features as a '@laststance/git-gpt-commit'.
Thanks to
- Author of [original package](https://github.com/nooqta/git-commit-gpt)
## License
This project is licensed under the MIT License.