This tool aims to quickly creates commits that follow the conventional commits spec. It currently supports just a simple part of the spec: generating commit messages of the form:
<type>([optional scope])[optional !]: <commit message>
type: one element from
scope: indicates where the modification took place (component affected for example). Totally optional. Can be
!: indicates wether the commit introduces a breaking change (if present) or not. It’s optional.
commit message: a single line of max 72 chars indicate the nature of the change.
feat(client): add login page feat(client)!: migrate all webservices to v2 api ci: add an e2e tests step
- [x] Create commit messages with default params
- [x] Add .env file to customize params
- [x] Release v1.0
- [x] Add installation and usage documentation
- [x] Propose to
git add -Aif running gommitizen without any file added
- [ ] Support more custom params (commit length, etc)
- [ ] Add tests
- [ ] Add cross platform builds to releases
- [x] Add generate changelog command
- [ ] Add commit validation command
- [x] Gobinaries installation
- [x] BUG(promptui): MacOS ring bell triggers in multi select prompt
# build make build # run make run
You can install Gommitizen without using or installing go by downloading it from gobinaries.com.
curl -sf https://gobinaries.com/epsxy/gommitizen | sh
gommitizen in a terminal should work now:
> gommitizen A Go program to help you create conventional commits Usage: gommitizen [command] Available Commands: changelog Run changelog generator commit Run commit formatter help Help about any command Flags: -h, --help help for gommitizen Use "gommitizen [command] --help" for more information about a command.
You need Go installed on your computer.
Make your your
$PATHenv variables are set up. You can type the following command in your terminal, or add them in your bash configuration file (
.zshrc, etc) if you want this configuration to persist after you close your terminal:
bash export GOPATH=$HOME/go export PATH=$PATH:$GOROOT/bin:$GOPATH/bin
Build and install the project binary. This will add the generated executable in $GOPATH/bin:
You should be ready to go now, the following command should work in your terminal:
- Verify your environment variables have been correctly set up:
- Open and close a new terminal to apply the changes you made to your shell configuration file. Or source it using
- Verify the binary has been correctly generated in your
You have to be in a git repository, otherwise gommitizen will return and error and close itself. You have to git add the files before launching gommitizen. Type
gommitizen in a shell at your repository’s path and follow the indications to proceed in formatting your commit message.
Gommitizen will basically
git commit -m [message] with a nicely formatted message you will create using the CLI.
You can set up your custom commit scopes and types in a configuration file at the route of your repository. Create a
.gommitizen.yml file matching the following structure:
types: - first - second - ... scopes: - first-scope - second-scope - ...
If you want to propose users to use an empty scope, you can add an empty option:
scopes: - - first - second
This file can be present, present partially, or absent. If the file or one of its option is missing, the default parameters will apply. This repository contains a
.gommitizen.yml example file.
The MIT Licence