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.
- Host: GitHub
- URL: https://github.com/stephanmingoes/script-commit
- Owner: stephanmingoes
- Created: 2023-02-22T20:27:20.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-02-23T01:05:30.000Z (over 3 years ago)
- Last Synced: 2025-09-05T07:33:08.913Z (10 months ago)
- Topics: ai, aicommit, git
- Language: TypeScript
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.