AI-powered Git commit assistant that intelligently analyzes your code changes and generates clear, concise, and context-aware commit messages using Google's Gemini AI.
- Intelligent Grouping - Automatically groups related file changes into logical commits
- Smart Analysis - Understands code changes and generates contextual commit messages
- Dynamic Timeouts - Smart timeout calculations based on file size, changes, and complexity
- Intelligent Fallbacks - Summary messages for large files, lock files, and build artifacts
- Security-First - Path validation, input sanitization, and secure API key handling
- Fast & Reliable - Optimized performance with retry logic and error recovery
- Node.js 22.0.0+
- Gemini AI API key
# Install globally from npm
npm install -g @sojanvarghese/commit-x# Interactive setup
cx setup
# Or set API key directly
export GEMINI_API_KEY="your_api_key_here"# Process files with AI-powered intelligent grouping (recommended)
cx
# Stage all files and commit together (also uses AI grouping)
cx commit --all
# Preview commits without executing
cx commit --dry-run| Command | Description |
|---|---|
cx |
Process files with AI-powered intelligent grouping |
cx commit --all |
Stage all files and commit together (uses AI grouping) |
cx commit --dry-run |
Preview commits without executing |
cx commit -m "message" |
Use custom commit message |
cx commit --all --interactive |
Interactive mode for traditional workflow |
cx status |
Show repository status |
cx diff |
Show unstaged changes summary |
cx config |
View configuration |
cx config set <key> <value> |
Set configuration value |
cx config reset |
Reset configuration to defaults |
cx setup |
Interactive setup |
cx privacy |
Show privacy settings and data handling information |
cx debug |
Debug repository detection |
cx help-examples |
Show usage examples |
# View current configuration
cx config
# Set configuration values
cx config set model gemini-2.0-flash-lite
# Reset to defaults
cx config reset| Option | Type | Default | Description |
|---|---|---|---|
apiKey |
string | - | Gemini AI API key (use environment variable) |
model |
string | gemini-2.0-flash-lite |
AI model to use |
- Google Gemini AI for the AI capabilities
- Simple Git for Git operations
- Commander.js for CLI interface