Crate clog

source ·
Expand description


Rust Version Dependency Status docs-image

A library for generating a conventional changelog from git metadata, written in Rust


clog creates a changelog automatically from your local git metadata. See the clogs for an example.

The way this works, is every time you make a commit, you ensure your commit subject line follows the conventional format.

NOTE: clog also supports empty components by making commit messages such as alias: message or alias(): message (i.e. without the component)


There are two ways to use clog, as a binary via the command line (See clog-cli for details) or as a library in your applications.

See the documentation for information on using clog in your applications.

In order to see it in action, you’ll need a repository that already has some of those specially crafted commit messages in it’s history. For this, we’ll use the clog repository itself.

  1. Clone the clog-lib repository (we will clone to our home directory to make things simple, feel free to change it)
$ git clone
  1. Add clog as a dependency in your Cargo.toml
clog = "*"
  1. Use the following in your src/
extern crate clog;

use clog::Clog;

fn main() {
    // Create the struct
    let mut clog = Clog::with_git_work_tree("~/clog")
        .subtitle("Crazy Dog")

    // Write the changelog to the current working directory
    // Alternatively we could have used .write_changelog_to("/somedir/")
  1. Compile and run `$ cargo build –release && ./target/release/bin_name
  2. View the output in your favorite markdown viewer! $ vim


clog can also be configured using a configuration file in TOML.

See the examples/clog.toml for available options.

§Companion Projects

  • clog-cli - A command line tool that uses this library to generate changelogs.
  • Commitizen - A command line tool that helps you writing better commit messages.


clog is licensed under the MIT Open Source license. For more information, see the LICENSE file in this repository.



  • The base struct used to set options and interact with the library.
  • A struct which holds sections to and components->commits map


  • Determines the hyperlink style used in commit and issue links. Defaults to LinksStyle::Github