Skip to content

JinUng41/gemini-commit-generator

Repository files navigation

gemini-commit-generator 🤖

gcg is a cross-platform AI commit assistant for git repositories. It reads your staged changes, recent commit history, and current branch context, then drafts a commit message with the Gemini CLI.

English | 한국어

Prerequisites

  1. Node.js 18+
  2. Gemini CLI installed and available as gemini
  3. Gemini CLI authentication completed once in your terminal

Install

npm install -g @devjinung41/gemini-commit-generator

Quick Start

  1. Stage the files you want in the commit.
git add path/to/file
  1. Run gcg inside the git repository.
gcg
  1. If no default language is saved yet, choose a language.

You can save one for later with:

gcg config
  1. Optionally add extra context, then select one of:
  • Commit
  • Regenerate
  • Edit to open your editor and commit immediately if the edited message is valid
  • Cancel

What To Expect

  • gcg uses staged changes only by default.
  • You can save a default language in ~/.config/gcg/settings.json with gcg config.
  • Use gcg help for a short command summary.
  • If you want it to stage everything automatically, create .gcgrc.json at the git root and set autoStage to true.
  • Branch safety checks are enabled by default.
  • If Gemini returns unusable output, gcg retries once automatically.

Docs

License

MIT

About

Commit message generator using gemini-cli

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors