### Monk's features:
- 🦀 **Easily set up in your Rust project.** No need to install additional package managers.
- ⚙️ **Works with custom `build.rs` files.** Automate the hooks installation process.
- 💻 **Run your hooks via CLI.** Test your hooks without triggering them via Git.
> Keep calm, monk will protect your repo!
### Installation
You can install it using `cargo`:
```sh
cargo install monk
```
### Usage
Create a configuration file `monk.yaml` in your project:
```yaml
pre-commit:
commands:
- cargo fmt -- --check
- cargo clippy -- -D warnings
pre-push:
commands:
- cargo test
```
Then, install the hooks manually:
```sh
monk install
```
#### Or
Install `monk` as a build dependency **(this is the preferred way)**:
```sh
cargo add --build monk
```
and create a build script `build.rs`:
```rust
pub fn main() {
monk::init();
}
```
This way, `monk` will **automatically install hooks** for every team member during the build process.
#### Running hooks hooks manually
If you want to run specific hooks, use the `run` command:
```sh
monk run pre-commit
```