Commit with messages generated by AI
$ icommit
Try read /Users/heyunfei/.icommit.config.json
prompt:
Generate a message of git commit with obeying following descriptions.
Obey following listed rules.
- The message is in ten words at least
- The message should be limited to one line
- The message is written in English
- The message should follow specification of conventional commits
- Your reply should only contains the message
Consider changed files listed below
- README.md
response: {"id":"chatcmpl-6rqoMFLpiOTRbNH6oGezqFm4yLrQW","object":"chat.completion","created":1678292410,"model":"gpt-3.5-turbo-0301","usage":{"prompt_tokens":82,"completion_tokens":12,"total_tokens":94},"choices":[{"message":{"role":"assistant","content":"\n\nfeat: Update README.md with installation instructions and examples"},"finish_reason":"stop","index":0}]}
git commit -m "feat: Update README.md with installation instructions and examples" yescargo install icommit
git clone https://github.com/hyf0/icommit.git
cd icommit
cargo install --path .
Use ICOMMIT_TOKEN=xxxx before running icommit provide Open API token.
You could also provide the token by create a config file, but I haven't decided yet.
Press y or enter to run git commit with messages generated by AI.
Just type
icommit
icommit "Some hints"
Currently, icommit is running in verbose mode and will print all logs.