AI-powered Git CLI using MCP + OpenAI, Gemini, or Ollama for commit workflows
Project description
agent-gitv1
AI-powered Git CLI that uses Model Context Protocol (MCP) plus your configured LLM provider to automate commit workflows.
Supported providers:
- Google Gemini
- OpenAI
- Ollama (local or same-network)
Features
agent configto set provider and modelagent committo generate commit messages from git diff- Multiple commit suggestions (
--suggestions) - History-aware commit message generation (uses recent commit subjects)
- Ollama model auto-detection on local network (
/24, port11434) agent pushto push to remote
Prerequisites
- Python 3.10+
uvx(pip install uv)- Git
- Provider credentials (Gemini/OpenAI) or running Ollama server
Installation
cd "d:\Vijay Projects\Agent_bhai"
pip install -e .
After install, use command:
agent --help
Configuration
Start with:
agent config
Provider notes:
- Gemini: use
GEMINI_API_KEYor save key in config - OpenAI: use
OPENAI_API_KEYor save key in config - Ollama: can auto-detect servers like
http://192.168.1.35:11434
Commands
agent --help
Shows all available commands and options.
agent config
Configure provider and model.
agent commit
Stage changes, generate suggestions, choose a message, and commit.
Examples:
agent commit
agent commit --repo /path/to/repo
agent commit --suggestions 3
agent commit --verbose
agent push
Push commits to remote.
Examples:
agent push
agent push --remote origin --branch main
Environment Variables
GEMINI_API_KEY(Gemini)OPENAI_API_KEY(OpenAI)
Publish to PyPI
- Bump version in
pyproject.tomlandagent.py - Build and validate:
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
- Upload:
python -m twine upload dist/*
Project Structure
Agent_bhai/
|- agent.py
|- pyproject.toml
|- README.md
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agent_gitv1-0.1.2.tar.gz.
File metadata
- Download URL: agent_gitv1-0.1.2.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e73b2dbced17faa61fe8afc85b3d335cd8fc834557112e11a219b3bee0726533
|
|
| MD5 |
c058f39e28c9a8a82d7fcf10d0df6b56
|
|
| BLAKE2b-256 |
a06442579b2c208381e6e072867cf4a564283a57a68e9245a4581e3bb87d142c
|
File details
Details for the file agent_gitv1-0.1.2-py3-none-any.whl.
File metadata
- Download URL: agent_gitv1-0.1.2-py3-none-any.whl
- Upload date:
- Size: 13.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f36012d237d339850e1c58bfeee1249198c311886bab1d54f7fcf73a02ab5e0
|
|
| MD5 |
804617ce5eb5f07655f6d5ca52527a9d
|
|
| BLAKE2b-256 |
61d74f2e2934463aa1143acf5278a042af0c8102c558ac30edd0e55c128ee9fa
|