This project revolutionizes your Git workflow by automatically generating meaningful and structured commit messages using GitHub Copilot. It harnesses the power of AI to analyze code changes and suggest appropriate commit messages following modified Gitmoji standards. Beyond commit messages, this toolkit provides a suite of powerful utilities including file operations, directory management, and an interactive AI chat interface.
🌟 Key Highlights:
- AI-powered commit message generation
- Interactive chat interface with AI models
- Comprehensive file and directory management tools
- Clean and modular architecture
- 🤖 Smart Commit Messages: Automatically generates contextually aware commit messages based on your code changes
- 💬 AI Chat Interface: Natural language interaction with AI models for development assistance
- 📁 Directory Tools: Advanced directory structure analysis and visualization
- 📄 File Operations: Robust utilities for file handling and content processing
- 🔧 Modular Architecture: Easily extensible with new tools and functionalities
- ⚙️ Flexible Configuration: Customizable commit templates and AI model settings
- Integration with GitHub Copilot API
- Support for multiple AI models
- Efficient file system operations
- Comprehensive error handling
- Python 3.6 or higher
- Git installed and configured
- GitHub Copilot account
- Internet connection for AI features
-
Clone the Repository
git clone https://github.com/Floteur/git_commit cd git_commit -
Set Up Environment
# Install dependencies pip install -r requirements.txt # Create configuration file cp .env.json.example .env.json
-
Configure Settings Edit
.env.jsonwith your credentials:
Generate AI-powered commit messages with a single command:
./commit_msg.pyThe tool will:
- Analyze your staged changes
- Generate a contextual commit message
- Allow you to review and modify before committing
Launch the AI chat assistant:
./chat.pyFeatures:
- Natural language interaction
- Code explanation
- Development guidance
- Project-specific context awareness
from directory_tools import get_directory_tree_string
# Generate directory structure visualization
tree = get_directory_tree_string(
path='.',
max_depth=2,
exclude=['.git', '__pycache__']
)
print(tree)from file_tools import read_file, edit_file
# Read file contents
content = read_file({'path': 'example.txt'})
# Edit files programmatically
edit_file({
'path': 'example.txt',
'content': 'your_edit_pattern_here'
})Create a .env.json file with your settings:
{
"TOKEN": "your_github_copilot_token_here",
"MODEL": "gpt-4"
}- Commit message templates
- AI model selection
- Directory exclusion patterns
- File operation parameters
We welcome contributions! Here's how you can help:
- 🍴 Fork the repository
- 🔧 Create a feature branch (
git checkout -b feature/amazing-feature) - 💻 Commit your changes (
git commit -m 'Add amazing feature') - 🚀 Push to the branch (
git push origin feature/amazing-feature) - 🎉 Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- GitHub Copilot team for their amazing API
- Contributors and maintainers
- Open source community
- Project Link: https://github.com/Floteur/git_commit
- Report Issues: Issue Tracker