Skip to main content

🚀 TGIT - Tool for Git Interaction Temptation

CodeTime Badge CI codecov PyPI version Python 3.11+ License: MIT

TGIT is an AI-powered Git CLI for commit messages, changelog generation, and semantic versioning.

  • Generate conventional commits from staged changes
  • Build changelogs from commit history
  • Bump versions across common project files
  • Manage settings from .tgit.yaml or an interactive CLI

🔗 Links

✨ 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
  • Automatic version bumping based on commit history
  • Git tagging integration
  • Detects and updates version strings across many project file formats (see below)

Supported version file formats

Ecosystem File Notes
Node / npm package.json "version": "x.y.z"
Python pyproject.toml [project].version, [tool.poetry].version, [tool.flit.metadata].version, [tool.setuptools]
Python __about__.py __version__ = "x.y.z" — auto-discovered via [tool.hatch.version].path, [tool.hatch.build.targets.wheel].packages, or [project].name (also checks src/<pkg>/)
Python __init__.py __version__ = "x.y.z" — only files that actually define __version__ are touched, located in the same package dirs as __about__.py
Python setup.py version="x.y.z"
Rust Cargo.toml version inside the [package] section only
Gradle (Kotlin DSL) build.gradle.kts version = "x.y.z"
Dart / Flutter pubspec.yaml version: x.y.z (supports +build and quoted values)
Helm Chart.yaml version: x.y.z (apiVersion and appVersion are left untouched)
Generic VERSION, VERSION.txt Plain-text file containing only the version string

If no version file is found, TGIT falls back to the latest v* git tag.

In recursive mode (default), TGIT walks the working tree to bump every detected file at once — useful for monorepos. Use --no-recursive to limit updates to the project root.

⚙️ Flexible Configuration

  • Global and workspace-specific settings
  • YAML-based configuration files
  • Interactive settings management
  • Customizable commit types and emojis

🚀 Quick Start

Installation

uv tool install tgit
pipx install tgit
pip install tgit

Basic Usage

# Configure TGIT
tgit settings

# Generate an AI-powered commit message from staged changes
tgit commit

# Generate changelog for current version
tgit changelog

# Bump version and generate changelog
tgit version

Configuration

The recommended way to configure TGIT is through the interactive settings command:

# 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.)
  • Optional reasoning effort override (none, minimal, low, medium, high, xhigh)
  • Commit emoji preferences
  • Custom commit types
  • Global and workspace settings paths during view and save flows
  • Workspace overrides using effective defaults, with empty values falling back to inherited settings

Alternatively, you can manually create a .tgit.yaml file in your project root or ~/.tgit.yaml for global settings:

apiKey: "your-openai-api-key"
model: "gpt-5-mini"
reasoning_effort: "medium"
commit:
  emoji: true
  types:
    - type: "feat"
      emoji: "✨"
    - type: "fix"
      emoji: "🐛"

📖 Commands

Commit

# AI-powered commit
tgit commit

# Breaking change commit
tgit commit --breaking "remove deprecated api"

Changelog

# 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

# 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

# Interactive settings configuration
tgit settings

# Show current settings
tgit settings --show

When configuring workspace settings interactively, TGIT shows the effective values that are currently in use. Leave a string field empty to inherit from the global/default value, or choose Follow global/default for boolean settings.

You can also override the default reasoning effort used for AI commit generation with reasoning_effort. Use auto in the non-interactive settings command, or leave the field empty in interactive settings, to omit the field and fall back to the model-specific default. Those defaults vary by model family, for example gpt-5 defaults to medium, while gpt-5.4-mini defaults to none.

🛠️ Development

Setup

# Clone the repository
git clone https://github.com/Jannchie/tgit.git
cd tgit

# Install dependencies
uv sync

Testing

# 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

# Run linting
uv run ruff check .

# Run formatting
uv run ruff format .

# Build package
uv build

📄 License

This project is licensed under the MIT License - see the 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 on GitHub.

Metadata

Release files for tgit 0.35.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tgit 0.35.0
File Size Uploaded
tgit-0.35.0.tar.gz 250.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for tgit 0.35.0
File Interpreter ABI Platform
tgit-0.35.0-py3-none-any.whl Python 3 none any Details

Total release size: 292.5 kB

Release files / tgit-0.35.0.tar.gz

Download URL tgit-0.35.0.tar.gz
Size 250.2 kB
Tags Source
SHA-256 checksum
How to use checksums
cee921d4695edbd9134299d128db044dfd79e131c19b45eed1343b755eb71901
BLAKE2b-256 checksum
How to use checksums
73062a59510aec692b9267a34e41c924e3f5cefb40816154347214be8f0db1b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Release files / tgit-0.35.0-py3-none-any.whl

Download URL tgit-0.35.0-py3-none-any.whl
Size 42.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c64da0b1af776506e66e44b6fb66f02e68d1c8d4cd7a277f3674e83507cbf35f
BLAKE2b-256 checksum
How to use checksums
8e3a7f81239db0941a69ab0f2432507bb5f730889d12a88f6da4184e96089ecf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on May 22, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.35.0 This release

2 release files

0.34.2

2 release files

0.34.1

2 release files

0.34.0

2 release files

0.32.1

2 release files

0.32.0

2 release files

0.31.0

2 release files

0.30.0

2 release files

0.29.0

2 release files

0.27.0

2 release files

0.25.0

2 release files

0.24.0

2 release files

0.23.1

2 release files

0.23.0

2 release files

0.22.0

2 release files

0.17.1

2 release files

0.17.0

2 release files

0.16.0

2 release files

0.15.1

2 release files

0.13.2

2 release files

0.13.1

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.11.2

2 release files

0.11.1

2 release files

0.10.2

2 release files

0.10.1

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.2

2 release files

0.5.0

2 release files

0.4.3

2 release files

0.4.2

2 release files

0.4.1

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.2

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page