Hed
Extract release notes from markdown changelog that follow keep a changelog or common changelog format.
Hed, pronounced "head" (/hɛd/),
is journalistic shorthand referring to the "headline" of a news story.
Installation
pip install hed
With uv:
uv tool install hed
How it works
- Extract
--changeloglines between--capture-start(included) and--capture-end(not included). - Normalize the extracted headings so the topmost heading level
conform to
--top-heading, e.g.,## Titlebecomes# Title.
Depending on how it was configured, hed can apply some transformations
to the extracted release notes:
- If
--titleis provided, update the h1. - If
--diff-urlis provided, adds a link to compare between tags at the end. If--previous-tagis also provided, this tag is used to build the comparison link, otherwise,hedwill try to find the closest reachable tag from--tag.
Configuration
Some command-line options can be configured via hed.toml or pyproject.toml,
under the tool.hed namespace.
See https://toml.io/ for how to write TOML.
[tool.hed]
changelog = "CHANGELOG.md"
capture-start = '^## (\[{tag}\]|{tag})'
capture-end = '^## '
diff-url = "https://github.com/owner/repo/compare/{prev}...{tag}"
softbreak = true
title = "{tag}"
top-heading = 1
Usage
Given a CHANGELOG.md file similar to this:
# Changelog
## [1.0.1](https://github.com/owner/repo/releases/tag/1.0.1) - 2026-01-10
### Bug fixes
- Fixed a thing! (#1235)
## [1.0.0](https://github.com/owner/repo/releases/tag/1.0.0) - 2026-01-9
### Breaking changes
- Removed a deprecated feature. (#1234)
Extract and normalize release notes:
$ hed --tag 1.0.1
# [1.0.1](https://github.com/owner/repo/releases/tag/1.0.1) - 2026-01-10
## Bug fixes
- Fixed a thing! (#1235)
Change the title:
$ hed --tag 1.0.1 --title "{tag} Release Notes"
# 1.0.1 Release Notes
## Bug fixes
- Fixed a thing! (#1235)
Add a link to compare between releases:
$ hed --tag 1.0.1 --previous-tag 1.0.0 --diff-url "https://github.com/owner/repo/compare/{prev}...{tag}"
# [1.0.1](https://github.com/owner/repo/releases/tag/1.0.1) - 2026-01-10
## Bug fixes
- Fixed a thing! (#1235)
**Full Changelog:** [1.0.0...1.0.1](https://github.com/owner/repo/compare/1.0.0...1.0.1)
CI Integration
GitLab
Create a GitLab release using the release keyword.
gitlab-release:
stage: deploy
image: registry.gitlab.com/gitlab-org/cli:latest
rules:
- if: $CI_COMMIT_TAG
script:
- apk update && apk add curl
- curl -LsSf https://astral.sh/uv/install.sh | sh
- source $HOME/.local/bin/env
- uvx hed --tag $CI_COMMIT_TAG > RELEASE_NOTES.md
release:
tag_name: '$CI_COMMIT_TAG'
name: '$CI_COMMIT_TAG'
description: 'RELEASE_NOTES.md'
GitHub
Create a GitHub release using softprops/action-gh-release.
jobs:
draft-release:
name: Create Release
runs-on: ubuntu-latest
if: github.ref_type == 'tag'
permissions:
contents: write
steps:
- uses: astral-sh/setup-uv@v7
- run: uvx hed --tag "${{ github.ref_name }}" > RELEASE_NOTES.md
- uses: softprops/action-gh-release@v2
with:
body_path: 'RELEASE_NOTES.md'
Contributing
For guidance on setting up a development environment and contributing, see CONTRIBUTING.md.
Metadata
Release files for hed 1.3.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| hed-1.3.0.tar.gz | 49.8 kB | With provenance | Details for hed-1.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| hed-1.3.0-py3-none-any.whl | Python 3 | none | any | Details for hed-1.3.0-py3-none-any.whl |
Total release size: 60.5 kB
Release files / hed-1.3.0.tar.gz
| Download URL | hed-1.3.0.tar.gz |
|---|---|
| Size | 49.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2e3ae044239bc4a9930f2feb604115f477658cbba517c3b9e773f12619fa317f
|
|
BLAKE2b-256 checksum How to use checksums |
9d1c78efde54c5035319af803c3955c3728a525a37e849ec180f63b547afdf22
|
| 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 Apr 11, 2026.
Transparency logRelease files / hed-1.3.0-py3-none-any.whl
| Download URL | hed-1.3.0-py3-none-any.whl |
|---|---|
| Size | 10.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf4970ed69c2f929ab55d462bb4656f93298174262d4535946d0651b4c575daa
|
|
BLAKE2b-256 checksum How to use checksums |
4e74187d63da35a3846c5d190ad0c0e7bd0efb48fe9da82e9694a8fdfb596661
|
| 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 Apr 11, 2026.
Transparency logSecurity for hed 1.3.0
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for hed-1.3.0.tar.gz
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 Apr 11, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.