Gathering detailed insights and metrics for auto-changelog
Gathering detailed insights and metrics for auto-changelog
Gathering detailed insights and metrics for auto-changelog
Gathering detailed insights and metrics for auto-changelog
@taiga-ui/auto-changelog-config
Taiga UI auto-changelog config
auto
CLI tools to help facilitate semantic versioning based on GitHub PR labels
@auto-canary/npm
NPM publishing plugin for auto
@metamask/auto-changelog
Utilities for validating and updating "Keep a Changelog" formatted changelogs
Command line tool for generating a changelog from git tags and commit history
npm install auto-changelog
Typescript
Module System
Min. Node Version
Node Version
NPM Version
93.9
Supply Chain
98.4
Quality
76.7
Maintenance
100
Vulnerability
100
License
JavaScript (93.38%)
Handlebars (6.62%)
Total Downloads
25,823,562
Last Day
10,547
Last Week
176,291
Last Month
716,205
Last Year
7,043,213
MIT License
1,343 Stars
330 Commits
157 Forks
16 Watchers
10 Branches
30 Contributors
Updated on Jul 01, 2025
Minified
Minified + Gzipped
Latest Version
2.5.0
Package Id
auto-changelog@2.5.0
Unpacked Size
83.27 kB
Size
24.46 kB
File Count
17
NPM Version
10.5.0
Node Version
20.12.0
Published on
Sep 11, 2024
Cumulative downloads
Total Downloads
Last Day
-23.8%
10,547
Compared to previous day
Last Week
-3%
176,291
Compared to previous week
Last Month
15.4%
716,205
Compared to previous month
Last Year
-0.4%
7,043,213
Compared to previous year
Command line tool for generating a changelog from git tags and commit history. Used by Modernizr, Netlify, Neutrino and Velocity.js.
1npm install -g auto-changelog
Simply run auto-changelog
in the root folder of a git repository. git log
is run behind the scenes in order to parse the commit history.
1Usage: auto-changelog [options] 2 3Options: 4 5 -o, --output [file] # output file, default: CHANGELOG.md 6 -c, --config [file] # config file location, default: .auto-changelog 7 -t, --template [template] # specify template to use [compact, keepachangelog, json], default: compact 8 -r, --remote [remote] # specify git remote to use for links, default: origin 9 -p, --package # use version from package.json as latest release 10 -v, --latest-version [version] # use specified version as latest release 11 -u, --unreleased # include section for unreleased changes 12 -l, --commit-limit [count] # number of commits to display per release, default: 3 13 -b, --backfill-limit [count] # number of commits to backfill empty releases with, default: 3 14 --commit-url [url] # override url for commits, use {id} for commit id 15 --issue-url [url] # override url for issues, use {id} for issue id 16 --merge-url [url] # override url for merges, use {id} for merge id 17 --compare-url [url] # override url for compares, use {from} and {to} for tags 18 --issue-pattern [regex] # override regex pattern for issues in commit messages 19 --breaking-pattern [regex] # regex pattern for breaking change commits 20 --merge-pattern [regex] # add custom regex pattern for merge commits 21 --commit-pattern [regex] # pattern to include when parsing commits 22 --ignore-commit-pattern [regex] # pattern to ignore when parsing commits 23 --tag-pattern [regex] # override regex pattern for version tags 24 --tag-prefix [prefix] # prefix used in version tags, default: v 25 --starting-version [tag] # specify earliest version to include in changelog 26 --starting-date [yyyy-mm-dd] # specify earliest date to include in changelog 27 --ending-version [tag] # specify latest version to include in changelog 28 --sort-commits [property] # sort commits by property [relevance, date, date-desc, subject, subject-desc], default: relevance 29 --release-summary # display tagged commit message body as release summary 30 --unreleased-only # only output unreleased changes 31 --hide-empty-releases # hide empty releases 32 --hide-credit # hide auto-changelog credit 33 --handlebars-setup [file] # handlebars setup file 34 --append-git-log [string] # string to append to git log command 35 --append-git-tag [string] # string to append to git tag command 36 --prepend # prepend changelog to output file 37 --stdout # output changelog to stdout 38 --plugins [...name] # use plugins to augment commit/merge/release information 39 -V, --version # output the version number 40 -h, --help # output usage information 41 42 43# Write log to CHANGELOG.md in current directory 44auto-changelog 45 46# Write log to HISTORY.md using keepachangelog template 47auto-changelog --output HISTORY.md --template keepachangelog 48 49# Disable the commit limit, rendering all commits for every release 50auto-changelog --commit-limit false
auto-changelog
is designed to be as flexible as possible, providing a clear changelog for any project. There are only two absolute requirements:
1.7.2
or laternpm version
There are some less strict requirements to improve your changelog:
Install auto-changelog
to dev dependencies:
1npm install auto-changelog --save-dev 2# or 3yarn add auto-changelog --dev
Add auto-changelog -p && git add CHANGELOG.md
to the version
scripts in your package.json
:
1{ 2 "name": "my-awesome-package", 3 "version": "1.0.0", 4 "devDependencies": { 5 "auto-changelog": "*" 6 }, 7 "scripts": { 8 "version": "auto-changelog -p && git add CHANGELOG.md" 9 } 10}
Using -p
or --package
uses the version
from package.json
as the latest release, so that all commits between the previous release and now become part of that release. Essentially anything that would normally be parsed as Unreleased
will now come under the version
from package.json
Now every time you run npm version
, the changelog will automatically update and be part of the version commit.
Links to commits, issues, pull requests and version diffs are automatically generated based on your remote URL. GitHub, GitLab, BitBucket and Azure DevOps are all supported. If you have an unusual remote or need to override one of the link formats, use --commit-url
, --issue-url
or --merge-url
with an {id}
token. For custom version diffs, use --compare-url
with {from}
and {to}
tokens.
1# Link all issues to redmine 2auto-changelog --issue-url https://www.redmine.org/issues/{id} 3 4# Link to custom diff page 5auto-changelog --compare-url https://example.com/repo/compare/{from}...{to}
If you’d like to keep an existing changelog below your generated one, just add <!-- auto-changelog-above -->
to your current changelog. The generated changelog will be added above this token, and anything below will remain.
You can set any option in package.json
under the auto-changelog
key, using camelCase options.
1{ 2 "name": "my-awesome-package", 3 "version": "1.0.0", 4 "scripts": { 5 // ... 6 }, 7 "auto-changelog": { 8 "output": "HISTORY.md", 9 "template": "keepachangelog", 10 "unreleased": true, 11 "commitLimit": false 12 } 13}
You can also store config options in an .auto-changelog
file in your project root:
1{ 2 "output": "HISTORY.md", 3 "template": "keepachangelog", 4 "unreleased": true, 5 "commitLimit": false 6}
Note that any options set in package.json
will take precedence over any set in .auto-changelog
.
Use --tag-prefix [prefix]
if you prefix your version tags with a certain string:
1# When all versions are tagged like my-package/1.2.3 2auto-changelog --tag-prefix my-package/
By default, auto-changelog
looks for valid semver tags to build a list of releases. If you are using another format (or want to include all tags), use --tag-pattern [regex]
:
1# When all versions are tagged like build-12345 2auto-changelog --tag-pattern build-\d+ 3 4# Include any tag as a release 5auto-changelog --tag-pattern .+
If you use a common pattern in your commit messages for breaking changes, use --breaking-pattern
to highlight those commits as breaking changes in your changelog. Breaking change commits will always be listed as part of a release, regardless of any --commit-limit
set.
1auto-changelog --breaking-pattern "BREAKING CHANGE:"
By default, auto-changelog
will parse GitHub-style issue fixes in your commit messages. If you use Jira or an alternative pattern in your commits to reference issues, you can pass in a custom regular expression to --issue-pattern
along with --issue-url
:
1# Parse Jira-style issues in your commit messages, like PROJECT-418 2auto-changelog --issue-pattern [A-Z]+-\d+ --issue-url https://issues.apache.org/jira/browse/{id}
Or, in your package.json
:
1{ 2 "name": "my-awesome-package", 3 "auto-changelog": { 4 "issueUrl": "https://issues.apache.org/jira/browse/{id}", 5 "issuePattern": "[A-Z]+-\d+" 6 } 7}
If you use a certain pattern before or after the issue number, like fixes {id}
, just use a capturing group:
1# "This commit fixes ISSUE-123" will now parse ISSUE-123 as an issue fix 2auto-changelog --issue-pattern "[Ff]ixes ([A-Z]+-\d+)"
If you aren’t happy with the default templates or want to tweak something, you can point to a handlebars template in your local repo. Check out the existing templates to see what is possible.
Save changelog-template.hbs
somewhere in your repo:
1### Changelog 2My custom changelog template. Don’t worry about indentation here; it is automatically removed from the output. 3 4{{#each releases}} 5 Every release has a {{title}} and a {{href}} you can use to link to the commit diff. 6 It also has an {{isoDate}} and a {{niceDate}} you might want to use. 7 {{#each merges}} 8 - A merge has a {{message}}, an {{id}} and a {{href}} to the PR. 9 {{/each}} 10 {{#each fixes}} 11 - Each fix has a {{commit}} with a {{commit.subject}}, an {{id}} and a {{href}} to the fixed issue. 12 {{/each}} 13 {{#each commits}} 14 - Commits have a {{shorthash}}, a {{subject}} and a {{href}}, {{author}} amongst other things. 15 {{/each}} 16{{/each}}
Then just use --template
to point to your template:
1auto-changelog --template changelog-template.hbs
You can also point to an external template by passing in a URL:
1auto-changelog --template https://example.com/templates/compact.hbs
To see exactly what data is passed in to the templates, you can generate a JSON version of the changelog:
1auto-changelog --template json --output changelog-data.json
commit-list
helperUse {{#commit-list}}
to render a list of commits depending on certain patterns in the commit messages:
1{{#each releases}} 2 ### [{{title}}]({{href}}) 3 4 {{! List commits with `Breaking change: ` somewhere in the message }} 5 {{#commit-list commits heading='### Breaking Changes' message='Breaking change: '}} 6 - {{subject}} [`{{shorthash}}`]({{href}}) 7 {{/commit-list}} 8 9 {{! List commits that add new features, but not those already listed above }} 10 {{#commit-list commits heading='### New Features' message='feat: ' exclude='Breaking change: '}} 11 - {{subject}} [`{{shorthash}}`]({{href}}) 12 {{/commit-list}} 13{{/each}}
Option | Description |
---|---|
heading | A heading for the list, only renders if at least one commit matches |
message | A regex pattern to match against the entire commit message |
subject | A regex pattern to match against the commit subject only |
exclude | A regex pattern to exclude from the list – useful for avoiding listing commits more than once |
To insert links or other markup to PR titles and commit messages that appear in the log, use the replaceText
option in your package.json
:
1{ 2 "name": "my-awesome-package", 3 "auto-changelog": { 4 "replaceText": { 5 "(ABC-\\d+)": "[`$1`](https://issues.apache.org/jira/browse/$1)" 6 } 7 } 8}
Here, any time a pattern like ABC-123
appears in your log, it will be replaced with a link to the relevant issue in Jira. Each pattern is applied using string.replace(new RegExp(key, 'g'), value)
.
The --handlebars-setup
options allows you to point to a file to add custom Handlebars helpers, for use in custom templates using --template
. Paths are relative to the directory in which you run auto-changelog
.
1auto-changelog --handlebars-setup setup.js --template custom-template.hbs 2 3// setup.js 4module.exports = function (Handlebars) { 5 Handlebars.registerHelper('custom', function (context, options) { 6 return 'custom helpers!' 7 }) 8} 9 10// custom-template.hbs 11Now you can use {{custom}}
See keepachangelog.com.
The command parses your git commit history and generates a changelog based on tagged versions, merged pull requests and closed issues. See a simple example in this very repo.
Because keeping a changelog can be tedious and difficult to get right. If you don’t have the patience for a hand-crafted, bespoke changelog then this makes keeping one rather easy. It also can be automated if you’re feeling extra lazy.
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
license file detected
Details
Reason
Found 12/30 approved changesets -- score normalized to 4
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
security policy file not detected
Details
Reason
project is not fuzzed
Details
Reason
branch protection not enabled on development/release branches
Details
Reason
SAST tool is not run on all commits -- score normalized to 0
Details
Reason
14 existing vulnerabilities detected
Details
Score
Last Scanned on 2025-06-30
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More