https://github.com/abi/autocommit
https://github.com/abi/autocommit
Last synced: about 1 year ago
JSON representation
- Host: GitHub
- URL: https://github.com/abi/autocommit
- Owner: abi
- License: mit
- Created: 2022-12-19T17:32:04.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2023-01-17T05:22:59.000Z (over 3 years ago)
- Last Synced: 2025-05-10T21:17:02.288Z (about 1 year ago)
- Language: Python
- Size: 39.1 KB
- Stars: 150
- Watchers: 3
- Forks: 16
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# aicommit - AI-generated Git commit messages
A simple CLI tool that generates 5 commit message suggestions for the changes in your current Git repo. After you pick and edit the commit message you want, it commits the changes.

### Installation
**`pip install aicommit`**
On first run, it will prompt you for your OpenAI API key. Sign up for OpenAI if you haven't. Grab your API key by going to the dropdown on the top right, selecting "View API Keys" and creating a new key. Copy this key.
**NOTE:** it commits all changes, untracked and unstaged, in your current repo.
# Feedback/thoughts
Ping me on [Twitter](https://twitter.com/_abi_)
## scan_repo
`scan_repo` runs through all the commits in your repository to generate a CSV with AI-suggested commit messages side-by-side with your original commit messages. [Read more about this tool here](https://abiraja.substack.com/p/ai-generated-git-commit-messages)
To run scan_repo, copy `.env.example` to `.env` and add your OPENAI_KEY.
To update the repo it runs on, modify the `GITHUB_REPO_URL` variable at the top of `scan_repo.py`
# Publishing to pip
Version bump and clear out `dist/`
```
python3 -m build
twine check dist/*
twine upload dist/* --verbose
```