Skip to main content

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 config to set provider and model
  • agent commit to 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, port 11434)
  • agent push to 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_KEY or save key in config
  • OpenAI: use OPENAI_API_KEY or 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

  1. Bump version in pyproject.toml and agent.py
  2. Build and validate:
python -m pip install --upgrade build twine
python -m build
python -m twine check dist/*
  1. 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

agent_gitv1-0.1.2.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

agent_gitv1-0.1.2-py3-none-any.whl (13.2 kB view details)

Uploaded Python 3

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

Hashes for agent_gitv1-0.1.2.tar.gz
Algorithm Hash digest
SHA256 e73b2dbced17faa61fe8afc85b3d335cd8fc834557112e11a219b3bee0726533
MD5 c058f39e28c9a8a82d7fcf10d0df6b56
BLAKE2b-256 a06442579b2c208381e6e072867cf4a564283a57a68e9245a4581e3bb87d142c

See more details on using hashes here.

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

Hashes for agent_gitv1-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 7f36012d237d339850e1c58bfeee1249198c311886bab1d54f7fcf73a02ab5e0
MD5 804617ce5eb5f07655f6d5ca52527a9d
BLAKE2b-256 61d74f2e2934463aa1143acf5278a042af0c8102c558ac30edd0e55c128ee9fa

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page