# protokollant

> TypeScript library and CLI to manage CHANGELOG.md files

Latest version **1.1.0** (published 2021-01-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install protokollant
pnpm add protokollant
yarn add protokollant
bun add protokollant
```

Provides the command `protokollant`.

## Health

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

Positive: has types; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2021-01-26 |
| First published | 2019-03-28 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Node | >=10 |
| Dependencies | 1 |
| Unpacked size | 40.9 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | Konstantin Möllers |
| Maintainers | ksm2 |

## Links

- npm: https://www.npmjs.com/package/protokollant
- Repository: git@github.com:ksm2/protokollant
- npm.io page: https://npm.io/package/protokollant

## Dependencies (1)

- [commandpost](https://npm.io/package/commandpost.md) ^1.4.0

## Recent versions

- 1.1.0 (latest) — 2021-01-26
- 1.0.2 — 2019-03-28
- 1.0.1 — 2019-03-28
- 1.0.0 — 2019-03-28

## README

Protokollant
============

![Node.js CI](https://github.com/ksm2/protokollant/workflows/Node.js%20CI/badge.svg)

The _Protokollant_ keeps your changelog easily maintained.
 
Library
-------

You can use Protokollant as a library with native TypeScript support.

Install via Yarn:

    yarn add protokollant

Usage:

```typescript
import fs from 'fs'
import { parseChangelog, printChangelog } from 'protokollant'

// Parse a CHANGELOG.md
const oldVersion = fs.readFileSync('CHANGELOG.md', 'utf8')
const changelog = parseChangelog(oldVersion)

// Do some changes ...
changelog.getUnreleased().added('Unicorn farm auto-pet machine')
// Or as a shortcut:
changelog.added('Unicorn farm auto-pet machine')

// Create a new release "14.0.5" from "unreleased" changes
changelog.release('14.0.5')

// Print the new changelog
const newVersion = printChangelog(changelog)
```

CLI
---

You can also use _Protokollant_ as a CLI tool.

To achieve the same as the code above:

    protokollant added Unicorn farm auto-pet machine
    
Quotes are optional, but if you use special chars, you should add them.

You specify the CHANGELOG.md file as follows (default is looking for `CHANGELOG.md` in the current directory):

    protokollant --changelog MY_CHANGED_FILES.md added ...

The following commands create new entries:

* `protokollant changed ...`  adds a new unreleased change.
* `protokollant added ...`    adds a new unreleased addition.
* `protokollant fixed ...`    adds a new unreleased fix.
* `protokollant removed ...`  adds a new unreleased removal.

You can also release using the **release** command:

    protokollant release 14.0.5

Use the **extract** command to export a specific release to stdout.
You can pipe it to a new file like this:

    protokollant extract 14.0.5 > release-14.0.5.md

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