https://github.com/jannchie/tgit
Tool for managing git repositories.
https://github.com/jannchie/tgit
ai git
Last synced: 4 months ago
JSON representation
Tool for managing git repositories.
- Host: GitHub
- URL: https://github.com/jannchie/tgit
- Owner: Jannchie
- Created: 2024-04-05T14:35:47.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-12-21T17:52:45.000Z (6 months ago)
- Last Synced: 2025-12-23T06:56:10.197Z (6 months ago)
- Topics: ai, git
- Language: Python
- Homepage:
- Size: 984 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# 🚀 TGIT - Tool for Git Interaction Temptation
[](https://codetime.dev)
[](https://codecov.io/gh/Jannchie/tgit)
[](https://badge.fury.io/py/tgit)
[](https://www.python.org/downloads/)
[](https://opensource.org/licenses/MIT)
An elegant CLI tool that simplifies and streamlines your Git workflow with AI-powered commit messages, automated changelog generation, and intelligent version management.
## ✨ Features
### 🤖 AI-Powered Commits
- Generate conventional commit messages automatically using OpenAI
- Smart diff analysis that focuses on meaningful changes
- Support for custom commit types and emojis
- Breaking change detection
- Two-level secret scanning: prompts (default yes) for key names and blocking prompts for exposed values
### 📝 Automated Changelog
- Generate beautiful, structured changelogs from conventional commits
- Group commits by type with emoji categorization
- Support for multiple output formats
- Automatic git remote URL detection for commit links
### 🔢 Intelligent Version Management
- Semantic versioning with pre-release support
- Support for multiple project files (package.json, pyproject.toml, Cargo.toml, etc.)
- Automatic version bumping based on commit history
- Git tagging integration
### ⚙️ Flexible Configuration
- Global and workspace-specific settings
- YAML-based configuration files
- Interactive settings management
- Customizable commit types and emojis
## 🚀 Quick Start
### Installation
```bash
pip install tgit
```
### Basic Usage
```bash
# AI-powered commit with automatic message generation
tgit commit
# Generate changelog for current version
tgit changelog
# Bump version and generate changelog
tgit version
### Configuration
The easiest way to configure TGIT is through the interactive settings command:
```bash
# Interactive configuration - recommended!
tgit settings
```
This will guide you through setting up:
- OpenAI API key for AI-powered commits
- Preferred AI model (gpt-5-mini, gpt-4.1, etc.)
- Commit emoji preferences
- Custom commit types
Alternatively, you can manually create a `.tgit.yaml` file in your project root or `~/.tgit.yaml` for global settings:
```yaml
apiKey: "your-openai-api-key"
model: "gpt-5-mini"
commit:
emoji: true
types:
- type: "feat"
emoji: "✨"
- type: "fix"
emoji: "🐛"
```
## 📖 Commands
### Commit
```bash
# AI-powered commit
tgit commit
# Breaking change commit
tgit commit --breaking "remove deprecated api"
```
### Changelog
```bash
# Generate changelog for current version
tgit changelog
# Generate changelog from specific version
tgit changelog --from v1.0.0
# Generate changelog to specific version
tgit changelog --to v2.0.0
```
### Version
```bash
# Interactive version bump
tgit version
# Limit to root only (disable recursive bump)
tgit version --no-recursive
# Bump specific version type
tgit version --patch
tgit version --minor
tgit version --major
# Pre-release version
tgit version --prerelease alpha
```
### Settings
```bash
# Interactive settings configuration
tgit settings
# Show current settings
tgit settings --show
```
## 🛠️ Development
### Setup
```bash
# Clone the repository
git clone https://github.com/Jannchie/tgit.git
cd tgit
# Install with uv
uv pip install -e .
# Install development dependencies
uv pip install -e ".[dev]"
```
### Testing
```bash
# Run all tests
./scripts/test.sh
# Run with coverage
./scripts/test.sh --coverage 90
# Run specific test types
./scripts/test.sh --unit
./scripts/test.sh --integration
```
### Code Quality
```bash
# Run linting
ruff check .
# Run formatting
ruff format .
# Build package
uv build
```
## 📄 License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
## 🤝 Contributing
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
## 📞 Support
If you encounter any problems or have suggestions, please [open an issue](https://github.com/Jannchie/tgit/issues) on GitHub.