A tiny CLI tool that uses Claude to generate conventional commit messages from your staged changes. Written in Go <3
Commit is designed to streamline the Git commit process by:
- Analyzing your staged changes
- Using Claude AI to generate a conventional commit message
- Allowing you to accept, edit, or reject the suggestion
- Automatically committing the changes
# Clone the repository
git clone https://github.com/joehewett/commit.git
# Navigate to the commit directory
cd commit
# Install globally
go installMake sure $GOPATH/bin is in your PATH:
# Add to ~/.bashrc or ~/.zshrc
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/binBefore running git add, simply run:
commitThe tool will:
- Analyze your changes
- Generate a conventional commit message
- Present options to accept, edit, or reject the message
- Create the commit if accepted
--debug: Enable debug output
ANTHROPIC_API_KEY: Required. Your Claude API keyEDITOR: Optional. Your preferred editor for message editing (defaults to vim)
- Go 1.22 or higher
- Git
- Anthropic API key
- Write access to the repository
