| Crates.io | gitcoco |
| lib.rs | gitcoco |
| version | 0.1.11 |
| created_at | 2024-10-25 10:27:42.833957+00 |
| updated_at | 2025-08-05 16:24:04.186073+00 |
| description | GitCoco: A Rust-based CLI for Conventional Commits, making commit standardization effortless and consistent for seamless project versioning and collaboration. |
| homepage | https://trinhminhtriet.com |
| repository | https://github.com/trinhminhtriet/gitcoco |
| max_upload_size | |
| id | 1422320 |
| size | 166,187 |
____ _ _ ____
/ ___|(_)| |_ / ___| ___ ___ ___
| | _ | || __|| | / _ \ / __| / _ \
| |_| || || |_ | |___ | (_) || (__ | (_) |
\____||_| \__| \____| \___/ \___| \___/
⚡ 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 cmake
To 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 gitcoco
Optionally, you can add ~/.cargo/bin to your PATH if it's not already there
echo 'export PATH="$HOME/.cargo/bin:$PATH"' >> ~/.bashrc
source ~/.bashrc
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.
gitcoco changelog > CHANGELOG.md
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.
gitcoco check $remote_sha..$local_sha
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 --feat
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' git commit -p
When 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 --bump
Running the below command will globally uninstall the gitcoco binary.
cargo uninstall gitcoco
Remove the project repo
rm -rf /path/to/git/clone/gitcoco
We welcome contributions!
git checkout -b my-feature;git commit -m "feat: my new feature";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.