Probably the most elegant way to make a conventional commit on the command line
-
tab completion,placeholdersandlivly prompt: this gives the user enough hints to make a better commit, with the help of repll -
find issues for you: when you start typing#with a number, we will search for issues on github, it's based on gh cli, make sure it's installed and configured -
conventional commit lint: while you are typing, we lint it for you using the great commitlint(!NOTE: When linting, we won't prompt <body> & <footer> as an input, this avoids overwhelming output message) -
focus more on typing rather than choosing: some other commit tools pop up prompts for the user to select, whereas incommitliveyou just type something and press tab to complete, which I think is closer to the way we interact with command line -
very close to git commit command: under the hood,commitlivejust rungit commitcommand for you with the flag and commit you provided, andflagis always same asgit commit
NOTE! You must have NodeJS v13.5.0+(v12.16.0+) installed in order to get commitlive up and running
Install it globally or run it directly using npx
npm i -g commitlivenpx commitliveRun commitlive to commit your staged changes:
commitlive -mOr make them staged while committing:
commitlive -amYou may have noticed, it's same as git commit, quite easy to grasp its usage
Finally, be a good commitzen