Stop explainingyour codeto Git.
autocommit-cli reads your changes and writes meaningful commit messages automatically — so you can focus on what actually matters: shipping code.
███Features
Logical Grouping
Intelligently groups code changes into logical commits (feat, fix, refactor, etc.) for a cleaner history.
AI-Powered Messages
Generates high-quality, context-aware commit messages using advanced AI (Gemini API).
Learns Your Style
Adapts to your past commit history and project guidelines for consistent messaging.
Automated & Safe
Automates staging, committing, and safely pushing to the correct remote branch.
Review & Edit
Offers an optional interactive mode to review and quickly edit proposed commit messages.
CI/CD Ready
Easy installation across platforms and reliable, non-interactive execution in CI/CD pipelines.
About autocommit-cli
autocommit-cli is an AI-powered Git automation tool designed to eliminate the friction of Git workflows. It intelligently detects code changes, groups them into logical commits, and generates high-quality commit messages automatically.
Problem: Deciding what belongs in a commit, writing accurate messages, and maintaining consistency are tedious. Existing tools fall short, offering only partial solutions or requiring too much interaction.
Our Goal: To fully automate Git commits smartly and safely, learn from past commits and guidelines, provide optional human review, and be trivial to install on any platform, working reliably in local dev and CI/CD.
Key Differentiators: Unlike other tools, autocommit-cli offers logical commit grouping, learns from your commit history and guidelines, provides fully automated pushes, and allows instant review/accept.
Future Updates
We are continuously working to improve autocommit-cli. Here's a sneak peek at what's coming next:
Easy Installation
Homebrew, PowerShell/Scoop/Winget, single binary, npm/pip (via wrapper), VS Code Extension.
Intelligent Classification
Advanced language-aware heuristics and learned patterns for change classification.
Continuous Learning
Continuously improves commit quality based on past commits and project guidelines.
Commit Guide Awareness
Automatically detects and adheres to project-specific commit guidelines.
PR Creation
Future integration for automated Pull Request creation.
IDE Integrations
Native integrations with popular IDEs like VS Code and IntelliJ.
Try autocommit-cli Now!
Get started with autocommit-cli in minutes. Follow these simple steps to integrate AI-powered commit messages into your workflow.
Prerequisites
- Go (version 1.18 or higher recommended)
- Git (installed and configured)
- Gemini API Key: Obtain a free API key from Google AI Studio. Set it as an environment variable `GEMINI_API_KEY` or in a `.env` file.
Installation from Source (Development)
# Clone the repository
$ git clone https://github.com/urstruelysv/autocommit-cli.git
$ cd autocommit-cli
# Set up API Key (Option 1: Export as environment variable)
$ export GEMINI_API_KEY="YOUR_GEMINI_API_KEY"
# OR (Option 2: Create a .env file)
$ echo 'GEMINI_API_KEY="YOUR_GEMINI_API_KEY"' > .env
# Then load it (e.g., using a tool like `direnv` or manually `source .env`)
# Run the application
$ go run cmd/autocommit-cli/main.goBuilding and Installing the Executable
# Clone the repository
$ git clone https://github.com/urstruelysv/autocommit-cli.git
$ cd autocommit-cli
# Run the build script
$ chmod +x build.sh
$ ./build.shThis will build the application and install it in your `/usr/local/bin` directory.
CLI Usage
When you run the application, you will be prompted to select a mode of operation:
$ autocommit-cli
Select a mode to run autocommit-cli (default: AI-Commit):
1. AI-Commit (default) - Use AI to generate commit messages.
2. Normal - Create commits without AI.
3. Review - Inspect commits before they are made.
4. No-push - Create commits but do not push them to the remote repository.
5. CI - Non-interactive, deterministic execution for CI environments.
6. Verbose - Enable verbose output for debugging purposes.
Enter your choice (1-6, or press Enter for default):For non-interactive environments like CI/CD pipelines, you can use the `--ci` flag:
$ autocommit-cli --ciDocumentation & Support
Dive deeper into autocommit-cli with our comprehensive documentation. The project is currently in active development, and you can find the latest information and support on our GitHub repository.