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. Install

pip install gitmate-ai

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.2.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.2-py3-none-any.whl (6.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gitmate_ai-1.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 654532d6cc542c085d76424446a33d1d3e88c9eacd0dae5f8d4332f134166d55
MD5 df7db03803e1406162df2fdc1be6c24d
BLAKE2b-256 55f19c446036df5cd921d70f1730b9c0ce70453c2e633e39e505e1e46459c4fe

See more details on using hashes here.

File details

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

File metadata

  • Download URL: gitmate_ai-1.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 3901109307e0babdb7118a0891b1452e8a7745cfe69cd2e6d0b26e389a26140d
MD5 065a5a019096c921beebeeb54a7ad688
BLAKE2b-256 0db237f357ff9951b2bc95702534046adc7e53048f5d6a477c226e595a38f9f0

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