An open API service indexing awesome lists of open source software.

https://github.com/moshetanzer/cherry-changelog

Interactive changelog generator - Pick and choose which commits make it into your changelog with JSON, Markdown & HTML output
https://github.com/moshetanzer/cherry-changelog

changelog-generator conventional-commits git-commits release-management

Last synced: 15 days ago
JSON representation

Interactive changelog generator - Pick and choose which commits make it into your changelog with JSON, Markdown & HTML output

Awesome Lists containing this project

README

          

# 🍒 Cherry Changelog

Interactive terminal changelog generator with commit picker. Choose which commits to include in your changelog with multiple output formats (JSON, Markdown, HTML). Perfect for teams who want full control over their release notes.

## Features

- 🎯 Interactive commit selection with checkboxes
- 📝 Supports conventional commits (feat, fix, perf)
- 📊 Multiple output formats: JSON, Markdown, HTML
- 🏷️ Automatic version detection from git tags
- 🔄 Updates existing versions or creates new ones

## Quick Start

Run the following in any project to test:

```bash
npx cherry-changelog
```
Or add it to your release command in your `package.json` (this is how i use it :)):

```bash
"release": "npx cherry-changelog --input-file 'public/changelog.json' --output 'public/' --format json && npx bumpp && git add -u public/changelog.json && (git diff --cached --quiet || (git commit -m 'chore: update changelog' && git push))"
```

The tool will:

1. Scan your git commits for conventional commits
2. Show an interactive checkbox list for commit selection
3. Ask you if you would like to edit any of commit messages (for your changelog - this doesnt edit actual commit messsages)
4. Let you choose output formats (JSON, MD, HTML)
5. Generate changelog files with your selections

## Options

| Option | Alias | Type | Default | Description |
|--------|-------|------|---------|-------------|
| `--format` | `-f` | string | `markdown` | Export formats (comma-separated: json,markdown,html) |
| `--output` | `-o` | string | `.` | Output directory |
| `--version` | `-v` | string | - | Override version (defaults to latest git tag) |
| `--types` | `-t` | string | `feat,fix,perf` | Commit types to include (comma-separated) |
| `--auto-select` | `-a` | boolean | `false` | Auto-select all commits without prompting |
| `--input-file` | `-i` | string | `changelog.json` | Input changelog file |

> [!NOTE]
> Any type that doesn't match `perf`, `fix`, or `feat` will be categorized under "Other" in the changelog (if included). We feel this is neatest way to do this.

### Examples

Generate multiple formats:

```bash
cherry-changelog --format json,markdown,html
```

Auto-select all commits:

```bash
cherry-changelog --auto-select
```

Specify custom version and output directory:

```bash
cherry-changelog --version v2.1.0 --output ./dist
```

Filter specific commit types:

```bash
cherry-changelog --types feat,fix
```

## Output Formats

### JSON

```json
[
{
"version": "v1.2.0",
"date": "2025-06-23",
"entries": [
{
"type": "feature",
"text": "add user authentication"
},
{
"type": "fix",
"text": "resolve memory leak"
}
]
}
]
```

### Markdown

```markdown
# Changelog

## v1.2.0 - 2025-06-23

### ✨ Features
- add user authentication

### 🐛 Fixes
- resolve memory leak
```

### HTML

Clean, responsive HTML with built-in styling for easy sharing.

## License

MIT