Generate commit messages using GPT3 based on your changes and commit history.

Related tags

Utilities commit
Overview

Commit

commit

Generate commit messages using GPT-3 based on your changes and commit history.

Install

You need Rust and Cargo installed on your machine. See the installation guide here.

Then clone the repo and install the CLI globally like this:

cargo install --path .

Usage

commit uses GPT-3. To use it, you'll need to grab an API key from your dashboard, and save it to OPENAI_API_KEY as follows (you can also save it in your bash/zsh profile for persistance between sessions).

export OPENAI_API_KEY='sk-XXXXXXXX'

Once you have configured your environment, run commit in any Git repository with staged changes.

To get a full overview of all available options, run commit --help

$ commit --help
Generate commit messages using GPT-3 based on your changes and commit history.

Usage: commit [OPTIONS] [FILES]...

Arguments:
  [FILES]...  Files to stage and commit

Options:
  -c, --commits <COMMITS>        Number of commits in history to use generating message [default: 50]
  -t, --max-tokens <MAX_TOKENS>  Maximum number of tokens to use generating message [default: 2000]
      --copy                     Copy the commit message to clipboard instead of committing
      --no-commit                Don't commit, just print the commit message to stdout
  -y, --yes                      Answert "Yes" to prompts
  -h, --help                     Print help information
  -V, --version                  Print version information
You might also like...
Tool written in rust to read for file changes and accordingly run build commands.

Sniff A simple tool written in rust to read for file changes and accordingly run build commands. Note this tool is for linux and linux only. If it hap

messloc is a drop in replacement for malloc that can transparently recover from memory fragmentation without any changes to application code.
messloc is a drop in replacement for malloc that can transparently recover from memory fragmentation without any changes to application code.

messloc is a drop in replacement for malloc that can transparently recover from memory fragmentation without any changes to application code. Goals Al

Rust program to monitor Windows 10 Registry keys for changes or modifications.

RegMon This Rust program monitors changes to multiple registry keys in Windows 10 and writes the changes to a text file. It also periodically sends a

Universal changelog generator using conventional commit+ with monorepo support. Written in Rust.
Universal changelog generator using conventional commit+ with monorepo support. Written in Rust.

chlog Universal changelog generator using conventional commit+ with monorepo support. chlog can generate the changelog from the conventional commits w

Better error messages for axum framework.

axum-debug This is a debugging crate that provides better error messages for axum framework. axum is a great framework for developing web applications

Log defmt messages over the serial port.
Log defmt messages over the serial port.

defmt-serial A defmt target for logging over a serial port. Messages can e.g. be read using socat and passed through defmt-print, see example-artemis

"Philips Ambilight for desktops". A tool to generate color palettes from your desktop wallpaper and send them to Home Assistant.

Desktop Dye DesktopDye is an open source project written in Rust that allows users to have their lights paired with Home Assistant adjust to the most

📝 Generate your README.md from Rust doc comments

cargo-onedoc 📝 Generate README.md from doc comments. Only write your documentation once! This crate provides a Cargo subcommand that can generate Mar

Generate an HTML page based on a Notion document

Notion Generator Generate an HTML page based on a Notion document! Still a bit of a work in progress, but I am about to actually use it for some actua

Comments
  • Unable to generate commit message

    Unable to generate commit message

    Hey, thanks for creating this tool - looking forward to it making my workflow much more streamlined!

    I'm having issues generating my commit messages - as far as I can tell the executable built properly and installed globally with cargo as intended. I have my OpenAI API key set as a global bash export variable, and can log it to the terminal so that seems okay. However, when trying to generate a commit message with my locally added changes, the following is outputted: `✔ Got commit message!

    Failed to generate commit message.`

    (shown in full here:) Screenshot 2022-12-28 at 16 07 42

    Looking at the OpenAI dashboard the API isn't getting queried via that key at all on their end.

    Any pointers as to what might be the cause here, or how I can get some more verbose logs, would be appreciated!

    System information

    • MacBook Pro 2019, Intel Silicon.
    • macOS Ventura 13.0.1
    • git version 2.38.1
    • Shell: GNU bash, version 3.2.57(1)-release (x86_64-apple-darwin22)
    • rustc 1.66.0 (69f9c33d7 2022-12-12)
    • cargo 1.66.0 (d65d197ad 2022-11-15)
    opened by b-d-e 2
Owner
Brian Le
Brian Le
Rust macro that uses GPT3 codex to generate code at compiletime

gpt3_macro Rust macro that uses GPT3 codex to generate code at compiletime. Just describe what you want the function to do and (optionally) define a f

Maximilian von Gaisberg 59 Dec 18, 2022
Easily add emojis to your git commit messages 😎

gimoji A CLI tool that makes it easy to add emojis to your git commit messages. It's very similar to (and is based on) gitmoji-cli but written in Rust

Zeeshan Ali Khan 12 May 29, 2023
A gitmoji interactive client for using gitmojis on commit messages.

gitmoji in Rust This is just an opinionated version of gitmoji-cli written in Rust . A gitmoji interactive client for using gitmojis on commit message

igor 2 Aug 16, 2022
A CLI tool that automatically writes commit messages for you.

Automagically-generated commit messages A CLI tool that generates commit messages from your staged changes, built in Rust and using OpenAI's Codex. In

Miguel Piedrafita 839 Jan 6, 2023
Communicate with OpenAi's GPT3.5 (ChatGPT) API.

ChatGPT Rust Communicate with OpenAi's GPT3.5 (ChatGPT) API. Usage use chat_gpt_rs::prelude::*; #[tokio::main] async fn main() { let token = Toke

Aiden 4 Mar 10, 2023
Replay git history with some tweaks

Git-replay Overview Git-replay is a simple tool that replays the history of a Git repository but with some tweaks (i.e., it can change the author name

Tak-gun Na 3 Mar 22, 2022
A simple to use rust package to generate or parse Twitter snowflake IDs,generate time sortable 64 bits unique ids for distributed systems

A simple to use rust package to generate or parse Twitter snowflake IDs,generate time sortable 64 bits unique ids for distributed systems (inspired from twitter snowflake)

houseme 5 Oct 6, 2022
A tool for investigating file system and folder contents and their changes.

Sniff A tool for investigating file systems and folder contents and their changes. Sniff can create snapshots of file systems and folders, storing has

Niclas Schwarzlose 6 Jan 14, 2023
💫 Small microservice to handle state changes of Kubernetes pods and post them to Instatus or Statuspages

?? Kanata Small microservice to handle state changes of Kubernetes pods and post to Instatus ?? Why? I don't really want to implement and repeat code

Noel ʕ •ᴥ•ʔ 4 Mar 4, 2022
Watches changes in a rust project, runs test and shows friendly notification

Cargo testify Automatically runs tests on your Rust project and notifies about the result. Install Install prerequisites (for Debian/Ubuntu): apt-get

Sergey Potapov 77 May 16, 2022