| Crates.io | gpt_commit |
| lib.rs | gpt_commit |
| version | 0.1.2 |
| created_at | 2023-04-28 17:54:28.390012+00 |
| updated_at | 2023-04-29 03:10:14.314361+00 |
| description | A tool to make ChatGPT create a commit message based on a `git diff`. |
| homepage | |
| repository | https://github.com/shunsuke6/gpt-commit.git |
| max_upload_size | |
| id | 851615 |
| size | 60,584 |
A tool to make ChatGPT create a commit message based on a git diff.
This tool was originally intended for private use and has been modified for public use.
Commit message creation for [conversion-commits]
Making efficient - It is easy to change when there is a log of commit messages that are easy to understand during development, but it is a burden to come up with appropriate names.
Validity - Avoid commit logs full of Add for feature additions, modify or change for changes, and Fix for bug fixes.
Learning - Learning English expression skills, as my first language is not English.
Ask ChatGPT to display three suggestions after choose the actual message to use
GPT-4 recommendation. GPT-3.5 is not very accurate. 1/3 of commits often have commit messages that do not match the changes.
With proper commits, the output of the commit message will be better.
cargo insatll gpt_commit
Put the changes you want to commit into staging and run gpt-commit.
$ gptcommit run
Requesting to ChatGPT...
Please wait a moment.
# Actual result.
# 1
# 2
# 3
Please choose [1-3]
Pick the number of the commit message that you think is a good one from the results of the API.
If you want to commit the entire workspace instead of git diff --cached, use the -n(--no-cached) option.
In this case it will do git commit -am "{choose message}".
gptcommit run -n
gptcommit run --no-cached
以下設定を用意しています。
| item | Content | Options |
|---|---|---|
| api_key | ChatGPT's API key | -a,--api-key |
| language | language of reply (except commit message) | -l,--language |
| url | URL of ChatGPT's API | -u,--url |
| model | model of ChatGPT | -m,--model |
The first time you run it, it will create a config file, so please enter your API key.
$ gptcommit config
Config file is not found
Create a Config file
Enter your ChatGPT API Key
{your API_Key}
Defaults are set the first time, so use the cofing command to set them if necessary.
gptcommit config -l Japanese
# Can be run without having to specify it
$ gptcommit config -l
Please enter language
> Spanish
MIT
shunsuke6