Skip to main content
Any Framework

A quick command to look at staged git activity and offer an AI-generated commit message.

Published
Feb 18, 2023
3y ago
Total Downloads
5.9K
5,884

Install

dotnet add package TimHeuer.Git.AICommit --version 0.0.4-pre-g0f7be50c0c

No framework information available.

README

AICommit

This is not my idea (original Nutlope/aicommits), but I just created one to use Azure OpenAI instead of the base OpenAI resources and make it a .NET global tool.

Requirements

You will need an Azure OpenAI resource. From the resource grab the following values and set as configuration variables on your machine.

  • AZURE_OPENAI_KEY - the key from your provisioned resource
  • AZURE_OPENAI_ENDPOINT - the endpoint URI from the provisioned resource
  • AZURE_MODEL_DEPLOYMENT - the name you gave to one of your Azure OpenAI model deployments

These can be set as either Environment variables or in the user app local data directory under .aicommit/appsettings.json in the following format:

{
  "AZURE_OPENAI_KEY": "your api key",
  "AZURE_OPENAI_ENDPOINT": "your endpoint",
  "AZURE_MODEL_DEPLOYMENT": "your name of your model deployment"
}

The location for this would be in:

  • Windows - %localappdata% which is usually C:\Users\[username]\AppData\Local
  • macOS = /Users/[username]/.local/share

Installation

To install use the dotnet CLI command:

dotnet tool install -g TimHeuer.Git.AICommit

Usage

From a git repository if there are staged changes, just run aicommit from the repository. It will attempt to generate a message for you and offer you to see it before using for the commit message.

Data Sharing

Indeed this does take the text of your git diff output and send it to Azure OpenAI for completion. You should not use this if you have sensitive information.

Changes from Previous Version

No structural changes between v0.0.3.2-pre and v0.0.4-pre-g0f7be50c0c.

Adoption Assessment

Assess this package against its supported frameworks, license, maintenance signals and dependency graph before making it a project standard.

This version is marked prerelease. Validate its API and upgrade path before production use.No target framework metadata is available. Confirm compatibility in a representative project before standardising on this package.

Related Guides & Workflows

Learn how to evaluate, integrate, or audit this package in your .NET project.