peeeuzin / hooky

Git hooks helper made in Rusty

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Hooky

Git hooks helper made in Rust

Features

  • Zero dependencies
  • Easy to use
  • Fast
  • Cross-platform

Installation

cargo install hooky-rs

CLI usage

Initialize Hooky

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.

Add a hook

To add a hook, run the following command:

hooky add <hook-name>

Uninstall Hooky

To uninstall Hooky, run the following command:

hooky uninstall

Library usage (Experimental)

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();
}

About

Git hooks helper made in Rusty

License:MIT License


Languages

Language:Rust 78.6%Language:Shell 21.4%