AI-powered Git CLI using MCP + OpenAI, Gemini, or Ollama for commit workflows
Project description
agent-gitv1
AI-powered Git CLI for commit workflows using MCP plus your chosen LLM provider.
Supported providers:
- Google Gemini
- OpenAI
- Ollama (local or same-network)
Quick Start
- Install:
pip install agent-gitv1
- Configure provider/model:
agent config
- Use it in any git repository:
agent commit
agent explain
agent push
Features
- Provider setup with
agent config - Smart staging with auto-grouping (UI/backend/config/etc.)
- Multi-suggestion commit messages (
--suggestions) - Repo-aware commit style learning (recent commits)
agent explainfor change summary, intent, and risk areas- Ollama local-network detection (same
/24, port11434) - Loading/thinking spinner during long-running tasks
agent pushwith live command output streaming- LLM-driven push-failure diagnosis with adaptive live git evidence collection
Requirements
- Python 3.10+
- Git
uvx(pip install uv)- Provider credentials (Gemini/OpenAI) or running Ollama server
Install
pip install agent-gitv1
Verify:
agent --version
agent --help
Configure
agent config
Provider notes:
- Gemini: set
GEMINI_API_KEYor enter key in config - OpenAI: set
OPENAI_API_KEYor enter key in config - Ollama: can auto-detect endpoints like
http://192.168.1.35:11434
Commands
agent config
Configure LLM provider and model.
agent commit
Smart-stage changes, generate repo-aware suggestions, choose messages, and commit.
Examples:
agent commit
agent commit --suggestions 3
agent commit --no-smart-stage
agent commit --repo /path/to/repo
agent commit --verbose
agent explain
Explain current uncommitted changes:
- what changed
- why it likely changed
- risk areas
- files impacted
Examples:
agent explain
agent explain --repo /path/to/repo
agent push
Push to remote with live output.
Examples:
agent push
agent push --remote origin --branch main
When --branch is omitted, agent auto-detects and pushes your current local branch name.
If push fails, agent first uses the LLM to choose evidence depth, then runs diagnosis commands live.
For divergence/history problems it collects full branch evidence (fetch, logs, ahead/behind, merge-base).
For auth/permission issues it uses a lightweight evidence set to avoid noisy output.
If the current branch has no upstream, agent offers to run git push --set-upstream automatically.
agent --help
Show all commands and options.
Environment Variables
GEMINI_API_KEYOPENAI_API_KEY
Developer Setup (optional)
Only for contributors working on this codebase:
git clone <repo-url>
cd Agent_bhai
pip install -e .
Publish to PyPI
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
python -m twine upload dist/*
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.4.tar.gz.
File metadata
- Download URL: agent_gitv1-0.1.4.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ac73a4cc4cb43cb45eb2a523aff1c594e816f616bb6f97814f174c2ef72b2454
|
|
| MD5 |
923b3999602c9b04e6bec71b0360292c
|
|
| BLAKE2b-256 |
369fc9f54f45767d2ad548f859a0324a1ab5419f853ed7a47ba0cd7998e11ee6
|
File details
Details for the file agent_gitv1-0.1.4-py3-none-any.whl.
File metadata
- Download URL: agent_gitv1-0.1.4-py3-none-any.whl
- Upload date:
- Size: 20.6 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 |
4fa9b0c9c089e396fd6e8d6576d5aa6fd56e6c2838a01b90f0e4eb33880b4521
|
|
| MD5 |
97f6858cafb80bbcfd7b2727980f0fa5
|
|
| BLAKE2b-256 |
e3f09c50916141b7e60233e24bc6d009129299ccfa7d443c7ed659f194d8dff0
|