Skip to content

Latest commit

 

History

History
48 lines (30 loc) · 1008 Bytes

README.md

File metadata and controls

48 lines (30 loc) · 1008 Bytes

GitAI

GitAI is a command-line tool that uses AI to generate concise git commit messages based on your code changes.

Installation

You can install GitAI globally using npm:

npm install -g @zackbraksa/gitai

Requirements

  • Node.js
  • Git
  • An OpenAI API key

Usage

To use GitAI, run the following command in your terminal:

Set your OpenAI API key as an environment variable:

export OPENAI_API_KEY=<your-api-key>

Stage your changes and generate a commit message:

# add files to be committed
git add .

# generate commit message
gitai generate

This will generate a commit message based on the changes you have made to your code.

Options

  • -d, --debug: Output extra debugging information, including the full git diff.
  • -o, --offline: Run in offline mode (doesn't make any requests to the AI service).

Disclaimer

This tool relies on OpenAI's API. Please ensure you comply with OpenAI's use-case policies and be aware of any associated costs.