AI-Powered Git Commit Message Generator
- .env.example 0 bytes
- .gitignore 56 bytes
- LICENSE 1.0 KB
- README.md 2.3 KB
- __init__.py 58 bytes
- ai_commit.py 1.1 KB
- ai_modify.py 1.2 KB
- ar-ai-modify 331 bytes
- ar-code-overview 336 bytes
- ar-git-commit 235 bytes
- build_tree_sitter_languages.py 209 bytes
- code_overview.py 1.6 KB
- git_operations.py 324 bytes
- main.py 981 bytes
- requirements.txt 281 bytes
- settings.py 540 bytes
- setup.py 222 bytes
- show_py_files.sh 515 bytes
AskRobotsCommitGen
Overview
AskRobotsCommitGen is an AI-powered tool designed to generate meaningful git commit messages. It leverages OpenAI's GPT model to analyze your git diffs and suggest concise, relevant commit messages. The tool can now automatically commit changes with the generated message.
Additionally, it includes a command to modify existing files with AI, running like ar-ai-modify notes.txt "Make a list of the most common git commands used by django devs". This offers an effective method to edit files for Django developers streamlining their workflow with common git commands.
Features
- AI-powered commit message generation.
- Easy integration with existing git workflows.
- Option to automatically commit changes with the AI-generated message.
- AI-powered file modification with specific instructions.
- Customizable message formats.
Prerequisites
- Python 3.7 or higher
- Git
Installation
Clone the repository:
git clone https://github.com/yourusername/askrobots_commitgen.git
cd askrobots_commitgen
Install the required dependencies:
pip install -r requirements.txt
Configuration
Set up your OpenAI API key in an environment variable:
export OPENAI_API_KEY='your-api-key'
Option alias in .zshrc to give a shortcut for running instead of "python path-to-commitgen/main.py" you run "commitgen"
alias commitgen='python ~/IdeaProjects/askrobots_commitgen/main.py'
Usage
Run the script in your git repository:
To automatically commit changes with the AI-generated message:
python main.py
To only display the generated commit message without committing:
python main.py --show-only
To modify a file with AI, run the following command:
ar-ai-modify notes.txt "Make a list of the most common git commands used by django devs"
Contributing
Contributions to AskRobotsCommitGen are welcome! Please read our contributing guidelines for details on how to contribute.
License
AskRobotsCommitGen is open-sourced software licensed under the MIT license.
Contact
For questions or feedback, please reach out to dan@quellhorst.com.
Acknowledgments
- This project is inspired by aicommit.
- Thanks to OpenAI for providing the GPT API.