https://github.com/mitjafelicijan/lazycommit
Git commit messages for lazy people that use AI in the backend.
https://github.com/mitjafelicijan/lazycommit
ai commit git winc
Last synced: 2 months ago
JSON representation
Git commit messages for lazy people that use AI in the backend.
- Host: GitHub
- URL: https://github.com/mitjafelicijan/lazycommit
- Owner: mitjafelicijan
- License: bsd-2-clause
- Created: 2025-03-17T23:01:13.000Z (over 1 year ago)
- Default Branch: master
- Last Pushed: 2025-04-08T18:41:42.000Z (about 1 year ago)
- Last Synced: 2025-06-20T10:08:19.621Z (about 1 year ago)
- Topics: ai, commit, git, winc
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Git commit messages for lazy people
You feed it a verbose commit status and it will spit out commit message via
OpenAI API.
## Install
```console
go install github.com/mitjafelicijan/lazycommit
```
Then you need to put OpenAI API key in somewhere so it's accessible in your
shell. I put mine in `.bashrc` file with `export OPENAI_API_KEY=""`.
You can then test it with:
```console
echo "My diff" | lazycommit
```
## Usage
If you try to commit with `git commit --verbose` this will open up your default
terminal editor and also provide diffs of your changes.
You can also provide a setting in your `.gitconfig` and this way you will not
be required to provide verbose flag each time.
```gitconfig
[commit]
verbose = true
```
## Use in VIM
If your default editor is VIM and when Git asks you for commit message you can
then execute the command below at the top of the buffer you will get back the
commit message from LLM.
To try a different message just undo the change and try executing command again.
```vimrc
:r !< % lazycommit
```
You could keybind this like this (Leader gc).
```vimrc
nnoremap gc :r !< % lazycommit
```
## Ideas
- Add local model suppor through Ollama.
- Add Anthropic Claude support.
## Shoutout to
- [Commit Message Writer's Block? Here's the Cure](https://www.youtube.com/watch?v=cxapgvGkOJY)