Git hooks helper made in Rust
- Zero dependencies
- Easy to use
- Fast
- Cross-platform
cargo install hooky-rs
To initialize the hooks, run the following command:
hooky init
This will create a .hooky
directory in the root of your project, where the hooks will be stored. Also automatically adds pre-commit
and hooks, but you can disable this by passing the --no-pre-commit
flag.
To add a hook, run the following command:
hooky add <hook-name>
To uninstall Hooky, run the following command:
hooky uninstall
The library usage is made for Rust projects, to bind the hooks automatically.
To use Hooky as a library, add the following to your Cargo.toml
:
[build-dependencies]
hooky-rs = "*"
Add src/build.rs
:
fn main() {
// Initialize Hooky
hooky::initialize_build();
}