Skip to content

pocketcowboy/autocm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Automatic Commit Message Generator (autocm)

Generates commit messages based on git diffs using the Gemini API.

Prerequisites

Installation

go install github.com/pocketcowboy/autocm@latest

Make sure that your Go bin directory is in your system's PATH. The Go bin directory is typically located at $HOME/go/bin. You can add it to your PATH by adding the following line to your shell's configuration file (e.g., ~/.bashrc, ~/.zshrc):

export PATH=$PATH:$HOME/go/bin

Usage

Set your Gemini API key as an environment variable:

# Add this line to your shell's configuration file (e.g., `~/.bashrc`, `~/.zshrc`).
export GEMINI_API_KEY="YOUR_API_KEY"

Generate a commit message:

git diff --staged | autocm

Copy the commit message to the clipboard (macOS):

git diff --staged | autocm | pbcopy

Insert the commit message inside Vim:

:r!git diff --staged | autocm

About

Commit message generator using Gemini

Resources

Stars

Watchers

Forks

Packages

No packages published