![MIT License](https://img.shields.io/github/license/Songkeys/aimmit.svg)
aimmit
Git commit message generator with AI
About The Project
Generate the commit message with AI (ChatGPT).
Installation
Option 1: directly use with npx:
npx aimmit@latest
Option 2: install globally then use:
npm install -g aimmit
aimmit
Set up the AIMMIT_API_KEY [Payment Required]
Before using aimmit
, you need to set up the AIMMIT_API_KEY
(i.e. OpenAI API key) environment variable.
AIMMIT_API_KEY=... aimmit
Or you can set it in the .bashrc
or .zshrc
file:
export AIMMIT_API_KEY=...
Or you can specify the API key with the -k
option:
aimmit -k ...
You can get the API key from OpenAI.
Note that this is a paid service by OpenAI.
Alternative: Use a Reverse Proxy [Free Depending on the Provider]
Instead of using the official OpenAI paid service, there are some free reverse proxy services available but may have some limitations and of less stability.
Here is one example:
aimmit -r https://proxy/api
Or you can use the environment variable AIMMIT_REVERSE_PROXY_URL
:
export AIMMIT_REVERSE_PROXY_URL=...
Please note that a reverse proxy service may have security issues. You should use it at your own risk.
A free reverse proxy service is provided by default in this project by me. I promise that it will NOT collect any of your data. However, it may go down at any time.
Options
Usage:
Options:
--help Show help [boolean]
--version Show version number [boolean]
-c, --conventional-commits Use Conventional Commits[boolean] [default: false]
-l, --lite Only print the commit message
[boolean] [default: false]
-a, --auto-add-all Automatically add all files to the commit
[boolean] [default: false]
-p, --auto-push Automatically push the commit to the remote
[boolean] [default: false]
-r, --reverse-proxy-url Reverse proxy URL [string]
-k, --key API key [string]
-v, --verbose Run with verbose logging[boolean] [default: false]
Examples
Generate with Conventional Commits:
aimmit -c
Automatically add all files to the commit, then generate with Conventional Commits, then automatically push the commit to the remote:
aimmit -a -c -p
Only print the commit message:
aimmit -l
Contributing
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement".
Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
Credits
- Nutlope/aicommits: the original project. I made this project because I want to make more customizations and provide a free service option.
- OpenAI: the AI model provider.
License
Distributed under the MIT License. See LICENSE
for more information.