changelog-gen-cli
v1.1.0
Published
Generate CHANGELOG.md from git conventional commits — zero dependencies
Maintainers
Readme
changelog-gen-cli
Generate a CHANGELOG.md from git conventional commits — zero npm dependencies.
Install
npm install -g changelog-gen-cliUsage
# Generate CHANGELOG.md in the current repo
changelog-gen
# Preview output without writing (dry run)
changelog-gen --dry-run
# Limit history since a tag or date
changelog-gen --since=v1.0.0
changelog-gen --since=2024-01-01
# Highlight breaking changes
changelog-gen --breaking
# Write to a custom file
changelog-gen --output=CHANGES.md
# Combine flags
changelog-gen --dry-run --since=v2.0.0 --breakingOptions
| Flag | Description |
|---|---|
| --since <tag\|date\|ref> | Start of history range. Default: last git tag (or all if no tags) |
| --output <file> | Output file path. Default: CHANGELOG.md |
| --dry-run | Print to stdout instead of writing file |
| --breaking | Highlight commits with BREAKING CHANGE: footer or ! after type |
| --help, -h | Show help |
| --version, -v | Show version |
Output Format
Follows the Keep a Changelog format and groups commits by type:
- BREAKING CHANGES —
feat!:,fix!:, orBREAKING CHANGE:footer - Features —
feat: - Bug Fixes —
fix: - Performance Improvements —
perf: - Code Refactoring —
refactor: - Documentation —
docs: - Build System —
build: - CI/CD —
ci: - Tests —
test: - Chores —
chore:
If git tags exist, versioned sections are generated automatically. The [Unreleased] section covers commits since the latest tag.
Example Output
# Changelog
...
## [Unreleased] - 2025-06-01
### Features
- add dark mode support (`a1b2c3d`)
- new --json output flag (`e4f5g6h`)
### Bug Fixes
- fix crash on empty repo (`7i8j9k0`)
## [v1.2.0] - 2025-05-15
### BREAKING CHANGES
- remove legacy --format flag (`l1m2n3o`)Exit Codes
| Code | Meaning |
|---|---|
| 0 | Success |
| 1 | Not a git repository |
| 2 | Unexpected error |
Requirements
- Node.js >= 16
- Git installed and accessible in
PATH - Must be run from inside a git repository
License
MIT
