iacp is a Go-based CLI tool that automates the standard Git workflow (add, commit, pull, push) while using local or cloud-based AI models to generate meaningful commit messages based on your current changes.
- Multi-Provider AI Support:
- llama.cpp: Run local GGUF models via
llama-cli. - Ollama: Seamlessly use models from your local Ollama instance.
- AI-gatiator: Access free cloud models (Gemini, Llama, Minimax, etc.) via a local gateway.
- llama.cpp: Run local GGUF models via
- TUI Model Selector: Run
iacp -sto select your preferred AI provider and model using a beautiful terminal interface (Bubble Tea). - Context Awareness: Displays model context limits and warns you if your
git diffmight exceed them, suggesting alternative models. - Diff Preview: Shows your staged changes before processing, so you know exactly what the AI is describing.
- Interactive Review: Opens a built-in TUI editor (Bubble Tea) to refine the generated message before committing.
- Fast Mode: Use the
-fflag to bypass the editor and commit/push instantly (enforces a 10-character minimum). - Safety First: Supports
Ctrl+Cto gracefully terminate AI generation and sub-processes.
- Go (to build from source)
llama.cpp(for local GGUF support)Ollama(optional, for Ollama support)AI-gatiator(optional, for free cloud models)
git clone <repository-url>
cd iacp
go build -o iacp main.go
mkdir -p ~/bin
cp iacp ~/bin/iacp
chmod +x ~/bin/iacpMake sure ~/bin is in your $PATH.
The first time you use iacp, or when you want to switch providers, run:
iacp -sThis will scan for local GGUF models, Ollama models, and query the Gatiator API (at localhost:1313) to build a list for you.
iacp- Stages all changes (
git add -A .). - Shows the diff.
- Generates a suggested commit message using your selected AI.
- Opens a TUI editor for review.
- After confirming the message, it runs
git commit,git pull, andgit push.
iacp -f- Skips the editor step.
- Automatically commits if the generated message is at least 10 characters long.
- Useful for quick, straightforward updates.
Settings are stored in JSON format at:
~/.config/iacp/config.json
The project includes a test suite to verify core logic like message cleaning and validation:
cd iacp
go test -vMIT