# generate-changelog-by-tag

> Generate a changelog from git commits using tags.

Latest version **1.9.5** (published 2022-08-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install generate-changelog-by-tag
pnpm add generate-changelog-by-tag
yarn add generate-changelog-by-tag
bun add generate-changelog-by-tag
```

Provides the commands `changelogbytag`, `generate-changelog-by-tag`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.9.5 |
| Published | 2022-08-18 |
| First published | 2022-08-17 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Unpacked size | 43.2 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | F |
| Maintainers | rocaforarnelo |
| Keywords | changelog, cli, npm, version, git, semver |

## Links

- npm: https://www.npmjs.com/package/generate-changelog-by-tag
- Repository: https://github.com/rocaforarnelo/generate-changelog-f
- Homepage: https://github.com/rocaforarnelo/generate-changelog-f#readme
- Issues: https://github.com/rocaforarnelo/generate-changelog-f/issues
- npm.io page: https://npm.io/package/generate-changelog-by-tag

## Dependencies (5)

- [0g](https://npm.io/package/0g.md) ^0.0.9
- [semver](https://npm.io/package/semver.md) ^7.3.7
- [bluebird](https://npm.io/package/bluebird.md) ^3.0.6
- [commander](https://npm.io/package/commander.md) ^2.9.0
- [github-url-from-git](https://npm.io/package/github-url-from-git.md) ^1.4.0

## Alternatives

- [@salesforce/cli](https://npm.io/package/@salesforce/cli.md) — 389.7K weekly downloads
- [@mintlify/cli](https://npm.io/package/@mintlify/cli.md) — 208.9K weekly downloads
- [@grafana/e2e-selectors](https://npm.io/package/@grafana/e2e-selectors.md) — 128.7K weekly downloads
- [mintlify](https://npm.io/package/mintlify.md) — 112.0K weekly downloads
- [@intlayer/cli](https://npm.io/package/@intlayer/cli.md) — 22.8K weekly downloads

## Recent versions

- 1.9.5 (latest) — 2022-08-18
- 1.9.4 — 2022-08-17
- 1.9.3 — 2022-08-17
- 1.9.2 — 2022-08-17

## README

# Generate Changelog

[![NPM Version](https://badge.fury.io/js/generate-changelog-by-tag.svg)](https://www.npmjs.com/package/generate-changelog-by-tag)

Generate a changelog from git commits using semver tags. You can generate changelogs without maintaining a package.json.

## Installation

You can either install it as a dev dependency to be referenced in your npm scripts, or you can install this module globally to be used for all of your repos on your local machine.

```bash
$ npm i generate-changelog-by-tag -D # install it as a dev dependency
# OR
$ npm i generate-changelog-by-tag -g # install it globally
```

## Usage

To use this module, your commit messages have to be in this format:

```
type(category): description [flags]
```

Where `type` is one of the following:

* `breaking`
* `build`
* `ci`
* `chore`
* `docs`
* `feat`
* `fix`
* `other`
* `perf`
* `refactor`
* `revert`
* `style`
* `test`

Where `flags` is an optional comma-separated list of one or more of the following (must be surrounded in square brackets):

* `breaking`: alters `type` to be a breaking change

And `category` can be anything of your choice. If you use a type not found in the list (but it still follows the same format of the message), it'll be grouped under `other`.

### CLI

You can run this module as a CLI app that prepends the new logs to a file (recommended):

```bash
$ changelogf -h

  Usage: generate [options]

  Generate a changelog from git commits.

  Options:

    -h, --help             output usage information
    -V, --version          output the version number
    -t, --tag              generate from specific tag, must be a valid semver version (e.g. v1.2.3 or 1.2.3)
    -x, --exclude <types>  exclude selected commit types (comma separated)
    -f, --file [file]      file to write to, defaults to ./CHANGELOG.md, use - for stdout
    -e, --footer [footer]  footer
    -u, --repo-url [url]   specify the repo URL for commit links, defaults to checking the package.json
```

To generate changelogs from all the commits:

```bash
changelogf
```

To include the footer in the description, provide the footer prefix:

```bash
changelogf -e footer
```

It's possible to create a `./CHANGELOG.md` file for a specific tag, if you want from to generate changelog from 1.8.0 and the previous versions is 1.7.0:

```bash
changelogf -t 1.8.0
```

will generate changelogs from commits from 1.7.0 to 1.8.0 tags

## Testing

To run the test suite, just clone the repository and run the following:

```bash
$ npm i
$ npm test
```

## Contributing

To contribute, please see the [CONTRIBUTING.md](CONTRIBUTING.md) file.

## License

This project is released under the MIT license, which can be found in [`LICENSE.txt`](LICENSE.txt).

---
_Source: https://npm.io/package/generate-changelog-by-tag · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
