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, you will need a Mistral API key. You can get one by signing up on the Mistral website, and then creating one from the console.

Then, you can 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.2.tar.gz (24.8 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.2-py3-none-any.whl (31.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: git_autocommit_hook-0.1.2.tar.gz
  • Upload date:
  • Size: 24.8 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.2.tar.gz
Algorithm Hash digest
SHA256 8a14c9b87ad89a705f2c50f387e98168537be82cd42941b64441b6579848c846
MD5 13fec163a653aca441d4fcc8625f9b7d
BLAKE2b-256 b933d62975cd89bee7a2f86b9786fbfe29afc3b942738fe2e6a82a30046c614c

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_autocommit_hook-0.1.2.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.2-py3-none-any.whl.

File metadata

File hashes

Hashes for git_autocommit_hook-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ea8b39c67e03f038924ea39c494cdec86b630890ef4780fd8953e488535ee492
MD5 0ec2abbf9bd4c25669b9a764583e880b
BLAKE2b-256 44b57d37718842d3f8d58031775f94db3c00bcf584949124d750d5471e9e1eeb

See more details on using hashes here.

Provenance

The following attestation bundles were made for git_autocommit_hook-0.1.2-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