aicommit/README.md
anaxios 2268f9e401
Added option to use Groq API by adding --groq flag to GIT_EDITOR.
Added environment variable GROQ_API_KEY to store Groq API key.
Updated git commit example to include --groq flag.
2024-08-09 12:48:08 -07:00

1.3 KiB

Use AI to Draft Commit Messages with Aicommit

Aicommit integrates with RayAI to generate a draft commit message, which is then loaded into your default editor for review and editing.

Prerequisites

To use Aicommit, you need to have the following tools installed:

  • curl
  • jq

Note: Aicommit-groq is currently broken and should not be used.

Setup and Usage

  1. Clone the repository: Clone the Aicommit repository to your local machine.
  2. Configure your Git editor: Add the following line to your ~/.bashrc file, replacing <path/to/> with the actual path to the Aicommit executable:
export GIT_EDITOR="<path/to/>aicommit"

Optionally you can add the --groq flag to use the Groq API.

export GROQ_API_KEY=<groq-api-key>
export GIT_EDITOR="<path/to/>aicommit --groq"
  1. Use Git as normal: Once configured, you can use Git as you normally would. When you run git commit, Aicommit will generate a draft commit message using RayAI, which will then be loaded into your default editor for review and editing.

Bypassing AI-generated messages: If you prefer to write your own commit message, you can use the -m flag with git commit, like this: git commit -m "your message here". This will bypass the AI-generated message and allow you to write your own message directly.