gcm-ai

Crates.iogcm-ai
lib.rsgcm-ai
version0.1.7
sourcesrc
created_at2023-02-17 21:49:57.796424
updated_at2023-03-29 01:42:23.340079
descriptionGCM-AI is a command-line tool that generates commit messages based on the diff of staged changes using OpenAI.
homepage
repositoryhttps://github.com/OLoKo64/gcm-ai
max_upload_size
id787796
size52,323
Reinaldo Rozato Junior (oloko64)

documentation

README

GCM-AI

Rust

gcm-ai

GCM-AI is a command-line tool that generates commit messages based on the diff of staged changes using OpenAI.

This app inspired by aicommits with some tweaks and written in Rust.

Installation

To install GCM-AI, you will need to have Rust installed on your system. You can install Rust by following the instructions here.

Once Rust is installed, you can install GCM-AI by running the following command:

cargo install gcm-ai

Usage

To generate a commit message for the staged changes, simply run the following command:

gcm-ai

This will generate a commit message using OpenAI's GPT-3 language model and print it to the console. You can then copy and paste the generated commit message into your git commit.

Configuration

GCM-AI uses the OpenAI API to generate commit messages. To use the OpenAI API, you will need an API key. You can get an API key by signing up for OpenAI here.

Please note that OpenAI is currently in beta, and the API is not free. But for now when you sign up, you will get $18 of free credits to use on the API, which should be enough to generate enough commit messages as the generated commit messages are very cheap.

Once you have an API key, you can configure GCM-AI to use it by running the following command:

gcm-ai --config

This will prompt you for your OpenAI API key. Once you enter your API key, it will be saved to a .toml configuration file in your home directory.

Contributing

Contributions are welcome! If you would like to contribute to GCM-AI, please open a pull request.

License

GCM-AI is licensed under the MIT License. See the LICENSE file for more information.

Commit count: 33

cargo fmt