Skip to main content

Automatically generate commit messages from changes

Project description

Uses the Mistral api to pre-generate a commit message for you.

Autocommit in action

Features

  • Uses Retrieval-Augmented Generation (RAG) to give context to the LLM.

  • Automatically pre-fills commit messages using git hooks.

  • Optionally uses the mistral function-calling API to let the model access other files in the codebase (disabled by default).

Setup

You can simply install autocommit using pip:

$ pip install git_autocommit_hook

Usage

To use autocommit, simply run the following command in the root of your repository:

$ autocommit setup --key-file <path-to-mistral-api-key>

This will

  • create a .autocommit_storage_dir (untracked) directory in the root of your repository with the RAG database and the Mistral API key.

  • add a git hook to your repository to automatically generate commit messages.

  • add a git hook to your repository to keep the RAG database up-to-date.

Why ?

screenshot of commit messages whose message is simply "update"

This is why

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

git_autocommit_hook-0.1.1.tar.gz (24.6 kB view details)

Uploaded Source

Built Distribution

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

git_autocommit_hook-0.1.1-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: git_autocommit_hook-0.1.1.tar.gz
  • Upload date:
  • Size: 24.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.0.1 CPython/3.12.8

File hashes

Hashes for git_autocommit_hook-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bc1a32e9fa5b4930d78f78fe8168d251f2b1d151042f033baacc82066d413865
MD5 a46b5c4c085669bb67da3c9f373ba6be
BLAKE2b-256 a72cadac2997d3b827c6e007c5166b3addc3a621739ea12022dd356690ba3915

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_autocommit_hook-0.1.1.tar.gz:

Publisher: ci_cd.yaml on tbrugere/autocommit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

File hashes

Hashes for git_autocommit_hook-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2929b505ea724abbb22b8884d41dd23c9b2dd51adb6fb4bb4b91c94c90017246
MD5 27f4e95179c56c09b9e926c274244407
BLAKE2b-256 d613780db0c66b09db543aeb45fdb1a62e72b615df30e94f84913792bfe295a4

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_autocommit_hook-0.1.1-py3-none-any.whl:

Publisher: ci_cd.yaml on tbrugere/autocommit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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