Metadata-Version: 2.1
Name: gpt-commit-cli
Version: 0.1.1
Summary: Generate commit messages using GPT-3.
Home-page: https://github.com/tddschn/gpt-commit-cli
License: MIT
Keywords: GPT-3,Git commit,Git,cli
Author: Teddy Xinyuan Chen
Author-email: 45612704+tddschn@users.noreply.github.com
Requires-Python: >=3.10,<4.0
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Topic :: Utilities
Requires-Dist: openai (>=0.26.5,<0.27.0)
Project-URL: Bug Tracker, https://github.com/tddschn/gpt-commit-cli/issues
Project-URL: Repository, https://github.com/tddschn/gpt-commit-cli
Description-Content-Type: text/markdown

# gpt-commit

Generate commit messages using GPT-3. To use `gpt-commit`, simply invoke it whenever you'd use `git commit`. Git will prompt you to edit the generated commit message.

```bash
git add .
gpt-commit
```

Based on Markus' [gpt-commit](https://github.com/markuswt/gpt-commit).

- [gpt-commit](#gpt-commit)
  - [Installation](#installation)
    - [pipx](#pipx)
    - [pip](#pip)
  - [Getting Started](#getting-started)
  - [Develop](#develop)


## Installation

Minimum Python version required: 3.10.

### pipx

This is the recommended installation method.

```
$ pipx install gpt-commit-cli
```

### [pip](https://pypi.org/project/gpt-commit-cli/)

```
$ pip install gpt-commit-cli
```


## Getting Started

Set the environment variable `OPENAI_API_KEY` to your [OpenAI API key](https://platform.openai.com/account/api-keys), e.g. by adding the following line to your `.bashrc`.

```bash
export OPENAI_API_KEY=<YOUR API KEY>
export OPENAI_ORG_ID=<YOUR ORG ID> # optional
```

<!-- ### Modify `git commit` (optional)

If you want `git commit` to automatically invoke `gpt-commit`, copy `gpt-commit.py` and `prepare-commit-msg` to the `.git/hooks` directory in any project where you want to modify `git commit`.
 -->

## Develop

```
$ git clone https://github.com/tddschn/gpt-commit-cli.git
$ cd gpt-commit-cli
$ poetry install
```
