Changie - Automated Changelog Generation for Any Project
Tags: showdev, news, go, devops
Published: 2022-03-13 20:40:19

---
title: Changie - Automated Changelog Generation for Any Project
published: true
description: A look at a few features of Changie that may help create cool changelogs and release notes.
tags: showdev, news, go, devops
cover_image: https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ucqphytxbyu5own5gz8c.png
series: Changie
---
Getting started experience with Changie.
{% asciinema 436545 %}

It was over a year ago that I posted [an article](https://dev.to/miniscruff/changie-automated-changelog-tool-11ed) about my side project [changie](https://changie.dev). That post was mostly a comparison of the file based approach compared to commit messages, this post is more about the Changie specific features.

The full changelog for Changie, generated by Changie can be viewed on the [website](https://changie.dev/guide/changelog/) or on [GitHub](https://github.com/miniscruff/changie/blob/main/CHANGELOG.md).

## Headers and Footers
A big improvement to Changie has been allowing users to add custom headers and footers in a few formats. With full support for templating you can do some cool stuff.

For all the details see the docs on [headers and footers](https://changie.dev/config/header-footer/)

A small example could be to show many updates happened for each kind.

```yaml
headerFormat: |
  Updates:
  {{- range $kind := (kinds .Changes | uniq)}}
    {{- $changeCount := (kinds $.Changes | count $kind)}}
    {{- if gt $changeCount 0 }}
    * {{$kind}}: {{$changeCount}}
    {{- end}}
  {{- end}}
```

The end result would look something like:
```
## v0.1.0 - 2022-03-13
Update Counts:
  * Added: 2
  * Changed: 1
  * Deprecated: 1
  * Fixed: 3

### Added
* A
* B
### Changed
* C
### Deprecated
* D
### Fixed
* E
* F
* G
```

One team is using the custom footers to show any public contributors per pull request, check out the [discussion](https://github.com/miniscruff/changie/discussions/262).

A simpler version of showing all unique contributors from GitHub would look like this:

```yaml
# config yaml
custom:
- key: Author
  type: string
  minLength: 3
footerFormat: |
  ### Contributors
  {{- range (customs .Changes "Author" | uniq) }}
  * [{{.}}](https://github.com/{{.}})
  {{- end}}  
```

Currently you can see headers and footers using either a format option in the [config](https://changie.dev/config/header-footer/#configuration), a file path option in the [config](https://changie.dev/config/header-footer/#configuration) or by passing an [argument to batch](https://changie.dev/cli/changie_batch/).

## Latest
When creating tooling for automation or release notes it can be quite useful at times to know what our current version is.
A good example of this is combining Changie with release automation such as GoReleaser as seen by this [GitHub Workflow](https://github.com/miniscruff/changie/blob/a80f9b346faab7a5b48c822956fdc8fe068b2dac/.github/workflows/release.yml#L30-L31).

See the [Latest command docs](https://changie.dev/cli/changie_latest/).

## Bumping
Bumping can be used to increase the current version to the next version by semantic name instead of a new version. See the [batch command docs](https://changie.dev/cli/changie_batch/).

```shell
# instead of
changie batch v1.4.1
# you can use
changie batch major
changie batch minor
changie batch patch
```

If you just want the output for the next version you can use `next`. See the [next command docs](https://changie.dev/cli/changie_next/).

## Dry runs
When editing Changie configs, running a demo or maybe as part of CI logging, it can be useful to see what the output or changes would be without actually making those changes.
This is especially true for Changie as, by default, it will create and delete many files that could be tedious to get back.

To that end, any command that would write out to a file, edit a file or delete a file, you can add `--dry-run` to instead print to standard out.

```shell
changie new --dry-run
changie batch patch --dry-run
changie merge --dry-run
```

That is all for now. Reach me on twitter [@miniScruffDev](https://twitter.com/miniScruffDev) or by starting a [discussion on GitHub](https://github.com/miniscruff/changie/discussions).

Thanks for reading.