๐Ÿ“ฆ GitSquared / komit

An interactive prompt for conventional commit messages that doesn't get in your way. Designed to run as a git hook.

โ˜… 40 stars โ‘‚ 4 forks ๐Ÿ‘ 40 watching โš–๏ธ MIT License
commitlintdeveloper-toolsgit-hooklintnpm-package
๐Ÿ“ฅ Clone https://github.com/GitSquared/komit.git
HTTPS git clone https://github.com/GitSquared/komit.git
SSH git clone git@github.com:GitSquared/komit.git
CLI gh repo clone GitSquared/komit
dependabot[bot] dependabot[bot] chore(deps): bump dot-prop and @commitlint/config-conventional (#10) f3ee799 2 years ago ๐Ÿ“ History
๐Ÿ“‚ master View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ readme_src
๐Ÿ“„ .gitignore
๐Ÿ“„ index.js
๐Ÿ“„ LICENSE
๐Ÿ“„ package-lock.json
๐Ÿ“„ package.json
๐Ÿ“„ README.md
๐Ÿ“„ README.md

๐Ÿ‘ฎ Komit

npm badge

Komit is a small prompt designed to be run as a git hook to help follow the conventional commit message standard.

Komit doesn't try to get in your way, and assumes you only need help writing the header part of the commit. It lets git open your favorite editor to change the body & footer of your message before commiting.

It also helps maintaining a consistent list of commit scopes by syncing a .commitscopesrc file in your repository.

Demo

Komit demo

Installation with Husky

Install the package:

npm i -D komit

Add the hook to your package.json:

"husky": {
  "hooks": {
    "prepare-commit-msg": "komit $HUSKY_GIT_PARAMS"
  }
},

Installation with traditional git hooks

Add to .git/hooks/prepare-commit-msg:

#!/bin/sh

npx komit .git/COMMIT_EDITMSG

Credits

Built with the amazing enquirer lib. Thanks to @dosentmatter for force-stdin-tty which fixed stdin access problems when running as a Husky hook.

Written by Gaby, a software architect based in Paris.

License

MIT