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.0.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.0-py3-none-any.whl (31.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: git_autocommit_hook-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 47ceb9e7cf560bd005b9092e18b36cd9dd670753e8099db18b4481018be7c81e
MD5 7213e1ffa86e986304a350ef5ef397e9
BLAKE2b-256 8bc46cbc7f1635caa4d4e18e9b392a793c7d60438cfa9dcb5930dd5c2ab37d26

See more details on using hashes here.

Provenance

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

File metadata

File hashes

Hashes for git_autocommit_hook-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4051adc847e1be040d898d4d7bc6abc3cadb3227665d807bacc7fc129b3aab19
MD5 8a348664216080270fe1874807160f3e
BLAKE2b-256 f040ac4eefe604213914efd137bb0c1936e2694e514ff0767b7391de29d7ae34

See more details on using hashes here.

Provenance

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