relnote docs · CHANGELOG.md · Compare · Next version · GitHub Action · Single-file
Keep a Changelog 1.1.0, and what relnote writes
Keep a Changelog 1.1.0 is a convention for CHANGELOG.md: newest version first, a YYYY-MM-DD date, and six headings (Added, Changed, Deprecated, Removed, Fixed, Security). relnote can prepend one section from conventional commits. The heading shape matches. The six names do not. Flag-by-flag behavior of --changelog is on the CHANGELOG.md guide. This page is the format comparison.
What 1.1.0 specifies
The 1.1.0 page asks for a file named CHANGELOG.md, versions in reverse chronological order, an ISO date on each release, and grouped changes. The sample header is:
# Changelog
All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
The sample release heading is ## [1.1.0] - 2019-02-15, with no v inside the brackets. An ## [Unreleased] section sits at the top with no date, and you rename it when you cut the release. Compare links are reference definitions at the bottom of the file ([1.1.0]: https://github.com/owner/repo/compare/v1.0.0...v1.1.0). A yanked release is ## [0.0.5] - 2014-12-13 [YANKED]. The same page says a commit log is a poor changelog, because a changelog entry should be the notable difference, written for a reader.
What relnote writes
There is no config file and no flag that selects a template. These are the headings the code emits, in this order, and only when that group has commits:
- Breaking — a
type!subject (feat!:,fix!:, and the other types below), or aBREAKING CHANGE:/BREAKING-CHANGE:footer. The footer text is a nested bullet. - Features —
featandfeat(scope). A scope is rendered as**scope:**. - Fixes —
fixandfix(scope). - Other —
docs,style,refactor,perf,test,build,ci,chore,revert, and any subject that is not one of those types. A recognized type is bolded (**docs:**). Types are matched without regard to case.
chore(release): v1.3.0 is left out unless you pass --include-release-commits. Merge commits are left out unless you pass --include-merges. A subject that looks like a token or a key is left out. There is no flag to drop docs or chore as a group, and no flag to hide the short hash or the author name.
| Keep a Changelog 1.1.0 | relnote | |
|---|---|---|
| New file | # Changelog, then “will be documented”, then the keepachangelog and Semantic Versioning lines | # Changelog, then “All notable changes to this project are documented in this file.” The two extra lines are not added |
| Existing file | You maintain the preamble | Text before the first ## heading is kept. A preamble you already wrote stays |
| Release heading | ## [1.1.0] - 2019-02-15 | ## [TITLE] - YYYY-MM-DD. TITLE is --changelog-title. 1.1.0 and v1.1.0 are both accepted |
| Unreleased | ## [Unreleased], no date, renamed on release | ## [Unreleased] - YYYY-MM-DD when the title is omitted and HEAD is not a tag. The date is always written. The heading is not renamed later |
| Added | New features | ### Features from feat. Rename the heading yourself |
| Changed | Changes to existing behavior | No heading. refactor and perf land in Other |
| Deprecated | Soon to be removed | No heading and no commit type. Add the lines yourself |
| Removed | Now removed | No heading. A removal written as feat!: or a BREAKING CHANGE: footer is Breaking |
| Fixed | Bug fixes | ### Fixes from fix. Rename the heading yourself |
| Security | Vulnerabilities | No heading. A fix: subject stays under Fixes. Move the line yourself |
| Breaking | Not a heading. The site still says to list breaking changes | ### Breaking, plus a nested BREAKING CHANGE: bullet when the footer has text |
| Empty groups | Left out | Left out |
| Compare link | A reference definition at the bottom of the file | **Full changelog:** inside the section, only when origin is a github.com remote. Reference definitions are not written or updated |
| Yanked | [YANKED] on the heading | Not written. Add it yourself. The title is still that section, so a later run with the same title is refused |
| Older releases | You may edit them | Not rewritten. A duplicate title exits 1 and the file is unchanged |
Worked example
Newest tag v1.2.0, then these commits, oldest first. origin is https://github.com/you/project.git.
feat(cli): add export command (#12)
fix: handle empty config
docs: document the export command
chore: tidy the makefile
feat!: remove the v1 endpoint
BREAKING CHANGE: clients must call /v2.
python3 -m relnote --changelog CHANGELOG.md --changelog-title v1.3.0 --date 2026-12-03 --quiet
The file this command created:
# Changelog
All notable changes to this project are documented in this file.
## [v1.3.0] - 2026-12-03
### Breaking
- remove the v1 endpoint (`f647053`) — Ada Lovelace
- BREAKING CHANGE: clients must call /v2.
### Features
- **cli:** add export command ([#12](https://github.com/you/project/pull/12)) (`80cdb87`) — Ada Lovelace
### Fixes
- handle empty config (`743f165`) — Ada Lovelace
### Other
- **chore:** tidy the makefile (`58720c7`) — Ada Lovelace
- **docs:** document the export command (`d8e1d3e`) — Ada Lovelace
**Full changelog:** https://github.com/you/project/compare/v1.2.0...v1.3.0
That block is the file written by the command above in a scratch repository (tests/test_keep_a_changelog_docs.py). Short hashes follow the commits. The date is --date. Categories are newest commit first, and the order of categories is Breaking, Features, Fixes, Other. (#12) is a pull request link only in this file, and only because origin is github.com (v0.3.5). The Release body on stdout, if you drop --quiet, keeps (#12) as text. With no github.com origin, the bullet keeps (#12) and the **Full changelog:** line is absent. --format plain changes stdout only. The file is still these markdown headings.
A second run with --changelog-title v1.3.0 exits 1 and prints changelog already has a section for v1.3.0. The file is left as it was.
Edit the section by hand
This is the same section after a hand edit. relnote did not write these headings, and there is no flag that will. ### Features became ### Added, ### Fixes became ### Fixed, the breaking bullet moved under ### Removed, and the chore bullet moved under ### Changed. The docs bullet was deleted. Hashes and the author name were deleted. Deprecated and Security are absent because none of the commits were either.
## [1.3.0] - 2026-12-03
### Added
- **cli:** add export command ([#12](https://github.com/you/project/pull/12))
### Changed
- tidy the makefile
### Removed
- remove the v1 endpoint
- BREAKING CHANGE: clients must call /v2.
### Fixed
- handle empty config
Do that edit before you commit CHANGELOG.md. The next release is prepended above this section, so the renamed headings stay. If you want the 1.1.0 bracket form, pass --changelog-title 1.3.0 instead of editing the v off afterwards:
python3 -m relnote --changelog CHANGELOG.md --changelog-title 1.3.0 --date 2026-12-03 --quiet
On an untagged HEAD the compare line then ends at the title you passed. For this history that is https://github.com/you/project/compare/v1.2.0...1.3.0. A tag named v1.3.0 will not match that URL. Pass --changelog-title v1.3.0 when the tag has the v.
Unreleased
Omit --changelog-title while HEAD is not tagged:
python3 -m relnote --changelog CHANGELOG.md --date 2026-12-03 --quiet
The heading is ## [Unreleased] - 2026-12-03. Keep a Changelog’s sample has no date on Unreleased. Delete - 2026-12-03 yourself if you want that. There is no flag to omit the date. The default when --date is omitted is today in UTC.
relnote does not move an Unreleased section forward. A file that already contains ## [Unreleased] (with or without a date) makes this command exit 1: changelog already has a section for Unreleased. Bullets are not added to the existing section. At release time, change ## [Unreleased] - 2026-12-03 to ## [v1.3.0] - 2026-12-03 in the editor, tag, and let the next run start a new Unreleased section from commits after that tag. Or skip Unreleased and pass --changelog-title only when you cut the release, which is the flow on the CHANGELOG.md guide.
A file you already keep
If CHANGELOG.md already has the 1.1.0 preamble and older ## [1.2.0] sections, the new section is inserted after that preamble and before the first ## heading. Older sections stay byte for byte, including reference definitions at the bottom. relnote does not retarget an [Unreleased]: link and does not add [v1.3.0]:. Add those lines yourself if you use them.
To mark a release yanked, edit the heading to ## [0.0.5] - 2014-12-13 [YANKED]. relnote still treats that as the section for 0.0.5, so another run with --changelog-title 0.0.5 is refused.
--next-version prints the next tag (breaking bumps major, feat bumps minor, anything else bumps patch; while the major is 0, a breaking change bumps minor). It does not write the Semantic Versioning sentence into the file. See next version.
Install and run
Python 3.11+ and git on PATH. The v0.3.8 zipapp is the same pin as the single-file install. From a checkout, python3 -m relnote is the same CLI.
mkdir -p ~/.local/bin
curl -fsSL -o ~/.local/bin/relnote https://github.com/loki-inu/relnote/releases/download/v0.3.8/relnote
chmod +x ~/.local/bin/relnote
In GitHub Actions the inputs are changelog and changelog-title. There is no date input, so the section date is today UTC. The action edits the file in the runner only. Committing it, and any heading rename, is a later step. Full workflow: CHANGELOG.md from conventional commits and the GitHub Action guide.
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: loki-inu/relnote@v0.3.8
with:
changelog: CHANGELOG.md
changelog-title: v1.3.0
FAQ
Does relnote write Added, Changed, Deprecated, Removed, Fixed, and Security?
No. The headings are Breaking, Features, Fixes, and Other. feat goes under Features, fix under Fixes, and a type! subject or a BREAKING CHANGE: footer under Breaking. docs, style, refactor, perf, test, build, ci, chore, revert, and any other subject go under Other. Nothing selects Changed, Deprecated, Removed, or Security. No flag renames a heading. Edit the file after the run.
How does Unreleased work?
If you omit --changelog-title and HEAD is not tagged, the heading is ## [Unreleased] - YYYY-MM-DD. The date is always written. relnote does not rename that heading to a version, and it does not add bullets to an Unreleased section that is already in the file. That run exits 1 with changelog already has a section for Unreleased. At release, edit the heading, or pass --changelog-title for a new section.
Will a later run rewrite older sections or my edits?
No. The new section is inserted before the first ## heading. The preamble and older sections stay. A second run with the same title exits 1 and leaves the file unchanged, so a renamed heading or a deleted bullet stays until you change that text yourself.
Where does the compare link go?
Inside the section, as a **Full changelog:** line, and only when origin is a github.com remote. relnote does not write reference-style links at the bottom of the file. On an untagged HEAD, a version-shaped --changelog-title becomes the right-hand side of that URL, so --changelog-title v1.3.0 compares to v1.3.0 and --changelog-title 1.3.0 compares to 1.3.0.