#ai #commit-message #git-commit #git #ai-powered #productivity #nlp

bin+lib commit_crafter

AI powered tool for Git commit message generator

6 releases

0.1.5 Sep 2, 2024
0.1.4 Jul 20, 2024
0.1.3 May 20, 2024

#1705 in Development tools

Download history 3/week @ 2024-05-30 2/week @ 2024-06-06 136/week @ 2024-07-18 11/week @ 2024-07-25 131/week @ 2024-08-29 21/week @ 2024-09-05 1/week @ 2024-09-12

153 downloads per month

MIT license

23KB
450 lines

Commit Crafter

Installation

cargo install --locked commit_crafter

In the git project, install the prepare-commit-msg hook and set up the OpenAI API key to use it. If it is the first time installing and using it.

commit_crafter install

After executing the installation command, you must first set up a key in order to use it normally.

commit_crafter config set openai_api_key <your key>

Options

// openai api key
commit_crafter config set openai_api_key <your key>

// openai url
commit_crafter config set openai_url <your url>

// openai model
commit_crafter config set openai_model <your model>

// prompt language
commit_crafter config set user_language <your language>

// get config options
commit_crafter config get <option>

// get all config options
commit_crafter config list

Language List:

Language Code
English en
Japanese jp
简体中文 zh
繁体中文 zh_tw

The default file path is $HOME/.config/commit_crafter/config.toml

Usage

After correctly installing the hook, execute "git commit -a" in the git project. In the temporary Vim editor interface that opens, there will be generated commit information. The prerequisite is that all files have been staged for commit.

# prerequisites
git add . // or git add <file>

git commit -a

Configuration

To Do

  • Add more options to customize the commit message
  • Support more AI models
  • Support more languages
  • Add more tests
  • Improve README.md

Dependencies

~9–22MB
~334K SLoC