An open API service indexing awesome lists of open source software.

https://github.com/stephanmingoes/script-commit

A tool that uses OpenAI's GPT model to analyze the contents of git diff and generate a suitable commit message.
https://github.com/stephanmingoes/script-commit

ai aicommit git

Last synced: about 2 months ago
JSON representation

A tool that uses OpenAI's GPT model to analyze the contents of git diff and generate a suitable commit message.

Awesome Lists containing this project

README

          

## Generating Commit Messages with Script-Commit

### Prerequisites

Before you can use Script-Commit to generate commit messages, you'll need to set the `OPENAI_API_KEY` environment variable on your machine. You can obtain an API key from the [OpenAI API website](https://beta.openai.com/docs/api-reference/introduction).

### Usage

To generate a commit message based on your staged changes, follow these steps:

1. Stage your changes using `git add` command. For example, to stage all changes in the current directory, run:

```
git add .
```

2. Run `npx script-commit` command in your terminal. This will generate a commit message based on your changes and copy it to your clipboard.

That's it! You've successfully generated and committed your changes with a commit message generated by Script-Commit.