Usage
Flags
Flags are boolean options that don’t take values.Prints help information
Prints version information
Increases the logging verbosity. Can be used multiple times for more verbose output.
Processes the commits starting from the latest tagUseful for generating changelog entries for only the most recent release.
Processes the commits that belong to the current tagRequires HEAD to be on a tagged commit.
Processes the commits that do not belong to a tagOften combined with
--tag to preview the next release.Sorts the tags topologically instead of chronologicallyUseful for repositories with complex branching strategies.
Include only the tags that belong to the current branchHelpful when working with multiple release branches.
Disables the external command executionSkips running preprocessors and postprocessors defined in configuration.
Prints changelog context as JSONUseful for processing changelog data with external tools.
Prints bumped version for unreleased changesCalculates the next semantic version based on conventional commits.
Load TLS certificates from the native certificate storeOnly available when compiled with the
remote feature.Configuration Options
Writes the default configuration file to Available templates:
cliff.toml. Optionally accepts a template name.keepachangelog, github, detailed, minimal, scoped, scopesorted, cocogitto, unconventionalSets the configuration file pathEnvironment variable:
GIT_CLIFF_CONFIGSets the URL for the configuration fileEnvironment variable: Only available when compiled with the
GIT_CLIFF_CONFIG_URLremote feature.Repository Options
Sets the working directoryEnvironment variable:
GIT_CLIFF_WORKDIRSets the git repository path(s). Accepts multiple paths.Environment variable:
GIT_CLIFF_REPOSITORYFiltering Options
Sets the path pattern to include related commits. Accepts glob patterns.Environment variable: Paths must be relative to the repository root.
GIT_CLIFF_INCLUDE_PATHSets the path pattern to exclude related commits. Accepts glob patterns.Environment variable:
GIT_CLIFF_EXCLUDE_PATHSets the regex pattern for matching git tagsEnvironment variable:
GIT_CLIFF_TAG_PATTERNSets the regex pattern for tags to skip in the changelogEnvironment variable: Skipped tags are processed but not included in the output.
GIT_CLIFF_SKIP_TAGSSets the regex pattern for tags to ignore in the changelogEnvironment variable: Ignored tags are completely skipped during processing.
GIT_CLIFF_IGNORE_TAGSSets the regex pattern for tags to count in the changelogEnvironment variable:
GIT_CLIFF_COUNT_TAGSSets commits that will be skipped in the changelog. Accepts multiple commit SHAs.Environment variable:
GIT_CLIFF_SKIP_COMMITOutput Options
Writes output to the given file. If no path is provided, defaults to
CHANGELOG.md.Environment variable: GIT_CLIFF_OUTPUTPrepends entries to the given changelog fileEnvironment variable:
GIT_CLIFF_PREPENDStrips the given parts from the changelogValues:
header, footer, allTemplate Options
Sets the template for the changelog bodyEnvironment variable:
GIT_CLIFF_TEMPLATEGenerates changelog from a JSON context fileEnvironment variable:
GIT_CLIFF_CONTEXTVersion and Tag Options
Sets the tag for the latest versionEnvironment variable: Note: This does not create an actual Git tag.
GIT_CLIFF_TAGBumps the version for unreleased changes. Optionally with specified version type.Values: See Version Bumping for more details.
auto, major, minor, patchCommit Options
Sets custom commit messages to include in the changelogEnvironment variable:
GIT_CLIFF_WITH_COMMITSets custom message for the latest releaseEnvironment variable:
GIT_CLIFF_WITH_TAG_MESSAGESorting Options
Sets sorting of the commits inside sectionsValues:
oldest, newestRemote Integration Options
These options are only available when compiled with the respective feature flags.GitHub
Sets the GitHub API tokenEnvironment variable:
GITHUB_TOKENSets the GitHub repositoryEnvironment variable:
GITHUB_REPOGitLab
Sets the GitLab API tokenEnvironment variable:
GITLAB_TOKENSets the GitLab repositoryEnvironment variable:
GITLAB_REPOGitea
Sets the Gitea API tokenEnvironment variable:
GITEA_TOKENSets the Gitea repositoryEnvironment variable:
GITEA_REPOBitbucket
Sets the Bitbucket API tokenEnvironment variable:
BITBUCKET_TOKENSets the Bitbucket repositoryEnvironment variable:
BITBUCKET_REPOAzure DevOps
Sets the Azure DevOps API tokenEnvironment variable:
AZURE_DEVOPS_TOKENSets the Azure DevOps repositoryEnvironment variable:
AZURE_DEVOPS_REPOGeneral Remote Options
Disable network access for remote repositoriesUseful when working without internet connectivity or for faster execution.
Arguments
Environment Variables
All options can be set via environment variables using theGIT_CLIFF_ prefix:
Configuration Precedence
Configuration values are applied in the following order (later sources override earlier ones):- Default values
- Configuration file (
cliff.toml) - Environment variables
- Command-line arguments
Examples
Generate Full Changelog
Release Workflow
Monorepo Package Release
Export for External Processing
See Also
- Basic Usage - Common usage patterns
- Version Bumping - Semantic version calculation
- Configuration - Configuration file options