go-gitmoji-cli





____ ____ ____ _ ___ _ _ ____ _ _ ____ _ _
| __ | | __ | __ | | |\/| | | | | __ | | |
|__] |__| |__] | | | | |__| _| | |___ |___ |

Abstract
Gitmoji is an emoji guide for GitHub commit messages. Aims to be a standardization cheatsheet - guide for using emojis on GitHub's commit messages.
is a nice way to standardize commit messages with emojis.
There is already a nice gitmoji-cli command line interface available.
Because I was searching for a nice project to get more into golang this project was created.
It is possible to use different commit message formats.
Per default the format is conventional-commits with emoji
<type>[optional scope]: :smile: <description>
Installation
⚠ Currently the package is in state pre-alpha please be aware that some functionality may change and some bugs may happen.
brew
brew tap AndreasAugustin/go-gitmoji-cli https://github.com/AndreasAugustin/go-gitmoji-cli
brew install AndreasAugustin/go-gitmoji-cli/go-gitmoji-cli
Aur
The package is located here
pamac update -a
pamac install go-gitmoji-cli-bin
Docker
There are 2 docker registries available. Just pull the image to have a local test setup available.
To use it, mount the current dir into the working dir.
# available <tag> are the git tags
# docker hub
# pull the image
docker pull andyaugustin/go-gitmoji-cli:<tag>
# run the container -> will open a zsh session
# note: the local volume mount is missing in the sample command
docker run -it andyaugustin/go-gitmoji-cli:<tag>
# if you prefer ghcr instead of docker hub
# docker pull ghcr.io/andreasaugustin/go-gitmoji-cli:<tag>
# docker run -it ghcr.io/andreasaugustin/go-gitmoji-cli:<tag>
Manual
Download the related release here and unpack the related binary into your path
Configuration
It is possible to configure the cli either with a .go-gitmoji-cli.json file within the repo directory
or with command line flags.
Environment variables are supported (case insensitive). The key is the same like the parameter with a prefix GO_GITMOJI_CLI_.
| parameter |
description |
default |
| auto_add |
perform automatically a git add . |
false |
| auto_sign |
automatically sign commits (can also be configured with git git config -g commit.gpgsign=true |
false |
| emoji_format |
format of emojis code/emoji |
code |
| scope_prompt |
Prompt for adding the commit scope |
false |
| body_prompt |
Prompt for adding the commit message body |
false |
| capitalize_title |
If set to true the commit title description will be capitalized |
false |
| gitmojis_url |
The URL of the gitmojis database |
https://gitmoji.dev/api/gitmojis |
The configuration values can be changed with
go-gitmoji-cli config [-g]

This will create a file within the local directory or within the OS related config directory (when -g flag is enabled).
Reading will follow the following order:
- default values
- global config if exists
- local config if exists
- environment variables
Usage
basic commands
# show available commands
go-gitmoji-cli --help

# show the version
go-gitmoji-cli --version

# list the available gitmojis
go-gitmoji-cli list

Commit
There are 2 ways making commits with the tool
- hooks
go-gitmoji-cli hooks --help. This will install a commit hook.
- commit
go-gitmoji-cli commit --help
# doing a commit with dry-run
go-gitmoji-cli commit --dry-run

Debugging
There is a flag --debug enabling verbose logging
DEV
The development environment targets are located in the Makefile
make help
Special thanks to gitmoji and gitmoji-cli
Contributors ✨
Thanks goes to these wonderful people (emoji key):
This project follows the all-contributors specification. Contributions of any kind welcome!