git-ai-cli
v0.0.3
Published
Automate commit message generation with AI-driven suggestions.
Downloads
7
Readme
Table of contents
About The Project
Git AI CLI automates the generation of commit messages using AI, based on your staged changes.
- AI-Powered Commit Messages: Automatically generate meaningful commit messages based on the changes you've staged, reducing the time spent writing commits manually.
- Customizable Inputs: Guide the AI by providing your own messages, allowing for more precise and contextually relevant commit messages.
- Edit Before Commit: Review and edit the generated commit message before finalizing the commit, giving you full control over the final output.
- Model Configuration: Easily configure and override the AI model used for generating commit messages, adapting to your specific needs.
- Debug Mode: Enable detailed logging with the --debug flag to gain insights into the commit generation process, helpful for troubleshooting and understanding the AI's behavior.
Installation
First, download and install Nodejs and Git.
npm install -g git-ai-cli
That's all you need to start! 🎉
Basic Usage
Generate a commit message based on the staged changes.
git ai [OPTION]
| Option | Description | Type | Default | Required? |
| --------------- | ----------------------------------------------------------------------- | -------- | ------- | --------- |
| -m, --message
| Provide a message to assist the model in generating the commit message. | string
| empty
| No |
| --model-id
| Override the selected Model Id for this commit generation. | bool
| false
| No |
| --dry-run
| Show the generated commit message without committing. | bool
| false
| No |
| -d, --debug
| Enable debug mode to log detailed information during execution. | bool
| false
| No |
For more detailed examples of how to use other commands, check out the Advanced Usage Guide.
Configuring
Configures the LLM model and sets up necessary credentials.
git ai config [OPTION]
| Option | Description | Type | Default | Required? |
| --------------- | --------------------------------------------------------------- | ------ | ------- | --------- |
| --list-models
| List available Models. | bool
| false
| No |
| --show-config
| Show the current configuration. | bool
| false
| No |
| --reset
| Reset configuration to default values. | bool
| false
| No |
| -d, --debug
| Enable debug mode to log detailed information during execution. | bool
| false
| No |
For more detailed examples of how to use other commands, check out the Advanced Usage Guide.
Debugging
To activate debugging mode and see detailed output during command execution, pass the --debug
flag to your command. This mode is useful for troubleshooting and understanding how the commit message was generated.
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
Code of Conduct
Git AI CLI has adopted a Code of Conduct that we expect project participants to adhere to. Please read the full text so that you can understand what actions will and will not be tolerated.
License
This project is licensed under the Apache 2.0 License. See LICENSE for more information.