A docker used to run AI Commits pacakge, without install Node.js on your host.
Remeber to get your OPENAI_KEY
here: https://platform.openai.com/account/api-keys
docker build --build-arg OPENAI_KEY=<your_openai_key> --tag vlauciani/aicommits .
Go to your repo, stage your files, run docker and finally push:
git add <files...>
docker run -it --rm -v ${HOME}/.gitconfig:/root/.gitconfig -v $(pwd):/git vlauciani/aicommits sh -c "cd /git && aicommits"
git push
To semplify, create an alias in your shell; for example:
alias aic='docker run -it --rm -v ${HOME}/.gitconfig:/root/.gitconfig -v $(pwd):/git vlauciani/aicommits sh -c "cd /git && aicommits"'
then:
git add <files...>
aic
git push
In case of you receive the message:
┌ aicommits
│
└ ✖ The current directory must be a Git repository!
you need simply run, one time, the command:
git config --global --add safe.directory /git
and try again.
Thanks to your contributions!
Here is a list of users who already contributed to this repository:
(c) 2024 Valentino Lauciani valentino.lauciani[at]ingv.it