Writing Git commit messages makes you yawn? 🥱 Here is a tool that will stage/commit/push for you!
In its most basic form, you make changes, run yawn
, and boom – your code is staged (if needed), committed with AI-generated message, and pushed. All in one go!
But "simple" doesn't mean "limited". Under the hood, yawn
is super customizable:
- Tweak the AI prompt or use different Gemini model? ✅
- Automatically stage changes, commit and push? ✅
- Override defaults using environment variables or additional parameters? ✅
- Override config per project? ✅
- Avoid Gemini API limits? ✅
- Sensible defaults? ✅
- Need to push skipping Git hooks (
git push --no-verify
)? You may even force push, if you want. ✅
It really adapts to your workflow, that's why I made it and why it is better than any other Git commit message generator I've tried.
Requires Go 1.24+. Make sure $GOPATH/bin
or $HOME/go/bin
is in your PATH
.
Run: go install github.com/Mayurifag/yawn/cmd/yawn@latest
There are also pre-compiled binaries in packages, yet I am too lazy to write
instructions to install them in Windows, MacOS and Linux. Yeah, those curl
ones.
Pro-tip: alias q="yawn"
is very useful, add it after first tries + config
adaptations and your workflow will be changed forever. 😉
Want to tweak things? yawn
is flexible!
- See all options: Run
yawn --generate-config
to see a commented default configuration file (.yawn.toml
). - Common tweaks:
gemini_model
: Use a different Gemini model.prompt
: Rewrite the instructions for the AI.ask_stage
: Set tofalse
to never stage automatically.auto_push
: Set totrue
to always push after commit.push_command
: Change howyawn
pushes (e.g.,git push --no-verify origin HEAD
).wait_for_ssh_keys
: Set totrue
to make yawn wait until SSH keys are available viassh-add -l
before pushing. Useful for workflows involving tools like KeePassXC where the agent might not have keys immediately. Defaults tofalse
.
Place your customizations in ./.yawn.toml
(project-specific) or ~/.config/yawn/config.toml
(global), or use YAWN_*
environment variables.
By default, yawn
generates commit messages following the Conventional Commits specification, which provides a standardized format for commit messages. This makes your commit history more readable and enables automated tools to parse your commit messages.
Found a bug or have an idea? Issues and Pull Requests are welcome on the GitHub repository!
This project is released into the public domain under The Unlicense. See the LICENSE file for details.
- Remove verbose mode - it is not needed and complicates code
- Add feature to send to fallback model if current model is down for a while (happens with new models)
- Think of better config handling. Current solution is complex. Though I also need source of config, koanf seems missing this functionality. Plus better init file handling.
- Rewrite README.md
- Dockerfile -> release it -> add alias to README.md
- Make installation easier for all OSes (i.e. homebrew installation) and README.md better
- Release 1.0.0 when it will be mature enough
- Change release process makefile command