The git-ai generates commit messages and pull requests automatically based on your tasks and file changes.
This project is a CLI developed in Rust which can be called using git-ai
cli to generate your commit messages based on code changes and a ticket / task.
[TODO] Adicionar gif
You can install it using a binary file from here or install as a package of your language:
[TODO] For each language
- It will create a local configuration file
git-ai initiate
- Declare these envinroment varibles:
# If you are using JIRA
GA_JIRA_API_KEY=<you can get it here: https://id.atlassian.com/manage-profile/security/api-tokens>
GA_JIRA_USER=<your user to sign in into jira>
# If you are using OPENAI
GA_OPENAI_TOKEN=<you can get it here: https://platform.openai.com/api-keys>
Example unix:
export GA_JIRA_USER="copiled@gmail.com" export GA_JIRA_TOKEN="ITH0AOKENTIJAR" export GA_OPENAI_TOKEN="sk-ODIAjsoid"
Example windows:
$Env:GA_JIRA_USER="copiled@gmail.com" $Env:GA_JIRA_TOKEN="ITH0AOKENTIJAR" $Env:GA_OPENAI_TOKEN="sk-ODIAjsoid"
git-ai generate [ticket-id]
or if you prefer using interactive mode:
git-ai generate -i
Command | Description | Arguments |
---|---|---|
generate or -g |
Generates a message with predefined arguments | (ticket-id or -t ), (interactive or -i ) |
(WIP) create or -c |
Creates a pull request with predefined arguments | (ticket-id or -t ), (interactive or -i ) |
initiate or -i |
Initializes the configuration | none |
git-ai --help
A CLI to generate your git messages!
Usage: git-ai [COMMAND]
Commands:
generate, -g, --generate Generates a message with predefined arguments
initiate, -i, --initiate Initializes the configuration
help Print this message or the help of the given subcommand(s)
Options:
-h, --help Print help