Skip to main content

GPTChangelog

Automatically generate detailed, well-structured changelogs from your git commit history using OpenAI's GPT models.

Features

  • 🤖 AI-powered changelog generation from git commit messages
  • 🔄 Automatic semantic versioning determination
  • 🏷️ Support for conventional commits
  • ✨ Beautiful formatting with Markdown
  • 🧠 Smart categorization of changes
  • 🖋️ Interactive editing mode
  • 📋 Customizable templates
  • 🛠️ Project-specific or global configuration
  • 🗂️ Run against any repo path with a single command (--repo)
  • 🖥️ Optional Textual TUI for exploring results (--ui textual)

Installation

Install from PyPI with your preferred toolchain:

pip install gptchangelog

Or run it directly with uv:

uv tool run gptchangelog --help

Or use uvx for an ephemeral execution without pre-installing the tool:

uvx gptchangelog --help

Quick Start

Using pip or a virtual environment

  1. Initialize the configuration (only needed once):
gptchangelog config init
  1. Generate a changelog from your latest tag:
gptchangelog generate

The tool will:

  • Fetch commit messages since your latest tag
  • Process and categorize them using OpenAI
  • Determine the next version number based on semantic versioning
  • Generate a well-structured changelog
  • Prepend it to your CHANGELOG.md file

Using uv (no manual virtualenv required)

uv tool run gptchangelog config init
uv tool run gptchangelog generate

# or, for one-off runs, use uvx
uvx gptchangelog config init
uvx gptchangelog generate

Command Line Usage

gptchangelog generate [OPTIONS]

Options

  • --since <ref>: Starting point (commit hash, tag, or reference)
  • --to <ref>: Ending point (commit hash, tag, or reference, defaults to HEAD)
  • --repo <path>: Run against a different git repository without changing directories
  • --output <file>, -o <file>: Output file (defaults to CHANGELOG.md)
  • --current-version <version>: Override the current version
  • --dry-run: Generate changelog but don't save it
  • --interactive, -i: Review and edit before saving
  • --ui {auto,textual,plain}: Choose between the Textual TUI and plain console output (default: auto)

Examples

Generate changelog since the latest tag:

gptchangelog generate

Generate changelog between two specific tags:

gptchangelog generate --since v1.0.0 --to v2.0.0

Generate changelog with interactive editing:

gptchangelog generate -i

Run against another repository without leaving your current directory:

gptchangelog generate --repo ../another-project

Add commit statistics and quality checks to the output:

gptchangelog generate --stats --quality-analysis

Launch the Textual TUI review experience:

gptchangelog generate --ui textual

With uv you can mirror the same commands by replacing gptchangelog with uv tool run gptchangelog, for example:

uv tool run gptchangelog generate --repo ../another-project --stats --quality-analysis

# or run ad-hoc with uvx
uvx gptchangelog generate --repo ../another-project --stats --quality-analysis

Configuration

GPTChangelog supports both global and project-specific configuration:

  • Global: Stored in ~/.config/gptchangelog/config.ini
  • Project: Stored in ./.gptchangelog/config.ini

Managing Configuration

Show current configuration:

gptchangelog config show

Initialize configuration:

gptchangelog config init

Configuration Options

  • api_key: Your OpenAI API key
  • model: The OpenAI model to use (default: gpt-5-mini)
  • max_context_tokens: Maximum tokens to use in each API call (default: 200000)

Integrating with CI/CD

You can integrate GPTChangelog into your CI/CD pipeline to automatically generate changelogs for new releases:

# Example GitHub Actions workflow
name: Generate Changelog

on:
  push:
    tags:
      - 'v*'

jobs:
  changelog:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v3
        with:
          fetch-depth: 0  # Important to fetch all history

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.10'

      - name: Install dependencies
        run: |
          python -m pip install --upgrade pip
          pip install gptchangelog

      - name: Generate changelog
        run: |
          echo "OPENAI_API_KEY=${{ secrets.OPENAI_API_KEY }}" > .env
          gptchangelog generate --since $(git describe --tags --abbrev=0 --match "v*" HEAD^) --to ${{ github.ref_name }} --ui plain

Working from Source

To develop GPTChangelog locally, use uv to manage dependencies:

git clone https://github.com/xjodoin/gptchangelog.git
cd gptchangelog
uv sync --dev --extra docs --extra release
uv run gptchangelog config init  # optional: seeds local config
uv run gptchangelog generate --dry-run

uv sync creates a managed virtual environment with the editable package and all tooling needed for docs, testing, and releases. uv run ... executes commands inside that environment, so there is no need to activate the virtualenv manually.

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Metadata

Release files for gptchangelog 0.10.1

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

Source distribution (sdist)

Source distribution for gptchangelog 0.10.1
File Size Uploaded
gptchangelog-0.10.1.tar.gz 42.3 kB Details

Built distribution (wheel)

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

Total release size: 90.5 kB

Release files / gptchangelog-0.10.1.tar.gz

Download URL gptchangelog-0.10.1.tar.gz
Size 42.3 kB
Tags Source
SHA-256 checksum
How to use checksums
adfd54da480c2a2a92743bbd3040ad002fb05ebcdf186c4e28ab5ce89c3627c1
BLAKE2b-256 checksum
How to use checksums
28bafbec3f53c6fdada08950347288224409ffe62a1bad7d52503e4ca1335027
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release files / gptchangelog-0.10.1-py3-none-any.whl

Download URL gptchangelog-0.10.1-py3-none-any.whl
Size 48.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d95757a7fbff61d00c8e9afe8fab93e26fbd9926c2d94eb7bde34ba3f038e956
BLAKE2b-256 checksum
How to use checksums
c66760715d907732e83292095f4620fdc0c5b53bf7652a6766be606cba95448e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.11

Release history Release notifications | RSS feed

This release

0.10.1 This release

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.2

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.5

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

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