Skip to main content

AI-powered Git commit assistant using GPT and git diff

Project description

🧠 GitGPT: AI-Powered Git Commit Assistant

GitGPT is a Python CLI tool that uses OpenAI's GPT models to generate meaningful Git commit messages based on diffs. It supports both EAGLE PCB design projects and generic repositories, and now includes a CLI for managing favorites, selecting models, viewing config, and even upgrading itself.


✨ Features

  • 🧠 AI-powered commit messages using actual git diff
  • 🗂️ Interactive repo selector + favorites system
  • 📂 Supports both eagle and generic repo types
  • 🔧 Selectable OpenAI models (e.g. gpt-4o, gpt-4, gpt-3.5)
  • ⚠️ Merge conflict detection
  • 🔄 Auto push and optional git pull
  • ⬆️ gitgpt upgrade to update via Git or PyPI
  • 🧹 gitgpt clear-cache to reset config
  • 🧠 gitgpt model, gitgpt favorites, gitgpt config and more

📦 Installation

1. Clone and install locally

git clone https://github.com/miniPCB/gitgpt.git
cd gitgpt
pip install .

2. Dependencies

Install requirements:

pip install -r requirements.txt

🔐 Setup

Create a secrets.json in the project root:

{
  "openai_api_key": "sk-..."
}

Optionally define favorites and model in config.json:

{
  "openai_model": "gpt-4o",
  "favorites": [
    { "path": "C:\\Repos\\EAGLE", "type": "eagle" },
    { "path": "C:\\Repos\\MyApp", "type": "generic" }
  ]
}

🚀 Usage

Run with no arguments to enter commit mode:

gitgpt

Supported Commands

Command Alias(es) Description
model Select GPT model interactively
favorites fav View or delete saved Git repo favorites
config cfg Show the current configuration
clear-cache reset Remove all favorites and model selection
version --version, ver Show current version
upgrade up Pull latest from Git or upgrade via PyPI
--help help, -h Show CLI help with command summary

📂 Repo Types

  • eagle → for EAGLE .brd, .sch, .epf, Gerber projects
  • generic → any regular software, script, or content repo
  • other types like firmware, docs, api, desktop, etc. also supported via config

🧪 Example

gitgpt favorites
gitgpt model
gitgpt

🆙 Upgrading GitGPT

gitgpt upgrade
  • If installed via Git: pulls latest and reinstalls
  • If installed via PyPI: runs pip install --upgrade gitgpt
  • Logs to ~/gitgpt_upgrade_log.txt and shows current version

📄 License

MIT License © 2025 Nolan Manteufel


Start committing smarter, not harder. 🧠✨

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

another_gitgpt-0.1.1.tar.gz (10.7 kB view details)

Uploaded Source

Built Distribution

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

another_gitgpt-0.1.1-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file another_gitgpt-0.1.1.tar.gz.

File metadata

  • Download URL: another_gitgpt-0.1.1.tar.gz
  • Upload date:
  • Size: 10.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for another_gitgpt-0.1.1.tar.gz
Algorithm Hash digest
SHA256 e2eb4e3c999d300ae07a079f3f2502048ead51852ca7c1f9ff3c92313f596c6d
MD5 1b462f4e09ddcb1b41842649e2d8c487
BLAKE2b-256 312571b4a0a2be4e687d31d31b9bba31509b97fd9d8c30e33eab23313c721f59

See more details on using hashes here.

File details

Details for the file another_gitgpt-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: another_gitgpt-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for another_gitgpt-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 403fb1696a87f4ebdaf1a0656d040bc34e7012d627af9c50694991c73c3a48cf
MD5 5841628633ceb9c596f7d8eaeeed6ca9
BLAKE2b-256 c6e7533c40a905ea408a8a6c6739467d2d3b9533a3a7f2a0ae857c1f5f7787fb

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