Claude Auto-Commit is an open-source tool that automatically generates intelligent Git commit messages by analyzing your code changes using Claude Code SDK. It integrates seamlessly into your development workflow with enhanced performance, reliability, and modern JavaScript architecture.
Say goodbye to vague commit messages. Let Claude AI write meaningful commits that tell the story of your code.
⚠️ Important Notes:
- Requires Claude Pro/Max subscription and Claude CLI authentication
- No API key needed - uses Claude Code SDK with OAuth authentication
- Run claude login first if not already authenticated
- By default, this tool will automatically stage all changes and commit
- Use --push flag to enable auto-push to remote repository
- Use --dry-run flag to preview commit messages without committing
Method 1: NPX execution (recommended, no installation needed)
Method 2: NPM global installation
Method 3: Script installation
Method 4: One-time script execution
Claude Auto-Commit uses Claude Code SDK which requires Claude Pro or Max subscription:
After initial login, your authentication is saved and claude-auto-commit will work seamlessly.
- 🧠 AI Analysis: Leverages Claude Code SDK for intelligent code change understanding
- 🌍 Multi-language: Interface available in English and Japanese
- 📝 Conventional Commits: Optional support for conventional commit format
- 😊 Emoji Support: Add contextual emojis to commit messages
- 🔍 Dry Run Mode: Preview commit messages without making actual commits
- 📝 Template System: Save and reuse common commit message patterns
- ⚙️ Configuration: JSON-based configuration file support
- 🔄 Retry Mechanism: Enhanced error handling with exponential backoff
- ⚡ Performance: Parallel processing and intelligent caching
- 🚀 Auto-push: Optional automatic push to remote repository
- 📊 Verbose Logging: Detailed execution metrics and statistics
- 🛠️ Configurable: Extensive customization through CLI options and config files
- 📦 Modern Architecture: Node.js ES modules with TypeScript support
Complete documentation available in this repository.
- Node.js 22.0.0 or later
- Git repository
- ANTHROPIC_API_KEY environment variable
You need a Claude account with API access:
- Claude Pro ($20/month) - Small repositories
- Claude Max ($100/month) - Regular development
- Claude Max ($200/month) - Large projects/teams
Set your API key:
The tool automatically installs:
- Claude Code SDK (@anthropic-ai/claude-code)
- Required Node.js dependencies
Create ~/.claude-auto-commit/config.yml:
- Claude Code SDK Migration: Migrated from Claude CLI to modern Claude Code SDK
- Enhanced performance with parallel processing and intelligent caching
- Exponential backoff retry mechanism for improved reliability
- Template system with persistent storage
- JSON configuration file support
- NPM Package Distribution: Available via npx claude-auto-commit
- OAuth Authentication: No API key required for Claude Pro/Max users
- ES Modules Architecture: Modern JavaScript with Node.js 22+ support
- Smart placeholders: Use {variable} in templates for dynamic values
Contributions are welcome! Please read CONTRIBUTING.md for details.
This project is licensed under the MIT License - see the LICENSE file for details.
- Anthropic for Claude CLI
- Conventional Commits specification
- Open source community for inspiration
Made with ❤️ for the developer community