Skip to content

EtaCassiopeia/aicommits-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

aicommits-rs


Crate Status Build Status Docs Status

A CLI that writes your git commit messages for you with AI. This project was inspired by AI Commits and has been ported to Rust.

asciicast

All the commit messages in this repo were generated by this tool.

Installation

Using Cargo

  1. Install Rust and Cargo. Then run:
cargo install aicommits-rs
  1. Retrieve your API key from OpenAI

    Note: If you haven't already, you'll have to create an account and set up billing.

  2. Set your API key as an environment variable:

export OPENAI_API_KEY=<your_api_key>

Homebrew (Mac Only)

Run the following command to install the latest version of the CLI tool:

brew install EtaCassiopeia/tap/aicommits-rs

Linux

run the following command to install the latest version of the CLI tool:

curl -L //TBD

Usage

aicommits-rs

How it works

This CLI tool uses git diff to obtain all of the most recent code changes, and then sends them to OpenAI's GPT-3 to generate a commit message that is returned. If the returned commit message is not satisfactory, you can run the command again to generate a new commit message, otherwise you can use the returned commit message to commit your changes.

Note: An error may occur when the number of changes being made to a file is too large for the OpenAI API to process. To avoid this error, try reducing the number of staged changes or writing your own commit message.

Note: This tool is still in development, and is not guaranteed to work as expected.

About

A CLI that writes your git commit messages for you with AI

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages