The Conventional Commit CLI is a Command Line Interface (CLI) tool designed for creating Conventional Commit compliant Git commits. It provides an interactive prompt to help you build your commit messages according to the Conventional Commit specifications, ensuring that your commit history is semantic and easily understandable.
Until the future of this project has been decided, you'll need to clone and cargo install locally.
clone
git clone https://github.com/lalilul3lo/baouncer.git
cd into root of project
cd baouncer
install
cargo install --path .
commit
On running the command, you'll encounter a series of questions:
Type
- Kind of Commit: Choose the type of your commit (e.g., feat, fix, chore, docs, style, refactor, perf, test).Scope
- Optionally, provide a scope for your commit.Subject
- Write a short description of the change.Body
- Optionally, provide a longer description of the change.Breaking Change
- Specify if this is a breaking change.Issues Affected
- Optionally, list any related issues, separated by commas.For example, the following answers:
feat - A new feature (🎉)
authentication
implement JWT authentication
This commit implements JWT authentication for better security.
""
42,43
**...will generate the following commit message:***
feat(authentication): implement JWT authentication
This commit implements JWT authentication for better security.
closes #42, #43
commit-msg-hook
Will generate a git
commit-msg
hook at ./git/hooks/commit-msg
, that looks like the following:
#!/usr/bin/env sh
commit_message=$(grep -v '^#' "$1")
baouncer check-commit -m "$commit_message"
commit-msg-hook
Validates whether or not a string is a Conventional Commit compliant git
commit.