Crates.io | monk |
lib.rs | monk |
version | 0.1.10 |
source | src |
created_at | 2024-09-19 16:41:20.737282 |
updated_at | 2024-09-23 15:01:14.351312 |
description | Monk is a simple Git hooks manager written in Rust. It allows you to manage and automate Git hooks easily using a YAML configuration file. |
homepage | https://github.com/daynin/monk |
repository | https://github.com/daynin/monk |
max_upload_size | |
id | 1380481 |
size | 171,001 |
build.rs
files. Automate the hooks installation process.Keep calm, monk will protect your repo!
You can install it using cargo
:
cargo install monk
Create a configuration file monk.yaml
in your project:
pre-commit:
commands:
- cargo fmt -- --check
- cargo clippy -- -D warnings
pre-push:
commands:
- cargo test
Then, install the hooks manually:
monk install
Install monk
as a build dependency (this is the preferred way):
cargo add --build monk
and create a build script build.rs
:
pub fn main() {
monk::init();
}
This way, monk
will automatically install hooks for every team member during the build process.
If you want to run specific hooks, use the run
command:
monk run pre-commit