commitly
is a Git CLI extension that generates commit messages using an AI service.
To install the CLI tool, download the latest release from the GitHub releases page.
To use the commitly
command, simply run:
commitly
To preview the commit messages before committing, use the --preview
option:
commitly --preview
To configure the .gitconfig
file with the API key, add the following section to your .gitconfig
file:
[commitly]
apiKey = YOUR_API_KEY_HERE
Replace YOUR_API_KEY_HERE
with your actual API key.
To set the commitly.api-key
using the command git config --global
, run the following command:
git config --global commitly.api-key YOUR_API_KEY_HERE
Replace YOUR_API_KEY_HERE
with your actual API key.
Here are some examples of how to use the commitly
command:
# Generate a commit using the AI service
commitly
# Preview a commit using the AI service, then commit it
commitly --preview
# Generate maximum 2 commits using the AI service
commitly --max 2
To read the current configuration, use the config
command:
commitly config read
To update the CLI tool, use the update
command:
commitly update
The command will output a generated commit message based on the changes in your repository.