Skip to main content

GitMate - AI Git Assistant for Terminal

Project description

🧠 GitMate — AI Git Terminal Assistant

GitMate is a terminal-based assistant powered by LangChain + your choice of LLM (Gemini, OpenAI, Claude).
It helps you execute Git and shell commands interactively, detects common errors like merge conflicts or fatal errors, and offers AI-powered help — right inside your terminal.


⚙️ Features

  • 💬 Talk to the AI with @bot your question
  • 🧠 Pick your preferred model: OpenAI GPT-4o, Gemini 2.0, or Claude 3
  • 🤖 Auto-detect Git errors and offer intelligent help
  • 💾 Logs the entire terminal session
  • ⚡ Fully automated mode with CLI flags (--model, --api-key)

🚀 Quickstart

1. Clone and Install

git clone https://github.com/TejasRaundal/gitmate.git
cd gitmate
pip install -e .

2. Run Interactively

gitmate

You'll be prompted to select an LLM model and enter your API key.


🔧 Command-Line Arguments

Flag Description Example
--model Select LLM: openai, gemini, claude --model gemini
--api-key Provide your API key --api-key sk-...

Skip all prompts:

gitmate --model claude --api-key YOUR_KEY

🤖 Usage Examples

Ask the bot directly:

@bot how do I revert the last commit?

Handle errors interactively:

If GitMate detects an error (like a merge conflict), it will ask:

🚨 I noticed a merge conflict. Do you want help resolving it?

📓 Session Logs

All terminal activity is logged automatically as:

git_session_YYYYMMDD_HHMMSS.log

Useful for reviewing your Git workflow or debugging sessions.


🛠️ Dependencies

Install via:

pip install -r requirements.txt

Required libraries:

  • rich – beautiful terminal UI
  • langchain
  • langchain-openai
  • langchain-google-genai
  • langchain-anthropic
  • openai, google-generativeai, anthropic – for model access

🧩 Future Ideas

  • --command flag: Run a single Git command with AI help and exit
  • Task Performer Agent
  • Markdown output formatting
  • Live Git watch mode for auto-analysis
  • API key manager / config file support

🛡️ Disclaimer

This tool runs Git and shell commands using Python’s subprocess. Always review AI suggestions before executing potentially destructive commands.


👨‍💻 Author

Built by Tejas Raundal


📄 License

MIT License

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

gitmate_ai-1.0.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

gitmate_ai-1.0.1-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

Details for the file gitmate_ai-1.0.1.tar.gz.

File metadata

  • Download URL: gitmate_ai-1.0.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for gitmate_ai-1.0.1.tar.gz
Algorithm Hash digest
SHA256 5838197dbc27b9d96d9b16d889b2509f4c3b172556258bdfcba94efaaae4f0f5
MD5 af3a6f86de35a5f1630b5a0b04abd0c1
BLAKE2b-256 6ae68ffd9c0cee6f1e3a2c4fd4cc9e88d505e5ad3b2823de8aa6b8a2ea65f6fe

See more details on using hashes here.

File details

Details for the file gitmate_ai-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: gitmate_ai-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.7

File hashes

Hashes for gitmate_ai-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fe636037153c5a8b126e0d03b45183121536d022d56a1a7f943abeed8be0fa82
MD5 083792724c0273c2fdd8effc9ebd357b
BLAKE2b-256 4414e7c9f35f631bdf203ae2aa2f749b4a7e7089120576cbbb7b0df5bd106bd9

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