Grepedia
GI

git-cliff

A highly customizable changelog generator that creates structured and consistent logs from your Git history using conventional commits and regex parsers.

Score1
About

git-cliff is a powerful, highly customizable command-line tool designed to generate comprehensive changelogs from Git repository history. Developed by Orhun Parmaksız, this Rust-based application allows developers to create structured, consistent, and readable changelogs by utilizing conventional commits and regex-powered parsing. It is an essential utility for maintainers looking to automate their release management workflows while maintaining a clear audit trail of project changes. The tool is designed to work seamlessly with various project types, including monorepos, and integrates well with major Git hosting services.

Functionality centers on parsing raw Git commit history and transforming it into a formatted document using a robust Jinja2-inspired templating engine. Users define the structure, grouping, and styling of their changelogs through a centralized configuration file, which ensures consistent formatting across multiple releases. By leveraging custom regular expressions, git-cliff can extract metadata from commit messages, bodies, and footers, allowing for highly specific categorization of changes—such as separating bug fixes from new features or tracking breaking changes.

Some of the key features are:

  • Conventional Commits Support: Full compatibility with the conventional commits specification to drive automated versioning.
  • Regex-Powered Parsing: Create sophisticated rules for commit categorization using regular expressions.
  • Customizable Templates: Use an advanced template engine to define exact output formats for changelogs.
  • Remote Integration: Automatically fetch metadata from GitHub, GitLab, Gitea, and Azure DevOps to include PR information and contributor lists.
  • Monorepo Support: Easily manage changelogs for complex multi-package repositories.
  • Offline Operation: Execute changelog generation without requiring network access to external APIs.
  • Flexible Configuration: Maintain settings in a single toml file for consistent project-wide standards.
  • Library Support: Integrate git-cliff directly into Rust projects as a library for custom tooling needs.

To operate git-cliff, users typically initialize the tool in their repository using the init command, which generates a default configuration file. From there, they can customize the rules, groupings, and template structure in the configuration file to match their project's needs. The tool is then invoked via the command line to parse the history—often between two specific tags or a range—and output the result directly to a markdown file or standard output. It supports various flags for handling unreleased changes, setting version bumps, and managing include or exclude path filters, making it highly adaptable to different CI/CD environments.

Some common use cases include:

  • Automated Release Notes: Generating standardized release notes for every tagged version in a software project.
  • Monorepo Changelog Management: Maintaining separate or unified changelogs for sub-projects within a single repository.
  • PR-based Development: Automatically linking pull requests and contributor information to the changelog.
  • CI/CD Integration: Using git-cliff within GitHub Actions, GitLab CI, or other automation pipelines to generate reports upon deployment.
  • Custom Commit Reporting: Creating internal summary reports based on specific commit patterns or labels.