The Conventional Commits toolbox
Go to file
Marcin Puc 4a09837244 docs: Update manpage generation docs 2023-05-21 16:34:49 +02:00
.github feat(monorepo): add config opt to disable global global-tag-opt (#264) 2023-02-18 07:10:49 +01:00
ci ci: update cocogitto action and add branch whitelist to cog.toml 2022-03-09 09:02:57 +01:00
docs docs: Update manpage generation docs 2023-05-21 16:34:49 +02:00
src feat: reorganize manpages generation 2023-05-21 16:34:49 +02:00
tests test(check): add CLI tests for running check on commit range 2023-05-20 22:58:52 +02:00
.gitignore chore: use rust 2021 edition 2022-01-27 09:45:47 +00:00 chore(version): 5.3.1 2023-01-23 16:08:11 +00:00 docs: add a contribution guide 2022-03-11 09:06:24 +01:00
Cargo.lock chore: bump clap to v4.2.4 for v1.69 clippy lints 2023-05-04 09:25:56 +02:00
Cargo.toml feat: reorganize manpages generation 2023-05-21 16:34:49 +02:00
LICENSE chore: add MIT license 2020-09-11 10:52:50 +02:00 docs: add cargo-smart-release to the list of similar projects 2023-01-20 11:59:59 +01:00
codecov.yaml ci(codecov): fix codecov threshhold 2022-03-08 11:49:10 +01:00
cog.toml feat(monorepo): add config opt to disable global global-tag-opt (#264) 2023-02-18 07:10:49 +01:00

Cocogitto – The conventional commits tool box

GitHub Actions workflow status Code coverage status
Conventional commits Repository license Discord logo

Website · Installation · Configuration

The Conventional Commits toolbox

  • Verified commits: create conventional compliant commits with ease.
  • Automatic Version bump and changelog: automatically bump versions and generate changelogs with your own custom steps and workflows.
  • Release profiles: your branching model requires different steps for releases, pre-release, hotfixes ? We got you covered !
  • Depends only on libgit2: cocogitto has one standalone binary, the only system dependency is libgit2.
  • Conventional git log: search your commit history matching Conventional Commits items such as scope and commit type.
  • GitHub integration: enforce the conventional commits specification with our GitHub action and bot.
  • Monorepo support: Automatic versioning for mono-repositories is supported out of the box.

Explore Cocogitto's docs  ▶


What is it ?

Cocogitto is a CLI and GitOps toolbox for the Conventional Commits and Semver specifications.

Why ?

There are plenty of tools listed on the conventional commits web site to help you generate changelog, git hooks, commit template etc. Some of them are specifically designed for the Conventional Commits specification, and some of them are general purpose.

Cocogitto was designed to help you respect the conventional and semver standard and is not intended to be used in any other context.

It strives to be a set of simple, modern and fast command line interfaces.


  • Make using the conventional commits spec easy and fun.
  • Enable people to focus on their work instead of correcting small mistakes and typos.
  • Enforce correctness regarding Semver and Conventional Commits.
  • Automate things when possible (ex: bumping versions).

Non goals

  • Cocogitto is not a git replacement. It uses some of libgit2 but only to provide features related to the Conventional Commits specification. Anything else shall be done with git.
  • Supporting other commit conventions or git workflows.

Quick start

This readme is a quick tour of what you can do with Cocogitto, for an in-depth guide please refer to the documentation.


Packaging status


pacman -S cocogitto


cargo install --locked cocogitto


nix-env -iA cocogitto

Void Linux

xbps-install cocogitto

Conventional commits

Note: coco has been deprecated in favor of the cog commit command.

To create conventional commits you can use the cog commit command. It has subcommands for the default fix and feat Conventional Commits types plus the angular commit conventional commit types.


# With cog
cog commit feat "add awesome feature"

# With git
git commit -m "feat: add awesome feature"

See User guide -> Conventional commits.


Creating a version with cog bump will perform the following actions :

  1. Determine a version number according to your commit history.
  2. Perform configuration defined pre-bump commands.
  3. Append the version's changelog to your repository changelog file.
  4. Create a version commit and tag it.
  5. Perform post-bump commands


# File: cog.toml
pre_bump_hooks = [
    "echo {{version}}",

post_bump_hooks = [
    "git push",
    "git push origin {{version}}",

path = ""
template = "remote"
remote = ""
repository = "cocogitto_bot_playground"
owner = "cocogitto"
authors = [
  { username = "oknozor", signature = "Paul Delafosse"}

cog bump example


cog changelog uses tera templates to generate markdown changelogs. It has several built-in templates, and you can define your own.


cog changelog

Output :

## 1.2.0 - 2021-11-26

#### Bug Fixes

- **(parser)** handle lowercase identifier - (7521015) - *oknozor*
- handle unknown flag - (e2388dc) - oknozor

#### Features

- **(parser)** simple parser implementation - (0b25eb6) - *oknozor*
- add a new cli flag - (ff84173) - oknozor

#### Miscellaneous Chores

- **(version)** 1.2.0 - (15d1333) - *oknozor*

#### Refactoring

- **(parser)** use a parser interface instead of concrete impl - (ea24c36) - *oknozor*

#### Tests

- add integration test - (bae629c) - *oknozor*

See User guide -> Changelogs.

GitHub integration

GitHub action:

You can run cog check and perform automatic releases via GitHub action using cocogitto-action.


  - name: Semver release
    uses: cocogitto/cocogitto-action@main
      release: true
      git-user: 'Cog Bot'
      git-user-email: ''

See Github integration -> GitHub action

GitHub bot:

cocogitto-bot is a standalone, zero-config bot checking your pull requests against the Conventional Commits specification.

cog bot example

See Github integration -> GitHub-bot

Similar projects


Found a bug, have a suggestion for a new feature? Please read the contribution guideline and submit an issue.


All the code in this repository is released under the MIT License, for more information take a look at the LICENSE file.