gpt-commit 🚀
gpt-commit is a command-line tool that intelligently generates commit messages based on staged file changes in Git. It utilizes OpenAI's GPT model to craft concise and descriptive commit messages.
Acknowledgements 🙌
This project was inspired by and owes gratitude to the original work found at markuswt/gpt-commit. Thank you for laying the foundation!
Prerequisites 📋
- Python
- A valid OpenAI API key
Installation 🛠️
-
Clone the repository:
git clone https://github.com/josenerydev/gpt-commit.git
-
Navigate to the project directory:
cd gpt-commit/
-
Install the package:
pip install .
For developers: If you're making changes and want to reflect them immediately, install in editable mode:
pip install -e .
Update ⬆️
To upgrade the tool to the latest version:
pip install --upgrade .
Uninstallation ❌
To uninstall the tool:
pip uninstall gpt-commit
Configuration ⚙️
Before using the tool, you need to set up your OpenAI API key.
On Windows (PowerShell):
Before running any PowerShell script, you may need to modify the execution policy. To do this, open PowerShell as an administrator and run:
Set-ExecutionPolicy RemoteSigned
Then, run the setupEnvironmentVariables.ps1 script:
.\setupEnvironmentVariables.ps1 -openaiKey YOUR_OPENAI_API_KEY
On Linux/Mac:
Run the setupEnvironmentVariables.sh script:
./setupEnvironmentVariables.sh YOUR_OPENAI_API_KEY
Remember to replace YOUR_OPENAI_API_KEY with your actual API key.
Usage 🚀
After installation, you can use the gpt-commit tool anywhere in your system:
gpt-commit
Running the above command will analyze changes in staged files in Git and generate a commit message. This message will then be opened in Git's default editor for review or editing. After reviewing the message, save and close the editor to finalize the commit.
For help on available options:
gpt-commit --help
License
This project is licensed under the MIT License - see the LICENSE file for details.
Metadata
Release files for gpt-commit 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| gpt-commit-0.1.2.tar.gz | 5.1 kB | Without provenance | Details for gpt-commit-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gpt_commit-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for gpt_commit-0.1.2-py3-none-any.whl |
Total release size: 11.4 kB
Release files / gpt-commit-0.1.2.tar.gz
| Download URL | gpt-commit-0.1.2.tar.gz |
|---|---|
| Size | 5.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f5cd24018d8bf595a8944b40cd14cb2064b2ac65753568aa4cdf76807735a4a0
|
|
BLAKE2b-256 checksum How to use checksums |
855035ad924cdce396805a3cab893e5d03c35d1e01accb1d0a57eedc8049b8a9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Release files / gpt_commit-0.1.2-py3-none-any.whl
| Download URL | gpt_commit-0.1.2-py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d636271e34af695eceef4e12218facf4d3a075acf53205e57bbf040c9d7aea02
|
|
BLAKE2b-256 checksum How to use checksums |
935b428df3195262c5c6f2c81b6fd2f913135f356750752bb300f1a56498a256
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.17
|
Security for gpt-commit 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.