Generate a changelog from commits
Turn conventional commit messages into a CHANGELOG.md section with conventional-changelog, grouped by feature and fix. Works with any Git history.
If your commits follow the Conventional Commits format, a changelog can be generated rather than written. conventional-changelog reads the history since the last tag and groups it.
npx conventional-changelog -p conventionalcommits -i CHANGELOG.md -sAfter a fix: commit since version 1.0.0, the top of the file gains a section like this:
## [1.0.1](https://github.com/acme/my-lib/compare/v1.0.0...v1.0.1) (2026-03-02)
### Bug Fixes
* handle empty input in parse ([a1b2c3d](https://github.com/acme/my-lib/commit/a1b2c3d))The -i flag names the file and -s writes in place, so the new section is added above older ones. The date and hash are generated from your history. See the conventional-changelog project.
Only commits that follow the format appear, and commit types such as chore and docs are hidden by default. Review the output before releasing, since it reflects commit wording, which was written for developers, not users.
If you prefer to write release notes by hand, use Changesets instead, and keep the two approaches from mixing in one repository.