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.0.tar.gz (8.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.0-py3-none-any.whl (9.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: another_gitgpt-0.1.0.tar.gz
  • Upload date:
  • Size: 8.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.0.tar.gz
Algorithm Hash digest
SHA256 64404c797b643562195aebb58762211f1351888d2b3e4ef6c7d71f6207109761
MD5 6bc96ac9d0febe676f6223436901a893
BLAKE2b-256 375d9d3ba0259792bb20b3a4667fece087aa8113cfc408ff1482d311d8828407

See more details on using hashes here.

File details

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

File metadata

  • Download URL: another_gitgpt-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 86c65e8f1d7b2c2c36b266f34ce7c8a38c851f991c286c73221b832f21e5b0ef
MD5 683235dd757cbab8eab5063ba233ee09
BLAKE2b-256 0a6c515b3725fc64e7e3258481be324f10684ec49a0a78092260076cbfb82b80

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