Back to Git Cliff

Initializing

website/docs/usage/initializing.md

2.13.12.6 KB
Original Source

Initializing

The default configuration file (cliff.toml) can be generated using the --init flag:

bash
# create cliff.toml
git cliff --init

# create a config file with a custom name
git-cliff --init --config custom.toml

There are also other templates under the examples directory. See the template examples for previewing the templates.

To initialize git-cliff with one of those templates, simply use the name of the template:

bash
# create cliff.toml with Keep a Changelog format
git cliff --init keepachangelog

Also, you can use a template without creating the configuration file. Just give the name of the template to the --config option as follows:

bash
# generate a changelog with using the built-in "detailed" template
git cliff --config detailed

Here are the list of available templates:

:::tip

It is also possible to use a remote URL for the configuration file as follows:

bash
git cliff --config-url https://github.com/orhun/git-cliff/blob/main/examples/github-keepachangelog.toml?raw=true

:::