feat(tools): add claude-commit AI-powered git commit tool
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.
This commit is contained in:
parent
ab0ee4d4ad
commit
d2cef55644
10 changed files with 1565 additions and 1797 deletions
67
docs/tools/claude-commit/dotfiles/install.sh
Executable file
67
docs/tools/claude-commit/dotfiles/install.sh
Executable file
|
|
@ -0,0 +1,67 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Master installation script for dotfiles
|
||||
# This installs all dotfiles including claude-commit
|
||||
|
||||
set -e
|
||||
|
||||
# Colors
|
||||
RED='\033[0;31m'
|
||||
GREEN='\033[0;32m'
|
||||
YELLOW='\033[1;33m'
|
||||
BLUE='\033[0;34m'
|
||||
NC='\033[0m'
|
||||
|
||||
echo -e "${BLUE}==================================${NC}"
|
||||
echo -e "${BLUE} Dotfiles Installation${NC}"
|
||||
echo -e "${BLUE}==================================${NC}"
|
||||
echo ""
|
||||
|
||||
# Get the directory of this script
|
||||
if [[ -n "$BASH_SOURCE" ]]; then
|
||||
DOTFILES_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
else
|
||||
# Fallback for when script is piped from curl
|
||||
DOTFILES_DIR="$HOME/dotfiles"
|
||||
|
||||
# Clone the repository if it doesn't exist
|
||||
if [[ ! -d "$DOTFILES_DIR" ]]; then
|
||||
echo -e "${YELLOW}Cloning dotfiles repository...${NC}"
|
||||
git clone https://github.com/yourusername/dotfiles.git "$DOTFILES_DIR"
|
||||
fi
|
||||
fi
|
||||
|
||||
# Install claude-commit
|
||||
echo -e "${YELLOW}Installing claude-commit...${NC}"
|
||||
if [[ -f "$DOTFILES_DIR/setup-claude-commit.sh" ]]; then
|
||||
bash "$DOTFILES_DIR/setup-claude-commit.sh"
|
||||
elif [[ -f "$DOTFILES_DIR/bin/claude-commit" ]]; then
|
||||
# Direct installation from bin directory
|
||||
mkdir -p ~/.local/bin
|
||||
cp "$DOTFILES_DIR/bin/claude-commit" ~/.local/bin/
|
||||
chmod +x ~/.local/bin/claude-commit
|
||||
|
||||
# Set up git aliases
|
||||
git config --global alias.cc '!~/.local/bin/claude-commit'
|
||||
git config --global alias.smart-commit '!~/.local/bin/claude-commit'
|
||||
|
||||
echo -e "${GREEN}✓ claude-commit installed${NC}"
|
||||
else
|
||||
echo -e "${RED}✗ claude-commit script not found${NC}"
|
||||
fi
|
||||
|
||||
# Add more dotfiles installations here as needed
|
||||
# For example:
|
||||
# echo -e "${YELLOW}Installing vim configuration...${NC}"
|
||||
# ln -sf "$DOTFILES_DIR/vimrc" ~/.vimrc
|
||||
|
||||
echo ""
|
||||
echo -e "${GREEN}==================================${NC}"
|
||||
echo -e "${GREEN} Installation Complete!${NC}"
|
||||
echo -e "${GREEN}==================================${NC}"
|
||||
echo ""
|
||||
echo -e "${BLUE}Installed tools:${NC}"
|
||||
echo -e " • git cc (claude-commit)"
|
||||
echo ""
|
||||
echo -e "${YELLOW}Please restart your terminal or run:${NC}"
|
||||
echo -e " source ~/.bashrc (or ~/.zshrc for Zsh)"
|
||||
Loading…
Add table
Add a link
Reference in a new issue