⚡ GitCoco
____ _ _ ____
/ ___|(_)| |_ / ___| ___ ___ ___
| | _ | || __|| | / _ \ / __| / _ \
| |_| || || |_ | |___ | (_) || (__ | (_) |
\____||_| \__| \____| \___/ \___| \___/
⚡ GitCoco: A Rust-based CLI for Conventional Commits, making commit standardization effortless and consistent for seamless project versioning and collaboration.
✨ Features
gitcoco
gives tools to work with Conventional Commits.
It provides the following commands:
gitcoco changelog
: Create a changelog file.gitcoco check
: Checks if a range of commits is following the convention.gitcoco commit
: Helps to make conventional commits.gitcoco version
: Finds out the current or next version.
🚀 Installation
Make sure that cmake
has been installed. If not, you should install cmake
:
To install gitcoco, simply clone the repository and follow the instructions below:
Running the below command will globally install the gitcoco
binary.
Optionally, you can add ~/.cargo/bin
to your PATH if it's not already there
💡 Usage
Changelog
A changelog can be generated using the conventional commits. It is inspired by conventional changelog and the configuration file allows changes to the generated the output.
Check
Check a range of revisions for compliance.
It returns a non zero exit code if some commits are not conventional. This is useful in a pre-push hook.
Commit
Helps to make conventional commits. A scope, description, body, breaking change and issues will be prompted. Convco will recover the previous message in case git failed to create the commit.
gitcoco commit
can also be used as git core.editor.
In this case gitcoco commit
will not invoke git commit
, but git
will invoke gitcoco commit
e.g.:
GIT_EDITOR='gitcoco commit'
When persisting the git editor also set sequence.editor
when editing the todo list of an interactive rebase.
Or configure a git alias:
Version
When no options are given it will return the current version.
When --bump
is provided, the next version will be printed out.
Conventional commits are used to calculate the next major, minor or patch.
If needed one can provide --major
, --minor
or --patch
to overrule the convention.
🗑️ Uninstallation
Running the below command will globally uninstall the gitcoco
binary.
Remove the project repo
🤝 How to contribute
We welcome contributions!
- Fork this repository;
- Create a branch with your feature:
git checkout -b my-feature
; - Commit your changes:
git commit -m "feat: my new feature"
; - Push to your branch:
git push origin my-feature
.
Once your pull request has been merged, you can delete your branch.
📝 License
This project is licensed under the MIT License - see the LICENSE file for details.