Skip to main content

scommit: ChatGPT-generated commit messages

Project description

Semantic Commit (scommit)

Semantic Commit (scommit) is a Python script that uses the ChatGPT API to auto-generate commit messages for your git commits. You can use it exactly like git commit:

scommit

is equivalent to:

git commit -m "auto-generated commit message"

You can also use all of the args you normally would with git commit, for example:

scommit -a

is equivalent to:

git commit -a -m "auto-generated commit message"

Think of scommit as an alias for git commit that appends -m "message" with an auto-generated message. That's it! I recommend using this when you don't actually care about commit messages, but want them to be slightly more informative than "sdflskdjafks". Plus, it uses more GPU's than regular commits, and we all know GPU usage is a proxy for agency.

In addition, you can use the -mi option with scommit to run it locally using Ollama. For example:

scommit -mi

This will run scommit locally using Ollama instead of making a request to the ChatGPT API.

Installation

pip install semantic-commit

You should get command-line tool called scommit that you can use just like git commmit.

You also need to set your OpenAI API key as an environment variable named OPENAI_API_KEY for scommit to work. Add this line in your .bashrc or .zshrc:

export OPENAI_API_KEY=your-api-key

License

This project is licensed under the terms of the MIT license. See the LICENSE file for details.

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

semantic-commit-1.2.0.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

semantic_commit-1.2.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file semantic-commit-1.2.0.tar.gz.

File metadata

  • Download URL: semantic-commit-1.2.0.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/40.0 requests/2.28.1 requests-toolbelt/1.0.0 urllib3/1.26.2 tqdm/4.64.1 importlib-metadata/6.7.0 keyring/24.2.0 rfc3986/1.5.0 colorama/0.4.6 CPython/3.9.18

File hashes

Hashes for semantic-commit-1.2.0.tar.gz
Algorithm Hash digest
SHA256 51d2f1b8892771068b53ed1e57d28ae68265b7fb988cbf3b39d85d6d25472815
MD5 2e422a2b2df45190f4d6429eb2a5e5d0
BLAKE2b-256 97ea8ec18e250c35b2aaef3b0d0d3c5d9a80343504354ee38a2a94e7859c4421

See more details on using hashes here.

File details

Details for the file semantic_commit-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: semantic_commit-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/40.0 requests/2.28.1 requests-toolbelt/1.0.0 urllib3/1.26.2 tqdm/4.64.1 importlib-metadata/6.7.0 keyring/24.2.0 rfc3986/1.5.0 colorama/0.4.6 CPython/3.9.18

File hashes

Hashes for semantic_commit-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a53d11054a93749610d1010538119bb3cdefef24280468f2b98ba80beb5b54c3
MD5 083162c29db0c77b1bf8c0e7b1e2d518
BLAKE2b-256 4c5ac4ec9907480f043b578725a0ca569c07abe3fae9bc43cda3bc8ee1dabaff

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page