#commit #git-commit #conventional-commits

app lazycc

A git hook for writing conventional commits for lazy people

1 unstable release

0.1.0 Dec 12, 2023

#2484 in Development tools

GPL-3.0-only

20KB
189 lines

lazycc

A git hook for writing conventional commits for lazy people.

About

Git hook to help follow Conventional Commits specification. Very heavily inspired / forked by cc-cli.

Install

From source

Installing Rust

lazycc build has been tested with current Rust stable release version. You can install Rust from your distribution package or use rustup.

rustup default stable

If you prefer, you can use the stable version only for install lazycc.

rustup override set stable

Option one: building from repository

To build lazycc simply execute the following commands.

git clone https://gitlab.com/ogarcia/lazycc.git
cd lazycc
cargo build --release

Option two: building from crates.io

Simply run.

cargo install lazycc

Usage

lazycc is intended to be run as a git hook so once installed you must go to the repository in which you want to use it and install the hook.

mkdir newrepo
cd newrepo
git init
lazycc -i

Once installed when you do a git commit you will see the prompt that will help you write the commit message using conventional commits.

echo "Test" > README.md
git add README.md
git commit

If you want to uninstall the hook from git repository simply run.

lazycc -u

Command help.

Usage: lazycc [<args...>] [-i] [-u] [-V]

This program is intended to be executed as a git hook so simply install it
with the `-i` command and run `git commit`.

Positional Arguments:
  args              prepare commit message arguments (generated by git)

Options:
  -i, --install     install hook
  -u, --uninstall   uninstall hook
  -V, --version     uninstall hook
  --help            display usage information

Dependencies

~4–15MB
~133K SLoC