https://github.com/ahmetkca/commitai
CommitAI is a command line interface application that automatically generates commit messages based on the output of git diff. It utilizes the power of OpenAI's GPT-4o API to create meaningful and descriptive commit messages, making it easier to keep track of code changes. With CommitAI, you can save time and focus on writing code, rather than craf
https://github.com/ahmetkca/commitai
chatgpt cli command-line-interface commit commit-message gpt-4 gpt-4o openai openai-api
Last synced: 6 months ago
JSON representation
CommitAI is a command line interface application that automatically generates commit messages based on the output of git diff. It utilizes the power of OpenAI's GPT-4o API to create meaningful and descriptive commit messages, making it easier to keep track of code changes. With CommitAI, you can save time and focus on writing code, rather than craf
- Host: GitHub
- URL: https://github.com/ahmetkca/commitai
- Owner: ahmetkca
- License: mit
- Created: 2023-01-25T05:14:28.000Z (almost 3 years ago)
- Default Branch: with-body
- Last Pushed: 2023-01-30T01:33:42.000Z (almost 3 years ago)
- Last Synced: 2025-06-09T08:44:55.322Z (7 months ago)
- Topics: chatgpt, cli, command-line-interface, commit, commit-message, gpt-4, gpt-4o, openai, openai-api
- Language: TypeScript
- Homepage:
- Size: 765 KB
- Stars: 30
- Watchers: 4
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: readme.md
- License: LICENSE.md
Awesome Lists containing this project
README
# CommitAI
CommitAI is a command line interface application that automatically generates commit messages based on the output of git diff. It utilizes the power of OpenAI's GPT-3 API to create meaningful and descriptive commit messages, making it easier to keep track of code changes. With CommitAI, you can save time and focus on writing code, rather than crafting commit messages.
[](https://asciinema.org/a/y685nS8Qeh26ISn8gY5HF8lQK)
## Install
```bash
$ npm install --global commitai
```
or
```bash
$ yarn global add commitai
```
## Usage
```bash
$ npx commitai [OPTIONS]
```
or
```bash
$ commitai [OPTIONS]
```
Note: You must have a valid OpenAI API key in order to use CommitAI. You can get one [OpenAI API keys](https://beta.openai.com/account/api-keys). After you have your API key, you have to set it as an environment variable or you have to run the following command before using CommitAI:
```bash
OPENAI_API_KEY=sk- commitai
```
or export it as an environment variable in your `.bashrc` or `.zshrc` file:
```bash
export OPENAI_API_KEY=sk-
```
## Options
- `-h, --help`: Show help
- `-v, --version`: Show version number
- `-n [number], --numberOfCommitMessages [number]`: Number of commit messages to generate
- `-e, --edit`: Edit the commit message before committing
- `--no-e, --no-edit`: Do not prompt to edit the commit message before committing
- `-c, --confirmation`: Confirm the commit message before committing
- `--no-c, --no-confirmation`: Do not prompt for confirmation before committing