AI-powered commit message generator using Claude Code CLI. A variant of bunnai that uses Claude instead of OpenAI.
- Zero config - Uses Claude Code CLI's existing authentication
- High-quality output - Generates one focused commit message with option to regenerate
- Conventional commits - Follows the Conventional Commits specification
- Lazygit integration - One-command install for lazygit custom commands
- Node.js 18+ installed
- Claude Code CLI installed and authenticated
# Install globally from npm
npm install -g claude-lazygit
# Or with bun
bun install -g claude-lazygitgit clone https://github.com/godlyfast/claude-lazygit.git
cd claude-lazygit
bun install
bun run build
npm link# Stage your changes first
git add .
# Generate commit message
claude-lazygit
# Options
claude-lazygit --verbose # Enable verbose outputThe tool generates one high-quality commit message. You can then:
- Accept - Use the message
- Regenerate - Generate a new message
- Cancel - Exit without committing
# Automatically configure lazygit (interactive)
claude-lazygit install
# Skip confirmation prompt
claude-lazygit install -yThis adds a custom command to lazygit. Press Ctrl+A in the files panel to generate AI commit messages.
If you prefer to configure manually, add to ~/.config/lazygit/config.yml:
customCommands:
- key: "<c-a>"
description: "Generate AI commit message"
context: "files"
command: "claude-lazygit"
subprocess: true- Gets the staged diff using
git diff --cached - Sends diff to Claude Code CLI with optimized prompt for conventional commits
- Displays the generated commit message
- Allows accept, regenerate, or cancel
- Outputs the accepted message to stdout
| Command | Description |
|---|---|
claude-lazygit |
Generate commit messages for staged changes |
claude-lazygit install |
Install lazygit integration (interactive) |
claude-lazygit install -y |
Install lazygit integration without confirm |
claude-lazygit uninstall |
Remove lazygit integration (interactive) |
claude-lazygit uninstall -y |
Remove lazygit integration without confirm |
claude-lazygit --help |
Show help |
| Option | Alias | Default | Description |
|---|---|---|---|
--verbose |
-v |
false | Enable verbose output |
MIT