An AI-powered tool to suggest conventional git commit messages.
Project description
genie-git
An AI-powered CLI tool to suggest conventional commit messages for your staged files.
Why genie-git?
Writing well-formatted, conventional commit messages is a best practice, but it can be tedious. genie-git uses the power of Google's Gemini models to analyze your staged changes and instantly propose a high-quality commit message for you.
Features
- AI-Powered Suggestions: Automatically generates commit messages based on your staged changes.
- Conventional Commits: Enforces a consistent and readable commit history.
- Customizable: Configure the AI model, API key, and message specifications to fit your needs.
- Exclude Files: Easily exclude files from the diff to fine-tune your commit message.
- Clipboard Integration: Copy commit messages directly to your clipboard for easy pasting.
- Context-Aware: Provide additional context to improve AI suggestions.
Installation
Install genie-git directly from PyPI:
pip install genie-git
Quick Start
-
Get your Google API Key:
You can generate a free Google Generative AI API key by visiting aistudio.google.com/apikey.
-
Configure
genie-git:Set up your API key with the following command:
genie-git configure --api-key YOUR_API_KEY
That's it! You're now ready to generate commit messages.
Usage
Suggest a Commit Message
To get a commit message suggestion, simply run genie-git in your repository:
genie-git suggest
This will analyze your staged changes and output a suggested commit message.
Additional Options for Suggest Command
You can enhance your commit message suggestions with these options:
# Provide additional context to the AI
genie-git suggest --context "This fixes the login bug reported by users"
# Copy the commit message directly to clipboard
genie-git suggest --copy
# Combine context and clipboard copying
genie-git suggest --context "Refactoring for better performance" --copy
Available suggest options:
--context: Provide additional context to help the AI generate better commit messages.--copy: Copy the generated commit message to the clipboard.
Advanced Configuration
While only an API key is needed to get started, you can further customize genie-git to fit your workflow:
genie-git configure --model gemini-1.5-pro --message-specifications "My custom instructions"
Clipboard Configuration
You can configure automatic clipboard copying:
# Enable automatic clipboard copying for all commit messages
genie-git configure --always-copy
# Disable automatic clipboard copying
genie-git configure --always-copy-off
# Show current configuration
genie-git configure --show
Available configuration options:
--api-key: Your Google Generative AI API key.--model: The model to use (e.g.,gemini-1.5-flash).--message-specifications: Additional instructions for the AI.--number-of-commits: The number of recent commits to use as a reference.--always-copy: Enable automatic clipboard copying for all commit messages.--always-copy-off: Disable automatic clipboard copying.--show: Display the current configuration.
Exclude Files
To exclude files from the diff, use the exclude-files command:
genie-git exclude-files file1.txt path/to/file2.py
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file genie_git-0.2.0.tar.gz.
File metadata
- Download URL: genie_git-0.2.0.tar.gz
- Upload date:
- Size: 5.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c409ba1a9d66e38c56f097bc9bc6e30755b49762f30f38ca263ce16989115c68
|
|
| MD5 |
67da5fcf51fcfaf33548a7cfa2a8b2da
|
|
| BLAKE2b-256 |
818932e7d3770414e7b7579d465b1d1ef4b43ac7160cd218ae734409c5a15112
|
Provenance
The following attestation bundles were made for genie_git-0.2.0.tar.gz:
Publisher:
publish.yml on majedlutfi96/genie-git
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genie_git-0.2.0.tar.gz -
Subject digest:
c409ba1a9d66e38c56f097bc9bc6e30755b49762f30f38ca263ce16989115c68 - Sigstore transparency entry: 569886665
- Sigstore integration time:
-
Permalink:
majedlutfi96/genie-git@1a59eb9e3f77e083d4a023899132a759c2082076 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/majedlutfi96
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1a59eb9e3f77e083d4a023899132a759c2082076 -
Trigger Event:
release
-
Statement type:
File details
Details for the file genie_git-0.2.0-py3-none-any.whl.
File metadata
- Download URL: genie_git-0.2.0-py3-none-any.whl
- Upload date:
- Size: 8.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
26d0a986817be6705f8ad5216ec74eeb7cde197a8bf378819c785717f1ce4630
|
|
| MD5 |
9e2ac3df32501900f3e1595c667c9548
|
|
| BLAKE2b-256 |
cdbe6681d01693225297a8cab1e9c26064ddf14b5ed4800ea771122641a3ae00
|
Provenance
The following attestation bundles were made for genie_git-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on majedlutfi96/genie-git
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
genie_git-0.2.0-py3-none-any.whl -
Subject digest:
26d0a986817be6705f8ad5216ec74eeb7cde197a8bf378819c785717f1ce4630 - Sigstore transparency entry: 569886667
- Sigstore integration time:
-
Permalink:
majedlutfi96/genie-git@1a59eb9e3f77e083d4a023899132a759c2082076 -
Branch / Tag:
refs/tags/v0.2.0 - Owner: https://github.com/majedlutfi96
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@1a59eb9e3f77e083d4a023899132a759c2082076 -
Trigger Event:
release
-
Statement type: