Generate a commit message and push with AI
headless and scripting
// what it does
grok git commit-and-push stages your changes, writes a commit message from the diff, and pushes to the remote in one command. It accepts the same global flags as grok — -d for the repo path, -m for the model, and --max-tool-rounds to bound the work.
// shell
$ grok git commit-and-push$ grok git commit-and-push --max-tool-rounds 30// gotcha
It commits and pushes without a confirmation step, so stray files in your working tree can be swept into the commit. Stage or stash deliberately first, and run it on a feature branch to avoid pushing straight to main.