LinuxCommandLibrary

gitmoji

Use emojis in Git commit messages

TLDR

Start the commit wizard

$ gitmoji --commit
copy

Initialize the Git hook (so gitmoji will be run every time git commit is run)
$ gitmoji --init
copy

Remove the Git hook
$ gitmoji --remove
copy

List all available emojis and their descriptions
$ gitmoji --list
copy

Search emoji list for a list of keywords
$ gitmoji --search [keyword1] [keyword2]
copy

Update cached list of emojis from main repository
$ gitmoji --update
copy

Configure global preferences
$ gitmoji --config
copy

SYNOPSIS

gitmoji [options] [command]
gitmoji commit [options]

PARAMETERS

--config <path>
    Specify custom gitmoji config file path

--hook
    Integrate as Git pre-commit hook

--emoji-only
    Append only the selected emoji to message

--message-only
    Skip emoji picker, use configured gitmojis

--use-config
    Enable config file usage (default: true)

--interactive
    Force interactive mode (default: true)

--help, -h
    Display help information

--version, -v
    Show gitmoji version

DESCRIPTION

Gitmoji is a powerful command-line tool designed to standardize Git commit messages using expressive emojis. It features an interactive interface powered by Inquirer.js, allowing users to search and select from a comprehensive list of over 200 gitmojis, each mapped to common code changes like ✨ Init, 🐛 Bug Fixes, or 🚀 Performance. Upon selection, users input a commit message, and gitmoji formats it as emoji: message before executing git commit.

Key benefits include enforcing conventional commit standards, improving changelog automation with tools like semantic-release, and enhancing readability in collaborative projects. It supports custom configurations via JSON files for personalized emoji sets, git hook integration for pre-commit enforcement, and modes for non-interactive use in CI/CD pipelines.

Installation is straightforward via npm: npm install -g gitmoji-cli. Once set up, gitmoji commit launches the selector, making commit workflows fun and consistent.

CAVEATS

Requires Node.js (≥14) and npm; not a native Linux binary. Custom configs may override defaults, potentially breaking standards.

SUBCOMMANDS

commit: Launch interactive commit selector
search <query>: Fuzzy search gitmojis
list: Display all available gitmojis
init: Create default config file
update: Refresh gitmoji database

CONFIG EXAMPLE

JSON file at ~/.config/gitmoji/config.json:
{
  "gitmojis": [{ "emoji": ":sparkles:", "code": "feat", "description": "new feature" }],
  "useCommitlintConfig": true
}

HISTORY

Created by Carlos Cuesta in 2017 as gitmoji-cli on GitHub. Evolved from gitmoji spec for conventional commits, now with 10k+ stars, regular updates adding emojis and Node.js improvements. Widely adopted in open-source for semantic versioning.

SEE ALSO

git(1)

Copied to clipboard