Automatically generate detailed, well-structured changelogs from your git commit history using OpenAI models or an OpenAI Codex ChatGPT subscription.
- π€ AI-powered changelog generation from git commit messages
- π Automatic semantic versioning determination
- π·οΈ Support for conventional commits
- β¨ Beautiful formatting with Markdown
- π§ Smart categorization of changes
- π§Ή Filters noisy commits so release notes stay focused
- ποΈ Interactive editing mode
- π Customizable templates
- π οΈ Project-specific or global configuration
- π Supports both OpenAI API keys and local Codex ChatGPT sign-in reuse
- ποΈ Run against any repo path with a single command (
--repo) - π₯οΈ Optional Textual TUI for exploring results (
--ui textual)
Install from PyPI with your preferred toolchain:
pip install gptchangelogOr run it directly with uv:
uv tool run gptchangelog --helpOr use uvx for an ephemeral execution without pre-installing the tool:
uvx gptchangelog --helpIf you want to run the local checkout without creating a virtual environment:
uvx --from . gptchangelog --help- Initialize the configuration (only needed once):
gptchangelog config initIf you want to use your OpenAI Codex subscription instead of an API key, sign in once first:
codex login
gptchangelog config init- Generate a changelog from your latest tag:
gptchangelog generateThe 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
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
# or run the local checkout with uvx
uvx --from . gptchangelog config init
uvx --from . gptchangelog generategptchangelog generate [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--provider {openai,codex}: Use the OpenAI API or reuse a local Codex ChatGPT login--ui {auto,textual,plain}: Choose between the Textual TUI and plain console output (default: auto)
Generate changelog since the latest tag:
gptchangelog generateGenerate changelog between two specific tags:
gptchangelog generate --since v1.0.0 --to v2.0.0Generate changelog with interactive editing:
gptchangelog generate -iRun against another repository without leaving your current directory:
gptchangelog generate --repo ../another-projectAdd commit statistics and quality checks to the output:
gptchangelog generate --stats --quality-analysisLaunch the Textual TUI review experience:
gptchangelog generate --ui textualForce the Codex subscription backend for a one-off run:
gptchangelog generate --provider codex --model gpt-5.4-miniWith 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-analysisGPTChangelog supports both global and project-specific configuration:
- Global: Stored in
~/.config/gptchangelog/config.ini - Project: Stored in
./.gptchangelog/config.ini
Show current configuration:
gptchangelog config showInitialize configuration:
gptchangelog config initprovider:openaifor API keys orcodexto reuse~/.codex/auth.jsonapi_key: Your OpenAI API key whenprovider = openaimodel: The model to use. Defaults togpt-5.5foropenaiandgpt-5.4-miniforcodex
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 plainTo 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-runuv 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.
MIT
Contributions are welcome! Please feel free to submit a Pull Request.