Skip to content

grit-msg is a fast cross-platform Rust CLI that uses Groq to generate high-quality Conventional Commit messages from staged git diffs

Notifications You must be signed in to change notification settings

besingamkb/grit-msg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

grit-msg

grit-msg is a fast cross-platform Rust CLI that generates Conventional Commit messages from staged Git diffs using the Groq API.

Features

  • Reads staged changes with git diff --cached
  • Summarizes large diffs to fit model context limits
  • Interactive safety prompt: y / n / copy
  • Copies generated message to clipboard (copy)
  • Secure key storage with keyring, plus resilient local fallback

Requirements

Install (No Rust Required)

macOS / Linux:

curl -fsSL https://raw.githubusercontent.com/besingamkb/grit-msg/main/install.sh | bash

Windows (PowerShell):

irm https://raw.githubusercontent.com/besingamkb/grit-msg/main/install.ps1 | iex

Optional version pin:

VERSION=v0.1.1 curl -fsSL https://raw.githubusercontent.com/besingamkb/grit-msg/main/install.sh | bash

If grit-msg is not found after install, add the bin directory to PATH:

macOS / Linux:

export PATH="$HOME/.local/bin:$PATH"
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc
source ~/.zshrc

Windows (PowerShell, then restart terminal):

setx PATH "$([Environment]::GetEnvironmentVariable('Path','User'));$HOME\.local\bin"

Release archives are published automatically when a tag like v0.1.0 is pushed.

Build

cargo build --release --locked

Binary:

target/release/grit-msg

Usage

grit-msg

Options:

grit-msg --model llama-3.3-70b-versatile --diff-token-budget 6000
grit-msg --clear-aiapi-keys
grit-msg --with-watermark

Notes:

  • If no staged changes exist, the tool exits with an error.
  • --clear-aiapi-keys removes stored keys from keyring + fallback files.
  • GROQ_API_KEY environment variable is supported and takes precedence.
  • --with-watermark appends a final watermark line only when committing with y/yes (not shown in preview/copy output).

Development

cargo fmt --all
cargo check
cargo test

Maintainer Release

git tag v0.1.0
git push origin v0.1.0

About

grit-msg is a fast cross-platform Rust CLI that uses Groq to generate high-quality Conventional Commit messages from staged git diffs

Resources

Stars

Watchers

Forks

Packages

No packages published