Skip to main content

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

Release files for git-autocommit-hook 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for git-autocommit-hook 0.1.2
File Size Uploaded
git_autocommit_hook-0.1.2.tar.gz 24.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for git-autocommit-hook 0.1.2
File Interpreter ABI Platform
git_autocommit_hook-0.1.2-py3-none-any.whl Python 3 none any Details

Total release size: 56.4 kB

Release files / git_autocommit_hook-0.1.2.tar.gz

Download URL git_autocommit_hook-0.1.2.tar.gz
Size 24.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8a14c9b87ad89a705f2c50f387e98168537be82cd42941b64441b6579848c846
BLAKE2b-256 checksum
How to use checksums
b933d62975cd89bee7a2f86b9786fbfe29afc3b942738fe2e6a82a30046c614c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 30, 2024.

Transparency log

Release files / git_autocommit_hook-0.1.2-py3-none-any.whl

Download URL git_autocommit_hook-0.1.2-py3-none-any.whl
Size 31.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ea8b39c67e03f038924ea39c494cdec86b630890ef4780fd8953e488535ee492
BLAKE2b-256 checksum
How to use checksums
44b57d37718842d3f8d58031775f94db3c00bcf584949124d750d5471e9e1eeb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Dec 30, 2024.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.2 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page