{"id":13554813,"url":"https://github.com/folke/devmoji","last_synced_at":"2025-05-14T20:06:42.359Z","repository":{"id":37023106,"uuid":"233550318","full_name":"folke/devmoji","owner":"folke","description":":robot: :rocket: :sparkles: Emojify your conventional commits with Devmoji","archived":false,"fork":false,"pushed_at":"2025-04-04T21:35:43.000Z","size":3993,"stargazers_count":363,"open_issues_count":36,"forks_count":25,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-06T13:04:42.286Z","etag":null,"topics":["cli","commit","commit-message","conventional-changelog","conventional-commits","emoji","gitmoji"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/devmoji","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/folke.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-01-13T08:46:23.000Z","updated_at":"2025-03-16T10:49:41.000Z","dependencies_parsed_at":"2024-03-04T19:54:05.663Z","dependency_job_id":"1e652604-d4c8-4465-b85b-f73f25be78a5","html_url":"https://github.com/folke/devmoji","commit_stats":{"total_commits":253,"total_committers":9,"mean_commits":28.11111111111111,"dds":0.5968379446640316,"last_synced_commit":"a3bf53076f23df5c5a40f1494ab91b9aac10c034"},"previous_names":[],"tags_count":32,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folke%2Fdevmoji","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folke%2Fdevmoji/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folke%2Fdevmoji/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/folke%2Fdevmoji/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/folke","download_url":"https://codeload.github.com/folke/devmoji/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248741161,"owners_count":21154252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","commit","commit-message","conventional-changelog","conventional-commits","emoji","gitmoji"],"created_at":"2024-08-01T12:02:55.388Z","updated_at":"2025-04-13T15:57:47.713Z","avatar_url":"https://github.com/folke.png","language":"TypeScript","readme":"# :sparkles: Devmoji\n\n[![Node CI](https://github.com/folke/devmoji/workflows/Node%20CI/badge.svg)](https://github.com/folke/devmoji/actions)\n[![npm](https://img.shields.io/npm/v/devmoji)](https://www.npmjs.com/package/devmoji)\n[![GitHub](https://img.shields.io/github/license/folke/devmoji)](https://github.com/folke/devmoji/blob/master/LICENSE)\n[![GitHub top language](https://img.shields.io/github/languages/top/folke/devmoji)](https://github.com/folke/devmoji/)\n[![Renovate](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com)\n\nUsing [Conventional Commits :star:](https://www.conventionalcommits.org/) as a\nstandard for your commit messages, makes\n[Semantic Versioning :bookmark:](https://semver.org/) as easy as can be, with\ntools like\n[Conventional Changelog :page_facing_up:](https://github.com/conventional-changelog/conventional-changelog),\n[Standard Version :bookmark:](https://github.com/conventional-changelog/standard-version)\nand\n[Semantic Release :package::rocket:](https://github.com/semantic-release/semantic-release)\n\n**Devmoji** is a command line tool that adds color :rainbow: to conventional\ncommits, using emojis inspired by\n[Gitmoji :stuck_out_tongue_winking_eye:](https://gitmoji.carloscuesta.me/)\n\nSome of the things **Devmoji** can do:\n\n- [**emojify:**](###devmoji-emojify) convert input between diferent emoji\n  formats `unicode`, `shortcode` and `devmoji`. **devmoji** are easy to remember\n  aliases like: `:test:`, `:refactor:`, `:docs:`, `:security` instead of hard to\n  remember emoji codes\n- [**git commit:**](###devmoji---edit) install a **`prepare-commit-msg` commit\n  hook** to :sparkles: automagically emojify and lints your commit message\n- [**git log:**](###devmoji---log) emojify and colorify the output of `git log`\n  even for projects not using emojis\n\nWhat does it look like?\n\n- see the commit messages of the Devmoji\n  [github repository](https://github.com/folke/devmoji)\n- generated Devmoji\n  [CHANGELOG.md](https://github.com/folke/devmoji/blob/master/CHANGELOG.md)\n\n## :package: Installation\n\nInstall with `npm` or `yarn`\n\n\u003e globally\n\n```sh\nnpm install -g devmoji\nyarn global add devmoji\n```\n\n\u003e locally inside your project. use with `npx devmoji`\n\n```shell\nnpm install --dev devmoji\nyarn add --dev devmoji\n```\n\nSee [`--edit`](###devmoji---edit) for information on how to setup a git commit\nhook.\n\n## :boom: Usage\n\n### `devmoji --help`\n\n```console\n$ devmoji --help\nUsage: devmoji [options]\n\nOptions:\n  -c|--config \u003cfile\u003e    location of the devmoji.config.js file\n  -l|--list             list all known devmojis\n  -t|--text \u003ctext\u003e      text to format. reads from stdin when omitted\n  --lint                lint the conventional commit. disabled for --log\n  -f|--format \u003cformat\u003e  format should be one of: unicode, shortcode, devmoji (default: \"unicode\")\n  --commit              automatically add a devmoji to the conventional commit header (default: true)\n  --no-commit           do not process conventional commit headers\n  -e|--edit             read last commit message from .git/COMMIT_EDITMSG in the git root\n  --log                 format conventional commits in text similar to git log\n  --color               use colors for formatting. Colors are enabled by default, unless output is piped to another command (default: true)\n  --no-color            don't use colors\n  --version             output the version number\n  -h, --help            output usage information\n```\n\n### `devmoji` emojify\n\nEmojify text using `--text` or piping it to `stdin`. Input can be a combination\nusing any valid format. Output formats:\n\n| Format      | Description                                                      |\n| ----------- | ---------------------------------------------------------------- |\n| `shortcode` | outputs Github Markdown short codes like `:sparkles:` `:rocket:` |\n| `unicode`   | outputs the emoji unicode symbols like :sparkles: :rocket:       |\n| `devmoji`   | outputs the devmoji shortcodes like `:feat:` `:chore-release:`   |\n| `strip`     | removes all emoji from the input                                 |\n\n\u003e The default format is `unicode`, since this can be used pretty much everywhere\n\u003e and has the shortest text length (relevant for commit messages)\n\n```console\n$ echo \"This is a :test: of the first :release: :boom: ✨\" | devmoji --format shortcode\nThis is a :rotating_light: of the first :rocket: :boom: :sparkles:\n\n$ echo \"This is a :test: of the first :release: :boom: :sparkles:\" | devmoji --format unicode\nThis is a 🚨 of the first 🚀 💥 ✨\n\n$ echo \"🚀 :boom: :sparkles:\" | devmoji --format devmoji\n:chore-release: :breaking: :feat:\n\n$ echo \"test 🚀 :boom: :sparkles: :security:\" | devmoji --format strip\ntest\n```\n\n### `devmoji --commit`\n\nAutomagically :sparkles: emojifies a conventional commit message of the format\n`type(scope): something useful`, using the following pseudo code:\n\n```js\nif (exists(\":type-scope:\")) return emoji(\":type-scope:\")\n\nif (exists(\":type:\") \u0026\u0026 exists(\":scope:\"))\n  return emoji(\":type:\") + emoji(\":scope:\")\n\nif (exists(\":type:\")) return emoji(\":type:\")\n```\n\n\u003e example ouput:\n\n```console\n$ echo \"feat: added a new feature :smile:\" | devmoji --commit\nfeat: ✨ added a new feature 😄\n\n$ echo \"chore(release): 1.1.1\" | devmoji --commit\nchore(release): 🚀 1.1.1\n\n$ echo \"fix(security): upgraded lodash\" | devmoji --commit\nfix(security): 🐛 🔒 upgraded lodash\n```\n\n### `devmoji --lint`\n\nLints your commit message to see if they are valid conventional commits\n\n### `devmoji --edit`\n\nFormats and saves your current commit message `.git/COMMIT_EDITMSG`. This is\nonly really useful as a `prepare-commit-msg` or `commit-msg` hook.\n\nWhen to use what hook?\n\n* `prepare-commit-msg`: use this if you do not use **Devmnojis** `--lint` option and want to use it with something like [commitlint](https://commitlint.js.org/) instead.\n* `commit-msg`: use this hook if you also want to use **Devmoji** for linting \n\nConfiguration using [Husky](https://typicode.github.io/husky/)\n\n```shell\n# make sure husky hooks are installed\n$ npx husky install\n\n# add a hook for devmoji\n$ npx husky add .husky/prepare-commit-msg \"npx devmoji -e --lint\"\n```\n\nConfiguration using [Yorkie](https://www.npmjs.com/package/yorkie)\n\n```js\n// package.json\n{\n  \"gitHooks\": {\n    \"prepare-commit-msg\": \"devmoji -e --lint\"\n  }\n}\n```\n\n\u003e If you installed **Devmoji** locally in your project as a dev dependency, then\n\u003e use something like `npx --no-install devmoji -e` instead of the commands\n\u003e above.\n\n\u003e Alternatively, if you don't want to use **Husky** or **Yorkie**, you can [manually](https://github.com/folke/devmoji/issues/87) create the git hooks.\n\n### `devmoji --log`\n\nWorks similar to `--commit`, but formats `type(scope): something useful`\nanywhere in the input instead of the beginning of the first line.\n\nThis is useful to format the output of `git log`. Any `git log` option works,\nbut my favorite alias is:\n\n```shell\n$ git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)\u003c%an\u003e%Creset' --abbrev-commit --decorate --date=short\n```\n\n\u003e I'll use my alias `git l`, instead of the above, for clarity. The\n\u003e `devmoji --format strip` is only for demonstration purposes, since all devmoji\n\u003e commits already have emoji\n\u003e ![devmoji --list](https://github.com/folke/devmoji/raw/master/assets/git--log.png)\n\n\u003e using `devmoji --log` \u003e\n\u003e ![devmoji --list](https://github.com/folke/devmoji/raw/master/assets/devmoji--log.png)\n\n### `devmoji --list`\n\nTo get a list of all available **Devmoji**, run with `--list`. (see also\n[Default Devmoji](###Default-Devmoji))\n\n![devmoji --list](https://github.com/folke/devmoji/raw/master/assets/devmoji--list.png)\n\n## :gear: Configuration\n\n`devmoji` uses the config file as specified with the `--config` option, or looks\nfor `devmoji.config.js` in the following paths:\n\n- current directory\n- parent directory that contains a `package.json` file\n- parent directory that is a `git` repository\n- home directory\n\n### Example Config File\n\n```js\nmodule.exports = {\n  // extra types used in commit messages\n  types: [\"lint\"],\n  // custom devmoji\n  devmoji: [\n    // use :boom: instead of :sparkles: for the type 'feat'\n    { code: \"feat\", emoji: \"boom\" },\n    // add a custom devmoji\n    {\n      code: \"fail\",\n      emoji: \"poop\",\n      description: \"something bad happened\",\n    },\n    // add a new devmoji based on an existing gitmoji. description will be taken from the gitmoji\n    {\n      code: \"css\",\n      gitmoji: \"art\",\n    },\n    // the emoji from the gitmoji can be overriden as well\n    {\n      code: \"config\",\n      gitmoji: \"wrench\",\n      emoji: \"gear\",\n    },\n  ],\n}\n```\n\n### Default Devmoji Reference\n\n| Emoji                  | Devmoji Code      | Description                                                                                                       |\n| ---------------------- | ----------------- | ----------------------------------------------------------------------------------------------------------------- |\n| :sparkles:             | `:feat:`          | **feat:** a new feature                                                                                           |\n| :bug:                  | `:fix:`           | **fix:** a bug fix                                                                                                |\n| :books:                | `:docs:`          | **docs:** documentation only changes                                                                              |\n| :art:                  | `:style:`         | **style:** changes that do not affect the meaning of the code (white-space, formatting, missing semi-colons, etc) |\n| :recycle:              | `:refactor:`      | **refactor:** a code change that neither fixes a bug nor adds a feature                                           |\n| :zap:                  | `:perf:`          | **perf:** a code change that improves performance                                                                 |\n| :rotating_light:       | `:test:`          | **test:** adding missing or correcting existing tests                                                             |\n| :wrench:               | `:chore:`         | **chore:** changes to the build process or auxiliary tools and libraries such as documentation generation         |\n| :rocket:               | `:chore-release:` | **chore(release):** code deployment or publishing to external repositories                                        |\n| :link:                 | `:chore-deps:`    | **chore(deps):** add or delete dependencies                                                                       |\n| :package:              | `:build:`         | **build:** changes related to build processes                                                                     |\n| :construction_worker:  | `:ci:`            | **ci:** updates to the continuous integration system                                                              |\n| :rocket:               | `:release:`       | code deployment or publishing to external repositories                                                            |\n| :lock:                 | `:security:`      | Fixing security issues.                                                                                           |\n| :globe_with_meridians: | `:i18n:`          | Internationalization and localization.                                                                            |\n| :boom:                 | `:breaking:`      | Introducing breaking changes.                                                                                     |\n| :gear:                 | `:config:`        | Changing configuration files.                                                                                     |\n| :heavy_plus_sign:      | `:add:`           | add something                                                                                                     |\n| :heavy_minus_sign:     | `:remove:`        | remove something                                                                                                  |\n","funding_links":[],"categories":["TypeScript","Development","cli","emoji"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolke%2Fdevmoji","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffolke%2Fdevmoji","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffolke%2Fdevmoji/lists"}