Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/25077667/cg
The commit GPT using OpenAI's chatGPT for free
https://github.com/25077667/cg
Last synced: 3 months ago
JSON representation
The commit GPT using OpenAI's chatGPT for free
- Host: GitHub
- URL: https://github.com/25077667/cg
- Owner: 25077667
- License: gpl-3.0
- Created: 2023-06-04T12:48:11.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2024-05-22T18:04:07.000Z (6 months ago)
- Last Synced: 2024-05-22T18:47:58.100Z (6 months ago)
- Language: Python
- Size: 265 KB
- Stars: 12
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-ChatGPT-repositories - cg - The commit GPT using OpenAI's chatGPT for free (Openai)
README
The cg (commit generator) tool which is generated by OpenAI's API.
==================================================## Demo:
![](./assert/demo.jpg)## Requirements:
- Python 3.10+
- poetry
- OpenAI API key### The OpenAI API key:
You can get the OpenAI API key from [here](https://beta.openai.com/).Our python code in src/config_parser.py:
```python=
GPT_TOKENS = tuple(os.environ.get('GPT_TOKENS', '').replace(
';', ',').replace(':', ',').split(','))
```
So, you can set the environment variable `GPT_TOKENS` to your OpenAI API keys.
Or you could just insert your API key to the `GPT_TOKENS` config file (~/.cg/config.json).## Usage:
### Download the binary from the latest release:Linux:
```bash
./cg.elf
```
> Before we publish this tool to the package manager, you could use this command to link the binary to `/usr/local/bin/cg`:
> ```bash
> sudo ln -s ./cg.elf /usr/local/bin/cg
> ```Mac:
```bash
./cg.macho
```Windows:
```powershell
.\cg.exe
```### Using the raw python code:
```bash
$ poetry install
$ poetry run python ./main.py
```## Todo:
- [ ] Benchmark with other famous commit message generator
- [x] Smarter prompt for commit message
- [x] Use score to measure the quality of the commit message
- [x] Binary for Windows, Linux, and Mac
- [x] Tests and CI
- [ ] Publish to PyPI, Homebrew, AUR, and scoop## License:
GPLv3