• Stars
    star
    4,615
  • Rank 9,195 (Top 0.2 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created about 8 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A gitmoji interactive cli tool for using emojis on commits. πŸ’»

gitmoji-cli

Build Status Code Climate Codecov npm version npm downloads gitmoji badge

gitmoji-cli

A gitmoji interactive client for using gitmojis on commit messages.

About

This project provides an easy solution for using gitmoji from your command line. Gitmoji-cli solves the hassle of searching through the gitmoji list. Includes a bunch of options you can play with! πŸŽ‰

Install

npm

npm i -g gitmoji-cli

brew

brew install gitmoji

Usage

gitmoji --help
A gitmoji interactive client for using gitmojis on commit messages.

  Usage
    $ gitmoji
  Options
    --init, -i      Initialize gitmoji as a commit hook
    --remove, -r    Remove a previously initialized commit hook
    --config, -g    Setup gitmoji-cli preferences.
    --commit, -c    Interactively commit using the prompts
    --list, -l      List all the available gitmojis
    --search, -s    Search gitmojis
    --version, -v   Print gitmoji-cli installed version
    --update, -u    Sync emoji list with the repo

Commit

You can use the commit functionality in two ways, directly or via a commit-hook.

If you want to integrate gitmoji-cli in your project I would recommend going for the hook mode as it support more use cases, it's more flexible and has a better integration with other tools, whereas the client mode is more quick and easy to use.

Client

Start the interactive commit client, to auto generate your commit based on your prompts.

gitmoji -c
Options

You can pass default values to the prompts using the following flags:

  • title: For setting the commit title.
  • message: For setting the commit message.
  • scope: For setting the commit scope.

Those flags should be used like this:

gitmoji -c --title="Commit" --message="Message" --scope="Scope"

Hook

Run the init option, add your changes and commit them, after that the prompts will begin and your commit message will be built.

gitmoji -i
git add .
git commit

⚠️ The hook should not be used with the gitmoji -c command.

gitmoji commit

Search

Search using specific keywords to find the right gitmoji.

gitmoji -s "criteria"

gitmoji search

List

Pretty print all the available gitmojis.

gitmoji -l

gitmoji list

Update

Update the gitmojis list, by default the first time you run gitmoji, the cli creates a cache to allow using this tool without internet connection.

gitmoji -u

Config

The cli has some built-in configuration options that you can tweak at your own preference:

  • Automatic git add: Enable or disable the automatic git add . every time you use the commit command.
  • Emoji format: Switch between the emoji format.
  • Message prompt: Enable or disable the message prompt.
  • Scope prompt: Enable or disable conventional commits scope prompt.
  • Gitmojis api URL: Set a custom URL to use it as the library of gitmojis.

You can configure these options via (in order of precedence):

  • A gitmoji key in your package.json file
  • A .gitmojirc.json file.
  • Using the global cli configuration.

If no user configuration is found, a set of default values will be used.

package.json

{
  "gitmoji": {
    "autoAdd": false,
    "emojiFormat": "code | emoji",
    "scopePrompt": false,
    "messagePrompt": false,
    "capitalizeTitle": true,
    "gitmojisUrl": "https://gitmoji.dev/api/gitmojis"
  }
}

.gitmojirc.json

{
  "autoAdd": false,
  "emojiFormat": "code | emoji" ,
  "scopePrompt": false,
  "messagePrompt": false,
  "capitalizeTitle": true,
  "gitmojisUrl": "https://gitmoji.dev/api/gitmojis"
}

Local configuration

Run gitmoji -g to setup some gitmoji-cli preferences.

gitmoji config

More Repositories

1

gitmoji

An emoji guide for your commit messages. 😜
TypeScript
15,681
star
2

materialshell

A material design theme for your terminal. ✨
Shell
825
star
3

react-native-error-boundary

A simple and reusable React-Native error boundary component πŸ›
TypeScript
372
star
4

starterkit

A Front End development Gulp.js based workflow. πŸš€
JavaScript
88
star
5

hyper-materialshell

A material design theme for Hyper based on materialshell. ✨
JavaScript
70
star
6

carloscuesta.me

The source of my website 🌍
TypeScript
48
star
7

dotfiles

macOS preferences and developer environment. πŸ’»
Shell
44
star
8

generator-starterkit

Yeoman that scaffolds out a front end starterkit. πŸ“¦
JavaScript
30
star
9

react-native-layout-debug

React native layout debugger. πŸ”
JavaScript
22
star
10

sprinkles-syntax

A sprinkled dark syntax theme with vibrant pops of colors.
Less
20
star
11

sprinkles-vscode

A sprinkled syntax theme with vibrant pops of colors for VSCode.
TypeScript
8
star
12

resesif

Resesif is a dark color scheme for Sublime Text.
6
star
13

carloscuesta

Carlos Cuesta – GitHub Overview
5
star
14

monorepo-example

A JavaScript monorepo example using Yarn Workspaces and Lerna
JavaScript
5
star
15

atom-setup

Configuration, packages and settings. βš›οΈ
4
star
16

sublime-text-setup

Carlos Cuesta Sublime Text developer setup.
JavaScript
3
star
17

n26-github-actions-demo

JavaScript
1
star
18

.github

Default GitHub community files for my repos
1
star
19

ghost-theme

Carlos Cuesta Ghost blog Theme
HTML
1
star
20

codegenerators-demo

A demo repository that contains generators you can play with πŸ•Ή
JavaScript
1
star