git-cliff
A changelog generator that parses conventional commits and produces beautifully formatted CHANGELOG files using customizable Tera templates. Written in Rust. Works with any language ecosystem.
What is git-cliff?
git-cliff is a changelog generator that reads your Git history, parses commit messages following the Conventional Commits specification, and renders a formatted changelog using the Tera templating engine. It is language-agnostic, written in Rust, and configured via a cliff.toml file that lives in your repository root.
Unlike tools such as standard-version that couple changelog generation with version bumping, git-cliff focuses purely on the changelog. This makes it flexible: use it standalone, as part of a release script, or via GitHub Actions to auto-generate release notes when you push a tag.
Key Features
- Conventional commits parsing — categorizes feat, fix, perf, refactor, docs, and more into changelog sections
- Tera templating — full Jinja2-compatible template syntax for any output format (Markdown, AsciiDoc, HTML)
- Tag range support — generate changelogs for specific version ranges, latest release, or unreleased commits
- cliff.toml configuration — commit parsers, skip patterns, tag patterns, body template, and header all configurable
- GitHub Actions integration — official action for automated changelog on tag push
- Prepend mode — prepend new release notes to an existing CHANGELOG.md, building a cumulative file
- Scope grouping — group commits by conventional commit scope (e.g., feat(auth):, fix(api):)
- Breaking change highlighting — automatically surfaces BREAKING CHANGE commits in a separate section
Installation
# macOS (Homebrew) brew install git-cliff # Rust / Cargo (any platform) cargo install git-cliff # Windows (Scoop) scoop install git-cliff # npm (for Node.js projects) npm install --save-dev git-cliff # Download binary from GitHub Releases # https://github.com/orhun/git-cliff/releases
Basic Usage
# Generate full changelog to stdout git cliff # Write to CHANGELOG.md git cliff -o CHANGELOG.md # Generate only unreleased changes git cliff --unreleased # Generate only the latest release's changes git cliff --latest # Generate changelog for a tag range git cliff v1.0.0..v2.0.0 # Tag the current HEAD and generate with that version git cliff --tag v1.2.3 --unreleased # Init a default cliff.toml in the current directory git cliff --init
Example cliff.toml
[changelog]
header = """
# Changelog
All notable changes to this project will be documented in this file.
"""
body = """
{% if version %}\
## [{{ version | trim_start_matches(pat="v") }}] - {{ timestamp | date(format="%Y-%m-%d") }}
{% else %}\
## [Unreleased]
{% endif %}\
{% for group, commits in commits | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
- {% if commit.scope %}*({{ commit.scope }})* {% endif %}{{ commit.message | upper_first }}\
{% endfor %}
{% endfor %}\
"""
trim = true
[git]
conventional_commits = true
filter_unconventional = true
commit_parsers = [
{ message = "^feat", group = "Features" },
{ message = "^fix", group = "Bug Fixes" },
{ message = "^perf", group = "Performance" },
{ message = "^refactor", group = "Refactoring" },
{ message = "^docs", group = "Documentation" },
{ message = "^chore|^ci|^test", skip = true },
]
filter_commits = true
tag_pattern = "v[0-9].*" Conventional Commits Quick Reference
| Type | Changelog section | Semver bump | Example |
|---|---|---|---|
| feat | Features | MINOR | feat(auth): add OAuth2 login |
| fix | Bug Fixes | PATCH | fix(api): handle null response |
| perf | Performance | PATCH | perf: cache query results |
| refactor | Refactoring | PATCH | refactor: extract helper fn |
| docs | Documentation | none | docs: update README |
| feat! | Breaking Changes | MAJOR | feat!: remove legacy endpoint |
| chore/ci/test | Skipped (default) | none | chore: bump deps |
Use Cases
- Auto-generating CHANGELOG.md on every tagged release via GitHub Actions
- Producing GitHub Release notes from the latest tag's commits
- Enforcing conventional commits in a team by making the changelog meaningful and automated
- Generating release notes in custom formats (AsciiDoc, HTML, JSON) for documentation systems
- Auditing what changed between two versions during incident investigation
Pros and Cons
Pros
- ✓ Language-agnostic (not tied to Node.js ecosystem)
- ✓ Extremely flexible Tera templates
- ✓ Fast Rust binary with no runtime dependency
- ✓ Official GitHub Actions integration
- ✓ Handles partial changelogs (latest / unreleased / range)
- ✓ Active maintenance and growing community
Cons
- ✗ Requires conventional commits discipline from the whole team
- ✗ Does not bump version numbers (unlike standard-version)
- ✗ Tera template syntax has a learning curve
- ✗ Useless on repos with free-form commit messages
- ✗ cliff.toml setup takes some initial configuration effort
Frequently Asked Questions
What is git-cliff?▼
git-cliff is a changelog generator that parses your Git commit history and produces a formatted CHANGELOG.md (or any format you define). It uses conventional commits (feat:, fix:, perf:, etc.) to categorize changes into sections like Features, Bug Fixes, and Performance. You configure it via a cliff.toml file using the Tera templating engine. It integrates with GitHub Actions for automatic changelog generation on release.
What is the conventional commits format?▼
Conventional Commits is a specification for commit messages that adds semantic meaning. The format is: type(scope): description. Common types are: feat (new feature, triggers MINOR bump), fix (bug fix, triggers PATCH bump), perf (performance improvement), refactor, docs, test, chore, ci. Breaking changes are marked with BREAKING CHANGE in the footer or an exclamation after the type (feat!:), triggering a MAJOR version bump. Tools like git-cliff, semantic-release, and standard-version rely on this format.
How does git-cliff compare to standard-version?▼
standard-version is a Node.js tool that handles both version bumping and changelog generation together. git-cliff is focused solely on changelog generation and is language-agnostic (written in Rust). git-cliff's Tera templating is significantly more flexible than standard-version's templates, letting you produce any format. standard-version is better for projects that want automatic semver bumping tied to changelog generation. git-cliff is better when you want full control over the changelog format or use it in non-Node projects.
How do I use git-cliff templates?▼
git-cliff uses the Tera templating engine (similar to Jinja2). In cliff.toml, the 'body' field is a Tera template that receives commit objects with fields like message, scope, group, author, timestamp, and version. You can use Tera filters (date, upper_first, striptags), conditionals (if version), and loops (for group, commits in commits | group_by). Set 'prepend = CHANGELOG.md' to prepend each new release to an existing file.
Can git-cliff generate changelogs for a specific tag range?▼
Yes. Run 'git cliff v1.0.0..v2.0.0' to generate a changelog for commits between two tags. Run 'git cliff --latest' to generate only the latest release's changes (since the previous tag). Run 'git cliff --unreleased' to generate changes since the last tag. The '--tag' flag lets you specify what version to use in the output when commits are not yet tagged.
Does git-cliff work with GitHub Actions?▼
Yes. git-cliff has an official GitHub Action (orhun/git-cliff-action) that generates your changelog and can commit it, create release notes, or pass the output to the GitHub Releases API. A common pattern is to trigger it on push to a tag: the action generates the changelog, creates a GitHub Release with the notes, and commits CHANGELOG.md if needed.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →Premium Workflow Pack
Production-grade workflows, architecture guides, and deployment scripts for teams that ship. 10 advanced CI/CD workflows (blue-green, canary, E2E, security), 5 architecture deep-dives, code review checklist, PR process guide, and 5 battle-tested Bash deployment scripts.
Buy on Gumroad →You Might Also Need
Git Stash Manager
Visual reference for git stash commands. Copy-ready stash push, pop, apply, drop, list, and branch commands with stash index control. Free git stash cheat sheet.
Open free tool →
GitHub Actions Workflow Generator
Generate GitHub Actions YAML workflows instantly. Choose triggers (push, PR, schedule), runtime (Node.js, Python, Go, Rust), and jobs (test, lint, build, Docker, GitHub Pages). Copy-ready .github/work
Open free tool →
GitHub Actions YAML Linter
Lint your GitHub Actions workflow YAML before pushing. Catches broken needs references, invalid trigger events, hardcoded secrets, unversioned action pins, and YAML syntax errors. Free browser tool.
Open free tool →
More Free Tools
Related Articles
Git Workflow Best Practices 2025: Team-Proven Strategies
Git workflow best practices for 2025: branching strategies, commit conventions, PR reviews, rebasing vs merging, and CI/CD integration that teams actually use.
Git Branching Strategies Compared 2026: GitFlow vs Trunk-Based vs GitHub Flow
Compare the top Git branching strategies for 2026 — GitFlow, GitHub Flow, Trunk-Based Development, and GitLab Flow. Choose the right workflow for your team's size, release cadence, and CI/CD setup.
Git Merge vs Rebase: When to Use Each
Git merge vs rebase — understand the real difference, when each strategy makes sense, and which one to choose for your team's workflow. Includes practical examples and common mistakes to avoid.
Advanced Git Workflows in 2026: Worktrees, Bisect, Interactive Rebase, and More
Master advanced Git workflows that most developers never use. Git worktrees for parallel branches, git bisect for hunting bugs, interactive rebase for clean history, sparse checkout for monorepos, and power-user config tips.
Aider AI: The Ultimate Terminal-Based AI Coding Assistant for 2026
Complete guide to Aider AI coding assistant. Setup, best practices, model options, and how this terminal-based tool compares to GUI editors for serious developer workflows.
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →