Skip to content

A simple commit script to auto-generate commit messages

Notifications You must be signed in to change notification settings

joehewett/commit

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Commit

A tiny CLI tool that uses Claude to generate conventional commit messages from your staged changes. Written in Go <3

example

Overview

Commit is designed to streamline the Git commit process by:

  1. Analyzing your staged changes
  2. Using Claude AI to generate a conventional commit message
  3. Allowing you to accept, edit, or reject the suggestion
  4. Automatically committing the changes

Installation

Using Go Install (Recommended)

# Clone the repository
git clone https://github.com/joehewett/commit.git

# Navigate to the commit directory
cd commit

# Install globally
go install

Make sure $GOPATH/bin is in your PATH:

# Add to ~/.bashrc or ~/.zshrc
export GOPATH=$HOME/go
export PATH=$PATH:$GOPATH/bin

Usage

Before running git add, simply run:

commit

The tool will:

  1. Analyze your changes
  2. Generate a conventional commit message
  3. Present options to accept, edit, or reject the message
  4. Create the commit if accepted

Flags

  • --debug: Enable debug output

Environment Variables

  • ANTHROPIC_API_KEY: Required. Your Claude API key
  • EDITOR: Optional. Your preferred editor for message editing (defaults to vim)

Requirements

  • Go 1.22 or higher
  • Git
  • Anthropic API key
  • Write access to the repository

About

A simple commit script to auto-generate commit messages

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages