Skip to main content

keepmeachangelog

Tests Coverage Release Latest release PyPI Python npm pre-commit Ruff Keep a Changelog SemVer

Linter for changelogs following Keep a Changelog 1.1.0.

To use it in GitHub Actions, see keepmeachangelog-action, which reads a changelog entry and validates it with this linter.

pre-commit

repos:
  - repo: https://github.com/dcotecnologia/keepmeachangelog-lint
    rev: v0.4.0
    hooks:
      - id: keepmeachangelog-lint
        args: [--fix]

Pointing at a specific file

By default the hook runs on files named CHANGELOG / CHANGELOG.md (any directory). To lint a differently named or located file, override files in your config:

      - id: keepmeachangelog-lint
        files: ^docs/HISTORY\.md$

To lint a file even when it is not staged, add always_run: true and pass_filenames: false with the path as an argument:

      - id: keepmeachangelog-lint
        args: [docs/HISTORY.md]
        pass_filenames: false
        always_run: true

Or run directly: keepmeachangelog CHANGELOG.md.

Node projects (package.json)

The linter only reads the changelog, so it works in any project. For Node there is an npm package that ships the linter inside it, so the installed version is the version that runs, with no download. It needs Python 3.11+ on your PATH (python3 or python); set KEEPMEACHANGELOG_PYTHON to pick another interpreter.

Run it without installing (npm, Bun and Yarn):

npx keepmeachangelog .
bunx keepmeachangelog .
yarn dlx keepmeachangelog .

Or add it to the project and use a script:

npm i -D keepmeachangelog      # yarn add -D keepmeachangelog / bun add -d keepmeachangelog
{
  "scripts": {
    "changelog:lint": "keepmeachangelog --version-from package.json ."
  }
}

--version-from package.json requires a changelog entry for the version in package.json. Run npm run changelog:lint, or call it from CI.

With pre-commit, no npm package is needed (pre-commit builds its own Python environment):

repos:
  - repo: https://github.com/dcotecnologia/keepmeachangelog-lint
    rev: v0.4.0
    hooks:
      - id: keepmeachangelog-lint
        args: [--version-from, package.json]

Config

--config path/to/file.toml (keys at top level, or under [tool.keepmeachangelog] so you can point at a pyproject.toml):

title = "Changelog"                 # expected "# <title>"
sections = ["Added", "Changed", "Deprecated", "Removed", "Fixed", "Security"]
require-links = true                # each version needs a "[x.y.z]: url"
allow-empty-sections = false
validation-depth = 10              # optional: only the latest N released versions (Unreleased not counted); omit = all
version = "1.4.0"                  # optional: the changelog must have an entry for it
version-from = "pyproject.toml"    # optional: same, read from [project].version (or "package.json" -> version)
repo-url = "https://github.com/o/r"  # optional: enables generating/fixing version links
tag-prefix = "v"

--validation-depth N, --version X and --version-from pyproject.toml on the command line override the file.

In pre-commit: args: [--config, .changelog-lint.toml].

Rules

  • # Changelog title
  • Version headings ## [x.y.z] - YYYY-MM-DD (SemVer, valid ISO date, optional [YANKED]) or ## [Unreleased] (first, no date)
  • Latest version first (by version and date); no duplicate versions
  • Sections only Added, Changed, Deprecated, Removed, Fixed, Security; no duplicates, none empty
  • Each version has a link reference [x.y.z]: <url>

Same checks as mindsers/changelog-reader-action

So the pre-commit hook fails on whatever would fail the release workflow:

  • every released version is a valid SemVer; versions are in strictly increasing order (latest first)
  • a section must have listed items (Unreleased is exempt)
  • sections allowed by release type, comparing each version with the previous one: patch: Fixed, Security; minor: also Added, Changed, Deprecated; major/other: also Removed
  • validation-depth counts the newest N released versions (Unreleased excluded); the oldest one in the window is not compared with a predecessor
  • --version-from pyproject.toml fails if the changelog has no entry for the project version (the action's "No log entry found for version X")

Not covered: version_scheme: pep440. Note the action only validates when validation_level is warn or error (default error).

License

MIT

Metadata

Release files for keepmeachangelog 0.4.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 keepmeachangelog 0.4.0
File Size Uploaded Provenance Actions
keepmeachangelog-0.4.0.tar.gz 39.4 kB With provenance Details for keepmeachangelog-0.4.0.tar.gz

Built distribution (wheel)

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

Total release size: 50.5 kB

Release files / keepmeachangelog-0.4.0.tar.gz

Download URL keepmeachangelog-0.4.0.tar.gz
Size 39.4 kB
Tags Source
SHA-256 checksum
How to use checksums
af0a3739601c50146c0a528de1c8dd80ce5c7ae7a59deee1d64965790556cf84
BLAKE2b-256 checksum
How to use checksums
187b89989e4810895ac9b34a1fcd85552daf0fc8f4f750f2f0f1fee505e4f110
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 26, 2026.

Transparency log

Release files / keepmeachangelog-0.4.0-py3-none-any.whl

Download URL keepmeachangelog-0.4.0-py3-none-any.whl
Size 11.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fbf0f4eeaed51498955db341b0e80ca242f91ae2a23d1555fd427f42737f37cc
BLAKE2b-256 checksum
How to use checksums
dcfd90010771672ccbec92bda21884f398e1e3fbde7dc0ac9eb39c59069aa2c5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Nov 26, 2026.

Transparency log

Security for keepmeachangelog 0.4.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.

Select from 2 files

Attestation for keepmeachangelog-0.4.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 Nov 26, 2026.

Transparency log

A 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.

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