Implemented a comprehensive AI-powered commit message generator using Claude that: - Automatically generates Conventional Commit formatted messages - Analyzes git diff to create context-aware commit messages - Works globally across all git repositories with 'git cc' command - Supports multi-computer setup through portable dotfiles Major changes: - Added global claude-commit script with git aliases (git cc, git smart-commit) - Created organized documentation in docs/tools/claude-commit/ - Included portable dotfiles structure for easy multi-machine deployment - Updated README with TLDR Node.js quickstart section featuring all Brainy capabilities - Moved documentation section to bottom of README for better flow - Added CLAUDE.md with project-specific instructions for Claude Code The tool eliminates manual commit message writing by leveraging AI to understand code changes and generate properly formatted, meaningful commit messages that follow the Conventional Commits specification.
2.4 KiB
2.4 KiB
Dotfiles - Claude Commit Setup
This repository contains my development environment configuration, including the Claude AI-powered git commit message generator.
Quick Setup
Option 1: One-Line Install (Recommended)
curl -sSL https://raw.githubusercontent.com/yourusername/dotfiles/main/install.sh | bash
Option 2: Manual Install
# Clone the repository
git clone https://github.com/yourusername/dotfiles.git ~/dotfiles
# Run the setup script
cd ~/dotfiles
./install.sh
Option 3: Just Claude Commit
If you only want the git cc command:
# Download and run the setup script
curl -sSL https://raw.githubusercontent.com/yourusername/dotfiles/main/setup-claude-commit.sh | bash
What's Included
Claude Commit (git cc)
An AI-powered git commit message generator that:
- Analyzes your git diff
- Generates Conventional Commit formatted messages
- Works in any git repository
- No configuration needed
Usage:
# Make your changes
git cc # Claude generates the commit message
Syncing Between Computers
First Time Setup (on new computer)
- Run the install script (see Quick Setup above)
- That's it! The
git cccommand is now available
Keeping in Sync
To update to the latest version on any computer:
sync-claude-commit
Or manually:
curl -sSL https://raw.githubusercontent.com/yourusername/dotfiles/main/bin/claude-commit > ~/.local/bin/claude-commit
chmod +x ~/.local/bin/claude-commit
File Structure
dotfiles/
├── README.md # This file
├── install.sh # Main installation script
├── setup-claude-commit.sh # Standalone claude-commit installer
└── bin/
└── claude-commit # The actual claude-commit script
Requirements
- Git
- Claude CLI (
claudecommand) - Bash or Zsh
Conventional Commit Format
The tool generates messages following this format:
<type>(<scope>): <description>
<body>
<footer>
Types: feat, fix, docs, style, refactor, perf, test, build, ci, chore
Troubleshooting
"claude: command not found"
Make sure Claude CLI is installed:
# Install Claude CLI if not present
# Visit: https://claude.ai/code
"git cc: command not found"
Make sure ~/.local/bin is in your PATH:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
License
MIT