____ _ _ ____
/ ___|(_)| |_ / ___| ___ ___ ___
| | _ | || __|| | / _ \ / __| / _ \
| |_| || || |_ | |___ | (_) || (__ | (_) |
\____||_| \__| \____| \___/ \___| \___/
⚡ GitCoco: A Rust-based CLI for Conventional Commits, making commit standardization effortless and consistent for seamless project versioning and collaboration.
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.
Make sure that cmake has been installed. If not, you should install cmake:
cmake --version
brew install cmakeTo install gitcoco, simply clone the repository and follow the instructions below:
git clone git@github.com:trinhminhtriet/gitcoco.git
cd gitcoco
cargo install --path .Running the below command will globally install the gitcoco binary.
cargo install gitcocoOptionally, you can add ~/.cargo/bin to your PATH if it's not already there
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrcA 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.
gitcoco changelog > CHANGELOG.mdCheck 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.
gitcoco check $remote_sha..$local_shaHelps 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 --featgitcoco 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' git commit -pWhen persisting the git editor also set sequence.editor when editing the todo list of an interactive rebase.
Or configure a git alias:
git config --global alias.gitcoco '!GIT_EDITOR="gitcoco commit" git commit'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.
gitcoco version --bumpRunning the below command will globally uninstall the gitcoco binary.
cargo uninstall gitcocoRemove the project repo
rm -rf /path/to/git/clone/gitcocoWe 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.
This project is licensed under the MIT License - see the LICENSE file for details.